From 5b8d1dd54d97181fbb5e7fc67bdb56875365d279 Mon Sep 17 00:00:00 2001 From: iris Date: Wed, 7 Oct 2026 23:51:40 +0200 Subject: [PATCH] swarm-grafana: add a subscription usage line to the claude usage dashboard --- .../dashboards/claude-usage.json | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/nix/host-modules/swarm-grafana/dashboards/claude-usage.json b/nix/host-modules/swarm-grafana/dashboards/claude-usage.json index 541efcf4..57355056 100644 --- a/nix/host-modules/swarm-grafana/dashboards/claude-usage.json +++ b/nix/host-modules/swarm-grafana/dashboards/claude-usage.json @@ -992,6 +992,64 @@ "values": false } } + }, + { + "id": 44, + "type": "timeseries", + "title": "Subscription usage, highest window", + "description": "Highest subscription usage percent across all agents and windows.", + "datasource": { + "type": "prometheus", + "uid": "@datasourceUid@" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 39 + }, + "targets": [ + { + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "@datasourceUid@" + }, + "expr": "max({__name__=\"hyperhive.agent.claude_usage.percent\", hive=~\"$hive\", agent=~\"$agent\"})", + "legendFormat": "highest window" + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "min": 0, + "max": 100, + "color": { + "mode": "fixed", + "fixedColor": "orange" + }, + "custom": { + "drawStyle": "line", + "lineWidth": 1, + "fillOpacity": 10, + "showPoints": "never", + "spanNulls": false + } + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false, + "calcs": [] + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } } ] }