Compare commits
1 changed files with 906 additions and 1542 deletions
|
|
@ -1,181 +1,87 @@
|
||||||
{
|
{
|
||||||
"apiVersion": "dashboard.grafana.app/v2beta1",
|
"uid": "hyperhive-agents",
|
||||||
"kind": "Dashboard",
|
|
||||||
"metadata": {
|
|
||||||
"name": "hyperhive-agents"
|
|
||||||
},
|
|
||||||
"spec": {
|
|
||||||
"title": "hyperhive · agents",
|
"title": "hyperhive · agents",
|
||||||
"description": "Per-agent view: resource usage from hive-c0re's container sampler, activity from Claude Code's own export. Renamed from 'overview' — every producer we have today is per-agent, so a genuine swarm overview has nothing cross-cutting to summarise yet and should be built last, not first. Metric names are the OTLP DOTTED form, so every query uses the {__name__=\"...\"} selector — the underscore spelling matches nothing in this store. Cost/token totals use increase(), which is correct here: the claude_code.* counters are cumulative (forced in nix/agent-modules/otel.nix) but reset once per turn, since each turn is a new claude process.",
|
"description": "Per-agent view: resource usage from hive-c0re's container sampler, activity from Claude Code's own export. Renamed from 'overview' — every producer we have today is per-agent, so a genuine swarm overview has nothing cross-cutting to summarise yet and should be built last, not first. Metric names are the OTLP DOTTED form, so every query uses the {__name__=\"...\"} selector — the underscore spelling matches nothing in this store. Cost/token totals use increase(), which is correct here: the claude_code.* counters are cumulative (forced in nix/agent-modules/otel.nix) but reset once per turn, since each turn is a new claude process.",
|
||||||
"editable": true,
|
|
||||||
"cursorSync": "Off",
|
|
||||||
"liveNow": false,
|
|
||||||
"preload": false,
|
|
||||||
"tags": ["hyperhive", "agents"],
|
"tags": ["hyperhive", "agents"],
|
||||||
"links": [],
|
|
||||||
"annotations": [
|
|
||||||
{
|
|
||||||
"kind": "AnnotationQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "grafana",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
|
||||||
"name": "-- Grafana --"
|
|
||||||
},
|
|
||||||
"spec": {}
|
|
||||||
},
|
|
||||||
"enable": true,
|
|
||||||
"hide": true,
|
|
||||||
"iconColor": "rgba(0, 211, 255, 1)",
|
|
||||||
"name": "Annotations & Alerts",
|
|
||||||
"builtIn": true,
|
|
||||||
"legacyOptions": {
|
|
||||||
"type": "dashboard"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"kind": "QueryVariable",
|
|
||||||
"spec": {
|
|
||||||
"name": "hive",
|
|
||||||
"current": {
|
|
||||||
"text": "All",
|
|
||||||
"value": "$__all"
|
|
||||||
},
|
|
||||||
"label": "Hive",
|
|
||||||
"hide": "dontHide",
|
|
||||||
"refresh": "onTimeRangeChanged",
|
|
||||||
"skipUrlSync": false,
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
|
||||||
"name": "@datasourceUid@"
|
|
||||||
},
|
|
||||||
"spec": {
|
|
||||||
"__legacyStringValue": "label_values({__name__=\"hyperhive.container.cpu.percent\"}, hive)"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"regex": "",
|
|
||||||
"sort": "alphabeticalAsc",
|
|
||||||
"options": [],
|
|
||||||
"multi": true,
|
|
||||||
"includeAll": true,
|
|
||||||
"allValue": ".*",
|
|
||||||
"allowCustomValue": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "QueryVariable",
|
|
||||||
"spec": {
|
|
||||||
"name": "agent",
|
|
||||||
"current": {
|
|
||||||
"text": "All",
|
|
||||||
"value": "$__all"
|
|
||||||
},
|
|
||||||
"label": "Agent",
|
|
||||||
"hide": "dontHide",
|
|
||||||
"refresh": "onTimeRangeChanged",
|
|
||||||
"skipUrlSync": false,
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
|
||||||
"name": "@datasourceUid@"
|
|
||||||
},
|
|
||||||
"spec": {
|
|
||||||
"__legacyStringValue": "label_values({__name__=\"hyperhive.container.cpu.percent\", hive=~\"$hive\"}, agent)"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"regex": "",
|
|
||||||
"sort": "alphabeticalAsc",
|
|
||||||
"options": [],
|
|
||||||
"multi": true,
|
|
||||||
"includeAll": true,
|
|
||||||
"allValue": ".*",
|
|
||||||
"allowCustomValue": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"timeSettings": {
|
|
||||||
"timezone": "utc",
|
"timezone": "utc",
|
||||||
|
"schemaVersion": 39,
|
||||||
|
"version": 2,
|
||||||
|
"editable": true,
|
||||||
|
"refresh": "1m",
|
||||||
|
"time": {
|
||||||
"from": "now-6h",
|
"from": "now-6h",
|
||||||
"to": "now",
|
"to": "now"
|
||||||
"autoRefresh": "1m",
|
|
||||||
"autoRefreshIntervals": [
|
|
||||||
"5s",
|
|
||||||
"10s",
|
|
||||||
"30s",
|
|
||||||
"1m",
|
|
||||||
"5m",
|
|
||||||
"15m",
|
|
||||||
"30m",
|
|
||||||
"1h",
|
|
||||||
"2h",
|
|
||||||
"1d"
|
|
||||||
],
|
|
||||||
"hideTimepicker": false,
|
|
||||||
"fiscalYearStartMonth": 0
|
|
||||||
},
|
},
|
||||||
"elements": {
|
"templating": {
|
||||||
"panel-1": {
|
"list": [
|
||||||
"kind": "Panel",
|
{
|
||||||
"spec": {
|
"name": "hive",
|
||||||
|
"label": "Hive",
|
||||||
|
"type": "query",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"query": "label_values({__name__=\"hyperhive.container.cpu.percent\"}, hive)",
|
||||||
|
"refresh": 2,
|
||||||
|
"includeAll": true,
|
||||||
|
"allValue": ".*",
|
||||||
|
"multi": true,
|
||||||
|
"current": {
|
||||||
|
"text": "All",
|
||||||
|
"value": "$__all"
|
||||||
|
},
|
||||||
|
"sort": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "agent",
|
||||||
|
"label": "Agent",
|
||||||
|
"type": "query",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"query": "label_values({__name__=\"hyperhive.container.cpu.percent\", hive=~\"$hive\"}, agent)",
|
||||||
|
"refresh": 2,
|
||||||
|
"includeAll": true,
|
||||||
|
"allValue": ".*",
|
||||||
|
"multi": true,
|
||||||
|
"current": {
|
||||||
|
"text": "All",
|
||||||
|
"value": "$__all"
|
||||||
|
},
|
||||||
|
"sort": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"panels": [
|
||||||
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
|
"type": "stat",
|
||||||
"title": "Agents reporting",
|
"title": "Agents reporting",
|
||||||
"description": "Distinct agents whose container metrics reached the store in the selected range. This counts what hive-c0re observes, not what the topology declares — a gap between the two is the interesting case.",
|
"description": "Distinct agents whose container metrics reached the store in the selected range. This counts what hive-c0re observes, not what the topology declares — a gap between the two is the interesting case.",
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"name": "@datasourceUid@"
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 4,
|
||||||
|
"w": 6,
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
},
|
},
|
||||||
"spec": {
|
|
||||||
"expr": "count(count by (agent) ({__name__=\"hyperhive.container.cpu.percent\", hive=~\"$hive\", agent=~\"$agent\"}))",
|
"expr": "count(count by (agent) ({__name__=\"hyperhive.container.cpu.percent\", hive=~\"$hive\", agent=~\"$agent\"}))",
|
||||||
"instant": true,
|
"instant": true,
|
||||||
"legendFormat": "agents"
|
"legendFormat": "agents"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "stat",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
|
||||||
"colorMode": "value",
|
|
||||||
"graphMode": "none",
|
|
||||||
"justifyMode": "auto",
|
|
||||||
"reduceOptions": {
|
|
||||||
"calcs": ["lastNotNull"],
|
|
||||||
"fields": "",
|
|
||||||
"values": false
|
|
||||||
},
|
|
||||||
"textMode": "value"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "short",
|
"unit": "short",
|
||||||
|
|
@ -183,68 +89,200 @@
|
||||||
"color": {
|
"color": {
|
||||||
"mode": "fixed",
|
"mode": "fixed",
|
||||||
"fixedColor": "text"
|
"fixedColor": "text"
|
||||||
}
|
},
|
||||||
|
"mappings": []
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
}
|
},
|
||||||
}
|
"options": {
|
||||||
|
"graphMode": "none",
|
||||||
|
"colorMode": "value",
|
||||||
|
"textMode": "value",
|
||||||
|
"justifyMode": "auto",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": ["lastNotNull"],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"panel-10": {
|
{
|
||||||
"kind": "Panel",
|
"id": 2,
|
||||||
"spec": {
|
"type": "stat",
|
||||||
|
"title": "Cost",
|
||||||
|
"description": "sum(increase(claude_code.cost.usage)). Agent-reported, so it covers claude's own token spend only — nothing else in the swarm reports cost.",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 4,
|
||||||
|
"w": 6,
|
||||||
|
"x": 6,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"expr": "sum(increase({__name__=\"claude_code.cost.usage\", hive=~\"$hive\", agent=~\"$agent\"}[$__range]))",
|
||||||
|
"instant": true,
|
||||||
|
"legendFormat": "cost"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"unit": "currencyUSD",
|
||||||
|
"decimals": 2,
|
||||||
|
"color": {
|
||||||
|
"mode": "fixed",
|
||||||
|
"fixedColor": "text"
|
||||||
|
},
|
||||||
|
"mappings": []
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"graphMode": "none",
|
||||||
|
"colorMode": "value",
|
||||||
|
"textMode": "value",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": ["lastNotNull"],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"type": "stat",
|
||||||
|
"title": "Tokens (excl. cache reads)",
|
||||||
|
"description": "Excludes type=cacheRead, which would otherwise BE this number: measured over 6h on this store, cacheRead was 273.5M of 275.8M total — 99.2%. Counting it makes the tile a cache-hit-rate readout wearing a token label, and it drowns the input/output volume that actually tracks work done. Remaining types: input, output, cacheCreation.",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 4,
|
||||||
|
"w": 6,
|
||||||
|
"x": 12,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"expr": "sum(increase({__name__=\"claude_code.token.usage\", hive=~\"$hive\", agent=~\"$agent\", type!=\"cacheRead\"}[$__range]))",
|
||||||
|
"instant": true,
|
||||||
|
"legendFormat": "tokens"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"unit": "short",
|
||||||
|
"decimals": 1,
|
||||||
|
"color": {
|
||||||
|
"mode": "fixed",
|
||||||
|
"fixedColor": "text"
|
||||||
|
},
|
||||||
|
"mappings": []
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"graphMode": "none",
|
||||||
|
"colorMode": "value",
|
||||||
|
"textMode": "value",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": ["lastNotNull"],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"type": "stat",
|
||||||
|
"title": "CLI sessions started",
|
||||||
|
"description": "claude_code.session.count counts CLI STARTS, and the harness starts one claude process per turn — so this reads as turns, not as long-lived sessions. Named for what it measures rather than what the metric is called.",
|
||||||
|
"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__=\"claude_code.session.count\", hive=~\"$hive\", agent=~\"$agent\"}[$__range]))",
|
||||||
|
"instant": true,
|
||||||
|
"legendFormat": "sessions"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"unit": "short",
|
||||||
|
"decimals": 0,
|
||||||
|
"color": {
|
||||||
|
"mode": "fixed",
|
||||||
|
"fixedColor": "text"
|
||||||
|
},
|
||||||
|
"mappings": []
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"graphMode": "none",
|
||||||
|
"colorMode": "value",
|
||||||
|
"textMode": "value",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": ["lastNotNull"],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"id": 10,
|
"id": 10,
|
||||||
|
"type": "timeseries",
|
||||||
"title": "Cost rate by agent",
|
"title": "Cost rate by agent",
|
||||||
"description": "USD per hour, from rate() over the cumulative counter — reset-safe. A flat line at zero is an idle agent, not a broken exporter; check the CPU panel to tell them apart.\n\nThe 10m minimum step is load-bearing, not a style choice: agents export every 60s, and measured against this store a rate window of 1m or 2m resolves ONE agent instead of five. Any shorter and the panel quietly under-reports.",
|
"description": "USD per hour, from rate() over the cumulative counter — reset-safe. A flat line at zero is an idle agent, not a broken exporter; check the CPU panel to tell them apart.\n\nThe 10m minimum step is load-bearing, not a style choice: agents export every 60s, and measured against this store a rate window of 1m or 2m resolves ONE agent instead of five. Any shorter and the panel quietly under-reports.",
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"name": "@datasourceUid@"
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"interval": "10m",
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 4
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
},
|
},
|
||||||
"spec": {
|
|
||||||
"expr": "sum by (agent) (rate({__name__=\"claude_code.cost.usage\", hive=~\"$hive\", agent=~\"$agent\"}[$__rate_interval])) * 3600",
|
"expr": "sum by (agent) (rate({__name__=\"claude_code.cost.usage\", hive=~\"$hive\", agent=~\"$agent\"}[$__rate_interval])) * 3600",
|
||||||
"legendFormat": "{{agent}}"
|
"legendFormat": "{{agent}}"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {
|
|
||||||
"interval": "10m"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "timeseries",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "multi",
|
|
||||||
"sort": "desc"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "currencyUSD",
|
"unit": "currencyUSD",
|
||||||
|
|
@ -253,72 +291,55 @@
|
||||||
"mode": "palette-classic"
|
"mode": "palette-classic"
|
||||||
},
|
},
|
||||||
"custom": {
|
"custom": {
|
||||||
"axisSoftMin": 0,
|
|
||||||
"drawStyle": "line",
|
"drawStyle": "line",
|
||||||
"fillOpacity": 0,
|
|
||||||
"lineWidth": 1,
|
"lineWidth": 1,
|
||||||
|
"fillOpacity": 0,
|
||||||
"showPoints": "never",
|
"showPoints": "never",
|
||||||
"spanNulls": false
|
"spanNulls": false,
|
||||||
|
"axisSoftMin": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"panel-11": {
|
|
||||||
"kind": "Panel",
|
|
||||||
"spec": {
|
|
||||||
"id": 11,
|
|
||||||
"title": "Container CPU by agent",
|
|
||||||
"description": "hyperhive.container.cpu.percent, sampled by hive-c0re. Percent of one core.",
|
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
|
||||||
"name": "@datasourceUid@"
|
|
||||||
},
|
|
||||||
"spec": {
|
|
||||||
"expr": "sum by (agent) ({__name__=\"hyperhive.container.cpu.percent\", hive=~\"$hive\", agent=~\"$agent\"})",
|
|
||||||
"legendFormat": "{{agent}}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "timeseries",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
"options": {
|
||||||
"legend": {
|
"legend": {
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
"displayMode": "list",
|
||||||
"placement": "bottom",
|
"placement": "bottom",
|
||||||
"showLegend": true
|
"showLegend": true,
|
||||||
|
"calcs": []
|
||||||
},
|
},
|
||||||
"tooltip": {
|
"tooltip": {
|
||||||
"mode": "multi",
|
"mode": "multi",
|
||||||
"sort": "desc"
|
"sort": "desc"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": 11,
|
||||||
|
"type": "timeseries",
|
||||||
|
"title": "Container CPU by agent",
|
||||||
|
"description": "hyperhive.container.cpu.percent, sampled by hive-c0re. Percent of one core.",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 12
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"expr": "sum by (agent) ({__name__=\"hyperhive.container.cpu.percent\", hive=~\"$hive\", agent=~\"$agent\"})",
|
||||||
|
"legendFormat": "{{agent}}"
|
||||||
|
}
|
||||||
|
],
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "percent",
|
"unit": "percent",
|
||||||
|
|
@ -327,138 +348,54 @@
|
||||||
"mode": "palette-classic"
|
"mode": "palette-classic"
|
||||||
},
|
},
|
||||||
"custom": {
|
"custom": {
|
||||||
"axisSoftMin": 0,
|
|
||||||
"drawStyle": "line",
|
"drawStyle": "line",
|
||||||
"fillOpacity": 0,
|
|
||||||
"lineWidth": 1,
|
"lineWidth": 1,
|
||||||
|
"fillOpacity": 0,
|
||||||
"showPoints": "never",
|
"showPoints": "never",
|
||||||
"spanNulls": false
|
"spanNulls": false,
|
||||||
|
"axisSoftMin": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"panel-2": {
|
|
||||||
"kind": "Panel",
|
|
||||||
"spec": {
|
|
||||||
"id": 2,
|
|
||||||
"title": "Cost",
|
|
||||||
"description": "sum(increase(claude_code.cost.usage)). Agent-reported, so it covers claude's own token spend only — nothing else in the swarm reports cost.",
|
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
|
||||||
"name": "@datasourceUid@"
|
|
||||||
},
|
|
||||||
"spec": {
|
|
||||||
"expr": "sum(increase({__name__=\"claude_code.cost.usage\", hive=~\"$hive\", agent=~\"$agent\"}[$__range]))",
|
|
||||||
"instant": true,
|
|
||||||
"legendFormat": "cost"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "stat",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
|
||||||
"colorMode": "value",
|
|
||||||
"graphMode": "none",
|
|
||||||
"reduceOptions": {
|
|
||||||
"calcs": ["lastNotNull"],
|
|
||||||
"fields": "",
|
|
||||||
"values": false
|
|
||||||
},
|
|
||||||
"textMode": "value"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"unit": "currencyUSD",
|
|
||||||
"decimals": 2,
|
|
||||||
"color": {
|
|
||||||
"mode": "fixed",
|
|
||||||
"fixedColor": "text"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"panel-20": {
|
|
||||||
"kind": "Panel",
|
|
||||||
"spec": {
|
|
||||||
"id": 20,
|
|
||||||
"title": "Container memory by agent",
|
|
||||||
"description": "",
|
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
|
||||||
"name": "@datasourceUid@"
|
|
||||||
},
|
|
||||||
"spec": {
|
|
||||||
"expr": "sum by (agent) ({__name__=\"container.memory.usage\", hive=~\"$hive\", agent=~\"$agent\"})",
|
|
||||||
"legendFormat": "{{agent}}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "timeseries",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
"options": {
|
||||||
"legend": {
|
"legend": {
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
"displayMode": "list",
|
||||||
"placement": "bottom",
|
"placement": "bottom",
|
||||||
"showLegend": true
|
"showLegend": true,
|
||||||
|
"calcs": []
|
||||||
},
|
},
|
||||||
"tooltip": {
|
"tooltip": {
|
||||||
"mode": "multi",
|
"mode": "multi",
|
||||||
"sort": "desc"
|
"sort": "desc"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": 20,
|
||||||
|
"type": "timeseries",
|
||||||
|
"title": "Container memory by agent",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 12
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"expr": "sum by (agent) ({__name__=\"container.memory.usage\", hive=~\"$hive\", agent=~\"$agent\"})",
|
||||||
|
"legendFormat": "{{agent}}"
|
||||||
|
}
|
||||||
|
],
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "bytes",
|
"unit": "bytes",
|
||||||
|
|
@ -466,74 +403,56 @@
|
||||||
"mode": "palette-classic"
|
"mode": "palette-classic"
|
||||||
},
|
},
|
||||||
"custom": {
|
"custom": {
|
||||||
"axisSoftMin": 0,
|
|
||||||
"drawStyle": "line",
|
"drawStyle": "line",
|
||||||
"fillOpacity": 0,
|
|
||||||
"lineWidth": 1,
|
"lineWidth": 1,
|
||||||
|
"fillOpacity": 0,
|
||||||
"showPoints": "never",
|
"showPoints": "never",
|
||||||
"spanNulls": false
|
"spanNulls": false,
|
||||||
|
"axisSoftMin": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"panel-21": {
|
|
||||||
"kind": "Panel",
|
|
||||||
"spec": {
|
|
||||||
"id": 21,
|
|
||||||
"title": "Tokens by model (excl. cache reads)",
|
|
||||||
"description": "Split by model rather than by agent on purpose — 'which model is the spend on' is the question this answers. Excludes type=cacheRead for the same reason as the tile above: at ~99% of volume it flattens every model into one line shaped like its cache. 10m minimum step for the same reason as the cost-rate panel.",
|
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
|
||||||
"name": "@datasourceUid@"
|
|
||||||
},
|
|
||||||
"spec": {
|
|
||||||
"expr": "sum by (model) (rate({__name__=\"claude_code.token.usage\", hive=~\"$hive\", agent=~\"$agent\", type!=\"cacheRead\"}[$__rate_interval])) * 60",
|
|
||||||
"legendFormat": "{{model}}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {
|
|
||||||
"interval": "10m"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "timeseries",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
"options": {
|
||||||
"legend": {
|
"legend": {
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
"displayMode": "list",
|
||||||
"placement": "bottom",
|
"placement": "bottom",
|
||||||
"showLegend": true
|
"showLegend": true,
|
||||||
|
"calcs": []
|
||||||
},
|
},
|
||||||
"tooltip": {
|
"tooltip": {
|
||||||
"mode": "multi",
|
"mode": "multi",
|
||||||
"sort": "desc"
|
"sort": "desc"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": 21,
|
||||||
|
"type": "timeseries",
|
||||||
|
"title": "Tokens by model (excl. cache reads)",
|
||||||
|
"description": "Split by model rather than by agent on purpose — 'which model is the spend on' is the question this answers. Excludes type=cacheRead for the same reason as the tile above: at ~99% of volume it flattens every model into one line shaped like its cache. 10m minimum step for the same reason as the cost-rate panel.",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"interval": "10m",
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 4
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"expr": "sum by (model) (rate({__name__=\"claude_code.token.usage\", hive=~\"$hive\", agent=~\"$agent\", type!=\"cacheRead\"}[$__rate_interval])) * 60",
|
||||||
|
"legendFormat": "{{model}}"
|
||||||
|
}
|
||||||
|
],
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "short",
|
"unit": "short",
|
||||||
|
|
@ -542,215 +461,114 @@
|
||||||
"mode": "palette-classic"
|
"mode": "palette-classic"
|
||||||
},
|
},
|
||||||
"custom": {
|
"custom": {
|
||||||
"axisSoftMin": 0,
|
|
||||||
"drawStyle": "line",
|
"drawStyle": "line",
|
||||||
"fillOpacity": 0,
|
|
||||||
"lineWidth": 1,
|
"lineWidth": 1,
|
||||||
|
"fillOpacity": 0,
|
||||||
"showPoints": "never",
|
"showPoints": "never",
|
||||||
"spanNulls": false
|
"spanNulls": false,
|
||||||
|
"axisSoftMin": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"panel-3": {
|
|
||||||
"kind": "Panel",
|
|
||||||
"spec": {
|
|
||||||
"id": 3,
|
|
||||||
"title": "Tokens (excl. cache reads)",
|
|
||||||
"description": "Excludes type=cacheRead, which would otherwise BE this number: measured over 6h on this store, cacheRead was 273.5M of 275.8M total — 99.2%. Counting it makes the tile a cache-hit-rate readout wearing a token label, and it drowns the input/output volume that actually tracks work done. Remaining types: input, output, cacheCreation.",
|
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
|
||||||
"name": "@datasourceUid@"
|
|
||||||
},
|
|
||||||
"spec": {
|
|
||||||
"expr": "sum(increase({__name__=\"claude_code.token.usage\", hive=~\"$hive\", agent=~\"$agent\", type!=\"cacheRead\"}[$__range]))",
|
|
||||||
"instant": true,
|
|
||||||
"legendFormat": "tokens"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "stat",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
"options": {
|
||||||
"colorMode": "value",
|
"legend": {
|
||||||
"graphMode": "none",
|
"displayMode": "list",
|
||||||
"reduceOptions": {
|
"placement": "bottom",
|
||||||
"calcs": ["lastNotNull"],
|
"showLegend": true,
|
||||||
"fields": "",
|
"calcs": []
|
||||||
"values": false
|
|
||||||
},
|
},
|
||||||
"textMode": "value"
|
"tooltip": {
|
||||||
},
|
"mode": "multi",
|
||||||
"fieldConfig": {
|
"sort": "desc"
|
||||||
"defaults": {
|
|
||||||
"unit": "short",
|
|
||||||
"decimals": 1,
|
|
||||||
"color": {
|
|
||||||
"mode": "fixed",
|
|
||||||
"fixedColor": "text"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"panel-30": {
|
{
|
||||||
"kind": "Panel",
|
|
||||||
"spec": {
|
|
||||||
"id": 30,
|
"id": 30,
|
||||||
|
"type": "bargauge",
|
||||||
"title": "Container storage by agent",
|
"title": "Container storage by agent",
|
||||||
"description": "Magnitude comparison, so a bar rather than seven lines. One fixed colour on purpose: the agents are nominal categories, and colouring them by size would encode the bar length twice.",
|
"description": "Magnitude comparison, so a bar rather than seven lines. One fixed colour on purpose: the agents are nominal categories, and colouring them by size would encode the bar length twice.",
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"name": "@datasourceUid@"
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 7,
|
||||||
|
"w": 8,
|
||||||
|
"x": 0,
|
||||||
|
"y": 20
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
},
|
},
|
||||||
"spec": {
|
|
||||||
"expr": "sum by (agent) ({__name__=\"hyperhive.container.storage.usage\", hive=~\"$hive\", agent=~\"$agent\"})",
|
"expr": "sum by (agent) ({__name__=\"hyperhive.container.storage.usage\", hive=~\"$hive\", agent=~\"$agent\"})",
|
||||||
"instant": true,
|
"instant": true,
|
||||||
"legendFormat": "{{agent}}"
|
"legendFormat": "{{agent}}"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "bargauge",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
|
||||||
"displayMode": "basic",
|
|
||||||
"orientation": "horizontal",
|
|
||||||
"reduceOptions": {
|
|
||||||
"calcs": ["lastNotNull"],
|
|
||||||
"fields": "",
|
|
||||||
"values": false
|
|
||||||
},
|
|
||||||
"showUnfilled": true,
|
|
||||||
"valueMode": "text"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "bytes",
|
"unit": "bytes",
|
||||||
|
"color": {
|
||||||
|
"mode": "fixed",
|
||||||
|
"fixedColor": "blue"
|
||||||
|
},
|
||||||
"thresholds": {
|
"thresholds": {
|
||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"value": null,
|
"color": "blue",
|
||||||
"color": "blue"
|
"value": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"color": {
|
|
||||||
"mode": "fixed",
|
|
||||||
"fixedColor": "blue"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
}
|
},
|
||||||
}
|
"options": {
|
||||||
|
"displayMode": "basic",
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"showUnfilled": true,
|
||||||
|
"valueMode": "text",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": ["lastNotNull"],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"panel-31": {
|
{
|
||||||
"kind": "Panel",
|
|
||||||
"spec": {
|
|
||||||
"id": 31,
|
"id": 31,
|
||||||
|
"type": "timeseries",
|
||||||
"title": "Lines of code changed",
|
"title": "Lines of code changed",
|
||||||
"description": "claude_code.lines_of_code.count carries a `type` label (added / removed). 10m minimum step for the same reason as the cost-rate panel.",
|
"description": "claude_code.lines_of_code.count carries a `type` label (added / removed). 10m minimum step for the same reason as the cost-rate panel.",
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"name": "@datasourceUid@"
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"interval": "10m",
|
||||||
|
"gridPos": {
|
||||||
|
"h": 7,
|
||||||
|
"w": 8,
|
||||||
|
"x": 8,
|
||||||
|
"y": 20
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
},
|
},
|
||||||
"spec": {
|
|
||||||
"expr": "sum by (type) (rate({__name__=\"claude_code.lines_of_code.count\", hive=~\"$hive\", agent=~\"$agent\"}[$__rate_interval])) * 60",
|
"expr": "sum by (type) (rate({__name__=\"claude_code.lines_of_code.count\", hive=~\"$hive\", agent=~\"$agent\"}[$__rate_interval])) * 60",
|
||||||
"legendFormat": "{{type}}"
|
"legendFormat": "{{type}}"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {
|
|
||||||
"interval": "10m"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "timeseries",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "multi",
|
|
||||||
"sort": "desc"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "short",
|
"unit": "short",
|
||||||
|
|
@ -759,148 +577,114 @@
|
||||||
"mode": "palette-classic"
|
"mode": "palette-classic"
|
||||||
},
|
},
|
||||||
"custom": {
|
"custom": {
|
||||||
"axisSoftMin": 0,
|
|
||||||
"drawStyle": "line",
|
"drawStyle": "line",
|
||||||
"fillOpacity": 0,
|
|
||||||
"lineWidth": 1,
|
"lineWidth": 1,
|
||||||
|
"fillOpacity": 0,
|
||||||
"showPoints": "never",
|
"showPoints": "never",
|
||||||
"spanNulls": false
|
"spanNulls": false,
|
||||||
|
"axisSoftMin": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
}
|
},
|
||||||
}
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"displayMode": "list",
|
||||||
|
"placement": "bottom",
|
||||||
|
"showLegend": true,
|
||||||
|
"calcs": []
|
||||||
|
},
|
||||||
|
"tooltip": {
|
||||||
|
"mode": "multi",
|
||||||
|
"sort": "desc"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"panel-32": {
|
{
|
||||||
"kind": "Panel",
|
|
||||||
"spec": {
|
|
||||||
"id": 32,
|
"id": 32,
|
||||||
|
"type": "bargauge",
|
||||||
"title": "Active time by agent",
|
"title": "Active time by agent",
|
||||||
"description": "claude_code.active_time.total — seconds an agent was actually working, not wall-clock uptime.",
|
"description": "claude_code.active_time.total — seconds an agent was actually working, not wall-clock uptime.",
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"name": "@datasourceUid@"
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 7,
|
||||||
|
"w": 8,
|
||||||
|
"x": 16,
|
||||||
|
"y": 20
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
},
|
},
|
||||||
"spec": {
|
|
||||||
"expr": "sum by (agent) (increase({__name__=\"claude_code.active_time.total\", hive=~\"$hive\", agent=~\"$agent\"}[$__range]))",
|
"expr": "sum by (agent) (increase({__name__=\"claude_code.active_time.total\", hive=~\"$hive\", agent=~\"$agent\"}[$__range]))",
|
||||||
"instant": true,
|
"instant": true,
|
||||||
"legendFormat": "{{agent}}"
|
"legendFormat": "{{agent}}"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "bargauge",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
|
||||||
"displayMode": "basic",
|
|
||||||
"orientation": "horizontal",
|
|
||||||
"reduceOptions": {
|
|
||||||
"calcs": ["lastNotNull"],
|
|
||||||
"fields": "",
|
|
||||||
"values": false
|
|
||||||
},
|
|
||||||
"showUnfilled": true,
|
|
||||||
"valueMode": "text"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "s",
|
"unit": "s",
|
||||||
"decimals": 0,
|
"decimals": 0,
|
||||||
|
"color": {
|
||||||
|
"mode": "fixed",
|
||||||
|
"fixedColor": "purple"
|
||||||
|
},
|
||||||
"thresholds": {
|
"thresholds": {
|
||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"value": null,
|
"color": "purple",
|
||||||
"color": "purple"
|
"value": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"color": {
|
|
||||||
"mode": "fixed",
|
|
||||||
"fixedColor": "purple"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
}
|
},
|
||||||
}
|
"options": {
|
||||||
|
"displayMode": "basic",
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"showUnfilled": true,
|
||||||
|
"valueMode": "text",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": ["lastNotNull"],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"panel-33": {
|
{
|
||||||
"kind": "Panel",
|
|
||||||
"spec": {
|
|
||||||
"id": 33,
|
"id": 33,
|
||||||
|
"type": "timeseries",
|
||||||
"title": "CLAUDE.md size by agent",
|
"title": "CLAUDE.md size by agent",
|
||||||
"description": "hyperhive.agent.claude_md.lines over time — mara: \"i want to see it over time\" (a bargauge snapshot in an earlier round of this panel only showed the current count). A continuously-live gauge, not a per-turn counter, so this is the raw value plotted across the range, same treatment as the CPU/memory-by-agent panels above rather than a rate()/increase(). The harness itself raises a loose-ends todo past 500 lines suggesting a trim, not a hard limit — this panel is visibility, not an alarm.",
|
"description": "hyperhive.agent.claude_md.lines over time — mara: \"i want to see it over time\" (a bargauge snapshot in an earlier round of this panel only showed the current count). A continuously-live gauge, not a per-turn counter, so this is the raw value plotted across the range, same treatment as the CPU/memory-by-agent panels above rather than a rate()/increase(). The harness itself raises a loose-ends todo past 500 lines suggesting a trim, not a hard limit — this panel is visibility, not an alarm.",
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"name": "@datasourceUid@"
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 27
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
},
|
},
|
||||||
"spec": {
|
|
||||||
"expr": "sum by (agent) ({__name__=\"hyperhive.agent.claude_md.lines\", hive=~\"$hive\", agent=~\"$agent\"})",
|
"expr": "sum by (agent) ({__name__=\"hyperhive.agent.claude_md.lines\", hive=~\"$hive\", agent=~\"$agent\"})",
|
||||||
"legendFormat": "{{agent}}"
|
"legendFormat": "{{agent}}"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "timeseries",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom",
|
|
||||||
"showLegend": true
|
|
||||||
},
|
|
||||||
"tooltip": {
|
|
||||||
"mode": "multi",
|
|
||||||
"sort": "desc"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "short",
|
"unit": "short",
|
||||||
|
|
@ -909,137 +693,56 @@
|
||||||
"mode": "palette-classic"
|
"mode": "palette-classic"
|
||||||
},
|
},
|
||||||
"custom": {
|
"custom": {
|
||||||
"axisSoftMin": 0,
|
|
||||||
"drawStyle": "line",
|
"drawStyle": "line",
|
||||||
"fillOpacity": 0,
|
|
||||||
"lineWidth": 1,
|
"lineWidth": 1,
|
||||||
|
"fillOpacity": 0,
|
||||||
"showPoints": "never",
|
"showPoints": "never",
|
||||||
"spanNulls": false
|
"spanNulls": false,
|
||||||
|
"axisSoftMin": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"panel-4": {
|
|
||||||
"kind": "Panel",
|
|
||||||
"spec": {
|
|
||||||
"id": 4,
|
|
||||||
"title": "CLI sessions started",
|
|
||||||
"description": "claude_code.session.count counts CLI STARTS, and the harness starts one claude process per turn — so this reads as turns, not as long-lived sessions. Named for what it measures rather than what the metric is called.",
|
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
|
||||||
"name": "@datasourceUid@"
|
|
||||||
},
|
|
||||||
"spec": {
|
|
||||||
"expr": "sum(increase({__name__=\"claude_code.session.count\", hive=~\"$hive\", agent=~\"$agent\"}[$__range]))",
|
|
||||||
"instant": true,
|
|
||||||
"legendFormat": "sessions"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "stat",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
"options": {
|
||||||
"colorMode": "value",
|
"legend": {
|
||||||
"graphMode": "none",
|
"displayMode": "list",
|
||||||
"reduceOptions": {
|
"placement": "bottom",
|
||||||
"calcs": ["lastNotNull"],
|
"showLegend": true,
|
||||||
"fields": "",
|
"calcs": []
|
||||||
"values": false
|
|
||||||
},
|
},
|
||||||
"textMode": "value"
|
"tooltip": {
|
||||||
},
|
"mode": "multi",
|
||||||
"fieldConfig": {
|
"sort": "desc"
|
||||||
"defaults": {
|
|
||||||
"unit": "short",
|
|
||||||
"decimals": 0,
|
|
||||||
"color": {
|
|
||||||
"mode": "fixed",
|
|
||||||
"fixedColor": "text"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"panel-40": {
|
{
|
||||||
"kind": "Panel",
|
|
||||||
"spec": {
|
|
||||||
"id": 40,
|
"id": 40,
|
||||||
|
"type": "stat",
|
||||||
"title": "Subagent cost",
|
"title": "Subagent cost",
|
||||||
"description": "sum(increase(claude_code.cost.usage{subagent!=\"\"})). `hive-subagent-mcp` stamps a `subagent=<name>` resource attribute (alongside the parent's own `agent=<name>`) on every claude_code.* sample a spawned subagent turn emits — this label already existed, it just wasn't plotted anywhere.",
|
"description": "sum(increase(claude_code.cost.usage{subagent!=\"\"})). `hive-subagent-mcp` stamps a `subagent=<name>` resource attribute (alongside the parent's own `agent=<name>`) on every claude_code.* sample a spawned subagent turn emits — this label already existed, it just wasn't plotted anywhere.",
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"name": "@datasourceUid@"
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 4,
|
||||||
|
"w": 8,
|
||||||
|
"x": 0,
|
||||||
|
"y": 35
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
},
|
},
|
||||||
"spec": {
|
|
||||||
"expr": "sum(increase({__name__=\"claude_code.cost.usage\", hive=~\"$hive\", agent=~\"$agent\", subagent!=\"\"}[$__range]))",
|
"expr": "sum(increase({__name__=\"claude_code.cost.usage\", hive=~\"$hive\", agent=~\"$agent\", subagent!=\"\"}[$__range]))",
|
||||||
"instant": true,
|
"instant": true,
|
||||||
"legendFormat": "subagent cost"
|
"legendFormat": "subagent cost"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "stat",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
|
||||||
"colorMode": "value",
|
|
||||||
"graphMode": "none",
|
|
||||||
"reduceOptions": {
|
|
||||||
"calcs": ["lastNotNull"],
|
|
||||||
"fields": "",
|
|
||||||
"values": false
|
|
||||||
},
|
|
||||||
"textMode": "value"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "currencyUSD",
|
"unit": "currencyUSD",
|
||||||
|
|
@ -1047,65 +750,49 @@
|
||||||
"color": {
|
"color": {
|
||||||
"mode": "fixed",
|
"mode": "fixed",
|
||||||
"fixedColor": "text"
|
"fixedColor": "text"
|
||||||
}
|
},
|
||||||
|
"mappings": []
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"panel-41": {
|
|
||||||
"kind": "Panel",
|
|
||||||
"spec": {
|
|
||||||
"id": 41,
|
|
||||||
"title": "Subagent turns",
|
|
||||||
"description": "claude_code.session.count where subagent!=\"\" — a proxy for subagent turns, same PROXY caveat as the plain 'CLI sessions started' tile above.",
|
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
|
||||||
"name": "@datasourceUid@"
|
|
||||||
},
|
|
||||||
"spec": {
|
|
||||||
"expr": "sum(increase({__name__=\"claude_code.session.count\", hive=~\"$hive\", agent=~\"$agent\", subagent!=\"\"}[$__range]))",
|
|
||||||
"instant": true,
|
|
||||||
"legendFormat": "subagent turns"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "stat",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
"options": {
|
||||||
"colorMode": "value",
|
|
||||||
"graphMode": "none",
|
"graphMode": "none",
|
||||||
|
"colorMode": "value",
|
||||||
|
"textMode": "value",
|
||||||
"reduceOptions": {
|
"reduceOptions": {
|
||||||
"calcs": ["lastNotNull"],
|
"calcs": ["lastNotNull"],
|
||||||
"fields": "",
|
"fields": "",
|
||||||
"values": false
|
"values": false
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"textMode": "value"
|
{
|
||||||
|
"id": 41,
|
||||||
|
"type": "stat",
|
||||||
|
"title": "Subagent turns",
|
||||||
|
"description": "claude_code.session.count where subagent!=\"\" — a proxy for subagent turns, same PROXY caveat as the plain 'CLI sessions started' tile above.",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
},
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 4,
|
||||||
|
"w": 8,
|
||||||
|
"x": 8,
|
||||||
|
"y": 35
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"expr": "sum(increase({__name__=\"claude_code.session.count\", hive=~\"$hive\", agent=~\"$agent\", subagent!=\"\"}[$__range]))",
|
||||||
|
"instant": true,
|
||||||
|
"legendFormat": "subagent turns"
|
||||||
|
}
|
||||||
|
],
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "short",
|
"unit": "short",
|
||||||
|
|
@ -1113,65 +800,49 @@
|
||||||
"color": {
|
"color": {
|
||||||
"mode": "fixed",
|
"mode": "fixed",
|
||||||
"fixedColor": "text"
|
"fixedColor": "text"
|
||||||
}
|
},
|
||||||
|
"mappings": []
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"panel-42": {
|
|
||||||
"kind": "Panel",
|
|
||||||
"spec": {
|
|
||||||
"id": 42,
|
|
||||||
"title": "Subagent cost share",
|
|
||||||
"description": "Subagent cost as a fraction of all cost in the selected range — 'basically free' is a claim this tile can actually check.",
|
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
|
||||||
"name": "@datasourceUid@"
|
|
||||||
},
|
|
||||||
"spec": {
|
|
||||||
"expr": "sum(increase({__name__=\"claude_code.cost.usage\", hive=~\"$hive\", agent=~\"$agent\", subagent!=\"\"}[$__range])) / sum(increase({__name__=\"claude_code.cost.usage\", hive=~\"$hive\", agent=~\"$agent\"}[$__range]))",
|
|
||||||
"instant": true,
|
|
||||||
"legendFormat": "subagent share"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "stat",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
"options": {
|
||||||
"colorMode": "value",
|
|
||||||
"graphMode": "none",
|
"graphMode": "none",
|
||||||
|
"colorMode": "value",
|
||||||
|
"textMode": "value",
|
||||||
"reduceOptions": {
|
"reduceOptions": {
|
||||||
"calcs": ["lastNotNull"],
|
"calcs": ["lastNotNull"],
|
||||||
"fields": "",
|
"fields": "",
|
||||||
"values": false
|
"values": false
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"textMode": "value"
|
{
|
||||||
|
"id": 42,
|
||||||
|
"type": "stat",
|
||||||
|
"title": "Subagent cost share",
|
||||||
|
"description": "Subagent cost as a fraction of all cost in the selected range — 'basically free' is a claim this tile can actually check.",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
},
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 4,
|
||||||
|
"w": 8,
|
||||||
|
"x": 16,
|
||||||
|
"y": 35
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"expr": "sum(increase({__name__=\"claude_code.cost.usage\", hive=~\"$hive\", agent=~\"$agent\", subagent!=\"\"}[$__range])) / sum(increase({__name__=\"claude_code.cost.usage\", hive=~\"$hive\", agent=~\"$agent\"}[$__range]))",
|
||||||
|
"instant": true,
|
||||||
|
"legendFormat": "subagent share"
|
||||||
|
}
|
||||||
|
],
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "percentunit",
|
"unit": "percentunit",
|
||||||
|
|
@ -1179,446 +850,139 @@
|
||||||
"color": {
|
"color": {
|
||||||
"mode": "fixed",
|
"mode": "fixed",
|
||||||
"fixedColor": "text"
|
"fixedColor": "text"
|
||||||
}
|
},
|
||||||
|
"mappings": []
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
}
|
},
|
||||||
}
|
"options": {
|
||||||
|
"graphMode": "none",
|
||||||
|
"colorMode": "value",
|
||||||
|
"textMode": "value",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": ["lastNotNull"],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"panel-43": {
|
{
|
||||||
"kind": "Panel",
|
|
||||||
"spec": {
|
|
||||||
"id": 43,
|
"id": 43,
|
||||||
|
"type": "bargauge",
|
||||||
"title": "Cost by subagent name",
|
"title": "Cost by subagent name",
|
||||||
"description": "claude_code.cost.usage summed over the selected range, split by the caller-chosen `subagent` name (e.g. an exploration/relabeling task's session name) rather than which agent spawned it.",
|
"description": "claude_code.cost.usage summed over the selected range, split by the caller-chosen `subagent` name (e.g. an exploration/relabeling task's session name) rather than which agent spawned it.",
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"name": "@datasourceUid@"
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 7,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 39
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
},
|
},
|
||||||
"spec": {
|
|
||||||
"expr": "sum by (subagent) (increase({__name__=\"claude_code.cost.usage\", hive=~\"$hive\", agent=~\"$agent\", subagent!=\"\"}[$__range]))",
|
"expr": "sum by (subagent) (increase({__name__=\"claude_code.cost.usage\", hive=~\"$hive\", agent=~\"$agent\", subagent!=\"\"}[$__range]))",
|
||||||
"instant": true,
|
"instant": true,
|
||||||
"legendFormat": "{{subagent}}"
|
"legendFormat": "{{subagent}}"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "bargauge",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
|
||||||
"displayMode": "basic",
|
|
||||||
"orientation": "horizontal",
|
|
||||||
"reduceOptions": {
|
|
||||||
"calcs": ["lastNotNull"],
|
|
||||||
"fields": "",
|
|
||||||
"values": false
|
|
||||||
},
|
|
||||||
"showUnfilled": true,
|
|
||||||
"valueMode": "text"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "currencyUSD",
|
"unit": "currencyUSD",
|
||||||
"decimals": 2,
|
"decimals": 2,
|
||||||
|
"color": {
|
||||||
|
"mode": "fixed",
|
||||||
|
"fixedColor": "purple"
|
||||||
|
},
|
||||||
"thresholds": {
|
"thresholds": {
|
||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"value": null,
|
"color": "purple",
|
||||||
"color": "purple"
|
"value": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"color": {
|
|
||||||
"mode": "fixed",
|
|
||||||
"fixedColor": "purple"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
}
|
},
|
||||||
}
|
"options": {
|
||||||
|
"displayMode": "basic",
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"showUnfilled": true,
|
||||||
|
"valueMode": "text",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": ["lastNotNull"],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"panel-44": {
|
{
|
||||||
"kind": "Panel",
|
|
||||||
"spec": {
|
|
||||||
"id": 44,
|
"id": 44,
|
||||||
|
"type": "bargauge",
|
||||||
"title": "Subagent cost by parent agent",
|
"title": "Subagent cost by parent agent",
|
||||||
"description": "Same claude_code.cost.usage{subagent!=\"\"}, grouped by the spawning agent's own `agent` label instead — which agent's subagent habit is actually costing something.",
|
"description": "Same claude_code.cost.usage{subagent!=\"\"}, grouped by the spawning agent's own `agent` label instead — which agent's subagent habit is actually costing something.",
|
||||||
"links": [],
|
|
||||||
"data": {
|
|
||||||
"kind": "QueryGroup",
|
|
||||||
"spec": {
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"kind": "PanelQuery",
|
|
||||||
"spec": {
|
|
||||||
"query": {
|
|
||||||
"kind": "DataQuery",
|
|
||||||
"group": "prometheus",
|
|
||||||
"version": "v0",
|
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"name": "@datasourceUid@"
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 7,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 39
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "@datasourceUid@"
|
||||||
},
|
},
|
||||||
"spec": {
|
|
||||||
"expr": "sum by (agent) (increase({__name__=\"claude_code.cost.usage\", hive=~\"$hive\", agent=~\"$agent\", subagent!=\"\"}[$__range]))",
|
"expr": "sum by (agent) (increase({__name__=\"claude_code.cost.usage\", hive=~\"$hive\", agent=~\"$agent\", subagent!=\"\"}[$__range]))",
|
||||||
"instant": true,
|
"instant": true,
|
||||||
"legendFormat": "{{agent}}"
|
"legendFormat": "{{agent}}"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"refId": "A",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"transformations": [],
|
|
||||||
"queryOptions": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vizConfig": {
|
|
||||||
"kind": "VizConfig",
|
|
||||||
"group": "bargauge",
|
|
||||||
"version": "",
|
|
||||||
"spec": {
|
|
||||||
"options": {
|
|
||||||
"displayMode": "basic",
|
|
||||||
"orientation": "horizontal",
|
|
||||||
"reduceOptions": {
|
|
||||||
"calcs": ["lastNotNull"],
|
|
||||||
"fields": "",
|
|
||||||
"values": false
|
|
||||||
},
|
|
||||||
"showUnfilled": true,
|
|
||||||
"valueMode": "text"
|
|
||||||
},
|
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "currencyUSD",
|
"unit": "currencyUSD",
|
||||||
"decimals": 2,
|
"decimals": 2,
|
||||||
|
"color": {
|
||||||
|
"mode": "fixed",
|
||||||
|
"fixedColor": "blue"
|
||||||
|
},
|
||||||
"thresholds": {
|
"thresholds": {
|
||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"value": null,
|
"color": "blue",
|
||||||
"color": "blue"
|
"value": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"color": {
|
|
||||||
"mode": "fixed",
|
|
||||||
"fixedColor": "blue"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"overrides": []
|
"overrides": []
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"layout": {
|
"options": {
|
||||||
"kind": "TabsLayout",
|
"displayMode": "basic",
|
||||||
"spec": {
|
"orientation": "horizontal",
|
||||||
"tabs": [
|
"showUnfilled": true,
|
||||||
{
|
"valueMode": "text",
|
||||||
"kind": "TabsLayoutTab",
|
"reduceOptions": {
|
||||||
"spec": {
|
"calcs": ["lastNotNull"],
|
||||||
"title": "activity",
|
"fields": "",
|
||||||
"layout": {
|
"values": false
|
||||||
"kind": "GridLayout",
|
|
||||||
"spec": {
|
|
||||||
"items": [
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"width": 12,
|
|
||||||
"height": 4,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 12,
|
|
||||||
"y": 0,
|
|
||||||
"width": 12,
|
|
||||||
"height": 4,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 4,
|
|
||||||
"width": 12,
|
|
||||||
"height": 7,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-31"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 12,
|
|
||||||
"y": 4,
|
|
||||||
"width": 12,
|
|
||||||
"height": 7,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-32"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 11,
|
|
||||||
"width": 24,
|
|
||||||
"height": 8,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-33"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "TabsLayoutTab",
|
|
||||||
"spec": {
|
|
||||||
"title": "cost",
|
|
||||||
"layout": {
|
|
||||||
"kind": "GridLayout",
|
|
||||||
"spec": {
|
|
||||||
"items": [
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"width": 12,
|
|
||||||
"height": 4,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-2"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 12,
|
|
||||||
"y": 0,
|
|
||||||
"width": 12,
|
|
||||||
"height": 4,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-3"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 4,
|
|
||||||
"width": 12,
|
|
||||||
"height": 8,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-10"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 12,
|
|
||||||
"y": 4,
|
|
||||||
"width": 12,
|
|
||||||
"height": 8,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-21"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "TabsLayoutTab",
|
|
||||||
"spec": {
|
|
||||||
"title": "health",
|
|
||||||
"layout": {
|
|
||||||
"kind": "GridLayout",
|
|
||||||
"spec": {
|
|
||||||
"items": [
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"width": 12,
|
|
||||||
"height": 8,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-11"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 12,
|
|
||||||
"y": 0,
|
|
||||||
"width": 12,
|
|
||||||
"height": 8,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-20"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 8,
|
|
||||||
"width": 24,
|
|
||||||
"height": 7,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-30"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "TabsLayoutTab",
|
|
||||||
"spec": {
|
|
||||||
"title": "subagents",
|
|
||||||
"layout": {
|
|
||||||
"kind": "GridLayout",
|
|
||||||
"spec": {
|
|
||||||
"items": [
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"width": 8,
|
|
||||||
"height": 4,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-40"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 8,
|
|
||||||
"y": 0,
|
|
||||||
"width": 8,
|
|
||||||
"height": 4,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-41"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 16,
|
|
||||||
"y": 0,
|
|
||||||
"width": 8,
|
|
||||||
"height": 4,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-42"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 4,
|
|
||||||
"width": 12,
|
|
||||||
"height": 7,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-43"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "GridLayoutItem",
|
|
||||||
"spec": {
|
|
||||||
"x": 12,
|
|
||||||
"y": 4,
|
|
||||||
"width": 12,
|
|
||||||
"height": 7,
|
|
||||||
"element": {
|
|
||||||
"kind": "ElementReference",
|
|
||||||
"name": "panel-44"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue