diff --git a/stack_orchestrator/data/config/monitoring/grafana/dashboards/prometheus-blackbox-exporter.json b/stack_orchestrator/data/config/monitoring/grafana/dashboards/prometheus-blackbox-exporter.json index 6c018154..0a534bec 100644 --- a/stack_orchestrator/data/config/monitoring/grafana/dashboards/prometheus-blackbox-exporter.json +++ b/stack_orchestrator/data/config/monitoring/grafana/dashboards/prometheus-blackbox-exporter.json @@ -133,10 +133,13 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, + "expr": "probe_success{instance=~\"$target\"}", + "format": "time_series", + "instant": true, "refId": "A" } ], - "title": "$target", + "title": "$target ($url)", "type": "row" }, { @@ -1057,6 +1060,29 @@ "tagsQuery": "", "type": "query", "useTags": false + }, + { + "current": { + "selected": false, + "text": "", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "definition": "label_values(probe_success{instance=~\"$target\"}, url)", + "hide": 2, + "includeAll": false, + "multi": false, + "name": "url", + "options": [], + "query": "label_values(probe_success{instance=~\"$target\"}, url)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" } ] }, diff --git a/stack_orchestrator/data/config/monitoring/prometheus/prometheus.yml b/stack_orchestrator/data/config/monitoring/prometheus/prometheus.yml index 42e56795..9dd83904 100644 --- a/stack_orchestrator/data/config/monitoring/prometheus/prometheus.yml +++ b/stack_orchestrator/data/config/monitoring/prometheus/prometheus.yml @@ -25,8 +25,10 @@ scrape_configs: module: [http_2xx] static_configs: # Add URLs to be monitored below - - targets: - # - https://github.com + # - targets: ["https://github.com"] + # labels: + # alias: "GitHub" + # url: "https://github.com" relabel_configs: # Forward the original target URL as the 'target' parameter. - source_labels: [__address__] @@ -36,6 +38,10 @@ scrape_configs: - source_labels: [alias] target_label: instance action: replace + # Preserve the URL label + - source_labels: [url] + target_label: url + action: replace # If no alias is set, fall back to the target URL. - source_labels: [instance] regex: ^$ diff --git a/stack_orchestrator/data/stacks/monitoring/monitoring-testnet.md b/stack_orchestrator/data/stacks/monitoring/monitoring-testnet.md index 7f109307..12d0383e 100644 --- a/stack_orchestrator/data/stacks/monitoring/monitoring-testnet.md +++ b/stack_orchestrator/data/stacks/monitoring/monitoring-testnet.md @@ -47,30 +47,39 @@ laconic-so --stack monitoring deploy create --spec-file monitoring-testnet-spec. - targets: ["https://wallet.laconic.com"] labels: alias: "Wallet App" + url: "https://wallet.laconic.com" - targets: ["https://laconicd-sapo.laconic.com"] labels: - alias: "Node (laconicd)" + alias: "Node laconicd" + url: "https://laconicd-sapo.laconic.com" - targets: ["https://console-sapo.laconic.com"] labels: alias: "Console App" + url: "https://console-sapo.laconic.com" - targets: ["https://fixturenet-eth.laconic.com"] labels: alias: "Fixturenet ETH" + url: "https://fixturenet-eth.laconic.com" - targets: ["https://deploy.laconic.com"] labels: alias: "Deploy App" + url: "https://deploy.laconic.com" - targets: ["https://deploy-backend.laconic.com/staging/version"] labels: alias: "Deploy Backend" + url: "https://deploy-backend.laconic.com/staging/version" - targets: ["https://container-registry.apps.vaasl.io"] labels: alias: "Container Registry" + url: "https://container-registry.apps.vaasl.io" - targets: ["https://webapp-deployer-api.apps.vaasl.io"] labels: alias: "Webapp Deployer API" + url: "https://webapp-deployer-api.apps.vaasl.io" - targets: ["https://webapp-deployer-ui.apps.vaasl.io"] labels: alias: "Webapp Deployer UI" + url: "https://webapp-deployer-ui.apps.vaasl.io" ... - job_name: laconicd ...