From 7548f4ae9fc712c577d3e71cb0cc8fbf9e9baabe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 11 Nov 2025 14:03:19 +0000 Subject: [PATCH 1/2] Initial plan From 5492ec8bafaa9486b1a4282c1beb20f3a18af0f2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 11 Nov 2025 14:08:07 +0000 Subject: [PATCH 2/2] Replace hardcoded datasource UID with template variable Co-authored-by: cbartz <4182921+cbartz@users.noreply.github.com> --- .../metrics_prometheus.json | 87 ++++++++++++------- 1 file changed, 55 insertions(+), 32 deletions(-) diff --git a/src/grafana_dashboards/metrics_prometheus.json b/src/grafana_dashboards/metrics_prometheus.json index 45ac7e74b5..df11498cfd 100644 --- a/src/grafana_dashboards/metrics_prometheus.json +++ b/src/grafana_dashboards/metrics_prometheus.json @@ -38,7 +38,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "fieldConfig": { "defaults": { @@ -116,7 +116,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "editorMode": "code", "exemplar": false, @@ -135,7 +135,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "description": "The amount of time a runner is not used.", "fieldConfig": { @@ -214,7 +214,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "editorMode": "code", "expr": "histogram_quantile(1, sum by(flavor, le) (rate(runner_idle_duration_seconds_bucket[10m])))", @@ -229,7 +229,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "description": "Duration of reconciliation (seconds)", "fieldConfig": { @@ -308,7 +308,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "editorMode": "code", "expr": "histogram_quantile(1, sum(rate(reconcile_duration_seconds_bucket[10m])) by (flavor, le))", @@ -323,7 +323,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "description": "Time in seconds to initialize the VM and register the runner on GitHub.", "fieldConfig": { @@ -402,7 +402,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "editorMode": "code", "expr": "histogram_quantile(1, sum by (flavor, le) (rate(runner_spawn_duration_seconds_bucket[10m]))) ", @@ -417,7 +417,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "description": "", "fieldConfig": { @@ -496,7 +496,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "editorMode": "code", "expr": "histogram_quantile(\n $quantile,\n sum by (flavor, le) (\n rate(delete_vm_duration_seconds_bucket[10m])\n )\n)", @@ -511,7 +511,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "description": "Number of seconds taken to delete runners from GitHub for each reconcile", "fieldConfig": { @@ -590,7 +590,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "editorMode": "code", "expr": "histogram_quantile($quantile, sum by (flavor, le) (rate(delete_runner_duration_seconds_bucket[10m])))", @@ -605,7 +605,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "description": "OpenStack Server List response time", "fieldConfig": { @@ -684,7 +684,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "editorMode": "code", "expr": "histogram_quantile(\n $quantile,\n sum by (le) (\n rate(openstack_http_response_time_bucket{endpoint=~\".*servers/detail\"}[10m])\n )\n)", @@ -712,7 +712,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "fieldConfig": { "defaults": { @@ -763,7 +763,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "editorMode": "code", "expr": "sum by (flavor) (expected_runners_count)", @@ -778,7 +778,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "description": "Expected runners count - (idle runners count + busy runners count)", "fieldConfig": { @@ -830,7 +830,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "editorMode": "code", "expr": "abs(expected_runners_count - (idle_runners_count + busy_runners_count))", @@ -845,7 +845,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "fieldConfig": { "defaults": { @@ -922,7 +922,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "editorMode": "code", "expr": "sum by(flavor) (idle_runners_count)", @@ -937,7 +937,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "fieldConfig": { "defaults": { @@ -1014,7 +1014,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "editorMode": "code", "expr": "sum by (flavor) (busy_runners_count)", @@ -1042,7 +1042,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "description": "The number of GitHub runners not found on GitHub but exists on cloud.", "fieldConfig": { @@ -1120,7 +1120,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "editorMode": "code", "expr": "sum by(juju_application) (increase(missing_runners_total[$__rate_interval]))", @@ -1135,7 +1135,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "description": "The number of VMs deleted during reconciliation.", "fieldConfig": { @@ -1213,7 +1213,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "editorMode": "code", "expr": "sum by(juju_application) (increase(deleted_vms_total[$__rate_interval]))", @@ -1228,7 +1228,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "description": "The number of GitHub runners without an underlying VM.", "fieldConfig": { @@ -1306,7 +1306,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "editorMode": "code", "expr": "sum by(juju_application) (increase(dangling_runners_total[$__rate_interval]))", @@ -1321,7 +1321,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "description": "The number of removed runners from GitHub during reconciliation.", "fieldConfig": { @@ -1399,7 +1399,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "editorMode": "builder", "expr": "sum by(juju_application) (increase(deleted_runners_total[$__rate_interval]))", @@ -1414,7 +1414,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "description": "The number of GitHub runners that are older than maximum creation time but has not yet come online nor taken a job.", "fieldConfig": { @@ -1492,7 +1492,7 @@ { "datasource": { "type": "prometheus", - "uid": "PE6731821AF182E02" + "uid": "${prometheusds}" }, "editorMode": "code", "expr": "sum by(juju_application) (increase(timed_out_runners_total[$__rate_interval]))", @@ -1511,6 +1511,29 @@ "tags": [], "templating": { "list": [ + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "hide": 0, + "includeAll": true, + "label": "Prometheus datasource", + "multi": true, + "name": "prometheusds", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, { "current": { "selected": false,