{ "title": "hyperhive \u00b7 swarm controller (jobq + vcs)", "uid": "hyperhive-swarm-controller", "description": "The swarm controller's job graph and the forge activity it sees.", "editable": true, "refresh": "1m", "schemaVersion": 39, "tags": ["hyperhive", "swarm", "controller", "jobq", "vcs"], "time": { "from": "now-24h", "to": "now" }, "timezone": "utc", "version": 1, "panels": [ { "id": 1, "type": "stat", "title": "Running nodes", "description": "Job nodes executing now, at any depth.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 4, "w": 6, "x": 0, "y": 0 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum({__name__=\"jobq.nodes\", \"service.name\"=\"swarm-controller\", state=\"Running\"}) or vector(0)", "instant": true, "legendFormat": "running" } ], "fieldConfig": { "defaults": { "unit": "short", "decimals": 0, "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "graphMode": "none", "colorMode": "value", "textMode": "value", "justifyMode": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false } } }, { "id": 2, "type": "stat", "title": "Pending nodes", "description": "Job nodes waiting on dependencies or resources.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 4, "w": 6, "x": 6, "y": 0 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum({__name__=\"jobq.nodes\", \"service.name\"=\"swarm-controller\", state=\"Pending\"}) or vector(0)", "instant": true, "legendFormat": "pending" } ], "fieldConfig": { "defaults": { "unit": "short", "decimals": 0, "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "graphMode": "none", "colorMode": "value", "textMode": "value", "justifyMode": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false } } }, { "id": 3, "type": "stat", "title": "Failed root groups", "description": "Root job groups in the Failed state.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 4, "w": 6, "x": 12, "y": 0 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum({__name__=\"jobq.roots\", \"service.name\"=\"swarm-controller\", state=\"Failed\"}) or vector(0)", "instant": true, "legendFormat": "failed" } ], "fieldConfig": { "defaults": { "unit": "short", "decimals": 0, "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 1 } ] } }, "overrides": [] }, "options": { "graphMode": "none", "colorMode": "value", "textMode": "value", "justifyMode": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false } }, "x-zero-is-healthy": true }, { "id": 4, "type": "stat", "title": "Pushes (range)", "description": "Push deliveries seen in the selected range.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 4, "w": 6, "x": 18, "y": 0 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum(increase({__name__=\"hyperhive.vcs.push.count\", \"service.name\"=\"swarm-controller\"}[$__range])) or vector(0)", "instant": true, "legendFormat": "pushes" } ], "fieldConfig": { "defaults": { "unit": "short", "decimals": 0, "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "graphMode": "none", "colorMode": "value", "textMode": "value", "justifyMode": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false } } }, { "id": 5, "type": "timeseries", "title": "Nodes by state", "description": "Job nodes at any depth, per lifecycle state.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 4 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum by (state) ({__name__=\"jobq.nodes\", \"service.name\"=\"swarm-controller\"})", "legendFormat": "{{state}}" } ], "fieldConfig": { "defaults": { "unit": "short", "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "lineWidth": 1, "fillOpacity": 10, "showPoints": "never", "spanNulls": false, "axisSoftMin": 0 } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true, "calcs": [] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 6, "type": "timeseries", "title": "Root groups by state", "description": "Root job groups, per lifecycle state.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 4 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum by (state) ({__name__=\"jobq.roots\", \"service.name\"=\"swarm-controller\"})", "legendFormat": "{{state}}" } ], "fieldConfig": { "defaults": { "unit": "short", "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "lineWidth": 1, "fillOpacity": 10, "showPoints": "never", "spanNulls": false, "axisSoftMin": 0 } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true, "calcs": [] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 7, "type": "timeseries", "title": "Pushes and commits", "description": "Push deliveries and commits per minute.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 12 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum(rate({__name__=\"hyperhive.vcs.push.count\", \"service.name\"=\"swarm-controller\"}[$__rate_interval])) * 60", "legendFormat": "pushes" }, { "refId": "B", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum(rate({__name__=\"hyperhive.vcs.commit.count\", \"service.name\"=\"swarm-controller\"}[$__rate_interval])) * 60", "legendFormat": "commits" } ], "fieldConfig": { "defaults": { "unit": "short", "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "lineWidth": 1, "fillOpacity": 10, "showPoints": "never", "spanNulls": false, "axisSoftMin": 0 } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true, "calcs": [] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 8, "type": "timeseries", "title": "Commits by repo", "description": "Commits per hour, per repository.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 12 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sort_desc(sum by (repo) (rate({__name__=\"hyperhive.vcs.commit.count\", \"service.name\"=\"swarm-controller\"}[$__rate_interval])) * 3600)", "legendFormat": "{{repo}}" } ], "fieldConfig": { "defaults": { "unit": "short", "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "lineWidth": 1, "fillOpacity": 10, "showPoints": "never", "spanNulls": false, "axisSoftMin": 0 } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true, "calcs": [] }, "tooltip": { "mode": "multi", "sort": "desc" } } } ] }