apiVersion: grafana.integreatly.org/v1beta1 kind: GrafanaDashboard metadata: name: garm spec: instanceSelector: matchLabels: dashboards: "grafana" json: | { "annotations": {"list": []}, "editable": true, "graphTooltip": 1, "panels": [ { "collapsed": false, "gridPos": {"h": 1, "w": 24, "x": 0, "y": 0}, "title": "GARM Runner Status", "type": "row" }, { "datasource": {"type": "prometheus"}, "fieldConfig": {"defaults": {"unit": "short", "thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}]}}}, "gridPos": {"h": 5, "w": 6, "x": 0, "y": 1}, "title": "Total Runners", "type": "stat", "targets": [{"expr": "count(garm_runner_status{cluster_environment=~\"$cluster_environment\"}) or vector(0)", "legendFormat": ""}] }, { "datasource": {"type": "prometheus"}, "fieldConfig": {"defaults": {"unit": "short", "thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}]}}}, "gridPos": {"h": 5, "w": 6, "x": 6, "y": 1}, "title": "Idle Runners", "type": "stat", "targets": [{"expr": "count(garm_runner_status{cluster_environment=~\"$cluster_environment\", status=\"idle\"}) or vector(0)", "legendFormat": ""}] }, { "datasource": {"type": "prometheus"}, "fieldConfig": {"defaults": {"unit": "short", "thresholds": {"mode": "absolute", "steps": [{"color": "yellow", "value": null}]}}}, "gridPos": {"h": 5, "w": 6, "x": 12, "y": 1}, "title": "Creating", "type": "stat", "targets": [{"expr": "count(garm_runner_status{cluster_environment=~\"$cluster_environment\", status=\"creating\"}) or vector(0)", "legendFormat": ""}] }, { "datasource": {"type": "prometheus"}, "fieldConfig": {"defaults": {"unit": "short", "thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}]}}}, "gridPos": {"h": 5, "w": 6, "x": 18, "y": 1}, "title": "Errors", "type": "stat", "targets": [{"expr": "sum(rate(garm_runner_errors_total{cluster_environment=~\"$cluster_environment\"}[5m])) or vector(0)", "legendFormat": ""}] }, { "collapsed": false, "gridPos": {"h": 1, "w": 24, "x": 0, "y": 6}, "title": "GitHub API Rate Limits", "type": "row" }, { "datasource": {"type": "prometheus"}, "fieldConfig": {"defaults": {"unit": "short", "min": 0}}, "gridPos": {"h": 8, "w": 12, "x": 0, "y": 7}, "title": "Rate Limit Remaining", "type": "timeseries", "targets": [{"expr": "garm_github_rate_limit_remaining{cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{cluster_environment}}"}] }, { "datasource": {"type": "prometheus"}, "fieldConfig": {"defaults": {"unit": "ops"}}, "gridPos": {"h": 8, "w": 12, "x": 12, "y": 7}, "title": "Runner Operations Rate", "type": "timeseries", "targets": [{"expr": "sum(rate(garm_runner_operations_total{cluster_environment=~\"$cluster_environment\"}[5m])) by (cluster_environment)", "legendFormat": "{{cluster_environment}}"}] }, { "collapsed": false, "gridPos": {"h": 1, "w": 24, "x": 0, "y": 15}, "title": "Runner Details", "type": "row" }, { "datasource": {"type": "prometheus"}, "fieldConfig": {"defaults": {"custom": {"filterable": true}}}, "gridPos": {"h": 8, "w": 24, "x": 0, "y": 16}, "title": "Runner Pool Status", "type": "table", "targets": [{"expr": "garm_runner_status{cluster_environment=~\"$cluster_environment\"}", "format": "table", "instant": true}], "transformations": [ {"id": "filterFieldsByName", "options": {"include": {"names": ["cluster_environment", "name", "status", "pool_owner", "pool_type", "provider"]}}}, {"id": "organize", "options": {"renameByName": {"cluster_environment": "Environment", "name": "Runner", "status": "Status", "pool_owner": "Pool Owner", "pool_type": "Type", "provider": "Provider"}}} ] } ], "schemaVersion": 39, "tags": ["edp", "garm", "ci-cd", "runners"], "templating": { "list": [ { "current": {"selected": true, "text": "All", "value": "$__all"}, "datasource": {"type": "prometheus"}, "definition": "label_values(garm_runner_status, cluster_environment)", "includeAll": true, "multi": true, "name": "cluster_environment", "label": "Environment", "query": "label_values(garm_runner_status, cluster_environment)", "refresh": 2, "sort": 1, "type": "query" } ] }, "time": {"from": "now-6h", "to": "now"}, "title": "GARM Runners", "uid": "edp-garm" }