From 7cd071d54becb9bcf7b2ec4d521061a8d974a571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C4=81ris=20Pop=C4=93ns?= Date: Sun, 4 Oct 2026 20:53:39 +0300 Subject: [PATCH] chore(dashboard): size the runs-by-conclusion bars to the time range A fixed 1d step lines points up at 00:00 UTC, so the panel showed nothing for most of a day and only a bar or two on the default 24h view. Use $__interval with a 1h floor and ~30 bars instead. --- README.md | 2 +- dashboards/github-actions-runner-exporter.json | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b2eab5a..d25e2a4 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ images to GHCR with SLSA provenance attestation on push to `main`/tags. - runners online, offline and busy, with per-runner state timelines; - both exporter polls' health, so a stale cache is visible; - CI health per repo and workflow, open PRs, Dependabot alerts by severity, and the API rate limit; -- CI history: average and p95 run time per job, queue time per runner pool and per runner, and runs per day by conclusion. +- CI history: average and p95 run time per job, queue time per runner pool and per runner, and workflow runs by conclusion. Import it in Grafana (Dashboards → New → Import) and pick your Prometheus data source. diff --git a/dashboards/github-actions-runner-exporter.json b/dashboards/github-actions-runner-exporter.json index d7466e5..14a8a5a 100644 --- a/dashboards/github-actions-runner-exporter.json +++ b/dashboards/github-actions-runner-exporter.json @@ -8,7 +8,7 @@ "prometheus" ], "schemaVersion": 39, - "version": 4, + "version": 5, "editable": true, "time": { "from": "now-24h", @@ -1311,8 +1311,8 @@ }, { "id": 24, - "title": "Workflow runs per day by conclusion", - "description": "Completed workflow runs per day (each re-run attempt counts once).", + "title": "Workflow runs by conclusion", + "description": "Completed workflow runs per bar (each re-run attempt counts once). Bar width follows the time range, about 30 bars: hourly on 24h, ~6h on 7d, daily on 30d.", "type": "timeseries", "gridPos": { "x": 0, @@ -1473,14 +1473,15 @@ }, "targets": [ { - "expr": "sum by (conclusion) (increase(github_workflow_runs_total{repo=~\"$repo\"}[1d]))", + "expr": "sum by (conclusion) (increase(github_workflow_runs_total{repo=~\"$repo\"}[$__interval]))", "legendFormat": "{{conclusion}}", "refId": "A", - "interval": "1d", "range": true, "instant": false } - ] + ], + "interval": "1h", + "maxDataPoints": 30 } ] }