4aae61297f
Analytics parity phases 2–7 (docs/plans/analytics-parity/), built on
138e706 and ported onto v2.3.1:
- Cost by AI tool (?tool= on cost/analytics/stats/workflows, by_tool,
Codex fast/priority and flex tiers, agenthub_cost_usd_total{tool,model})
- Date ranges (from/to) on cost/analytics/workflows; Analytics range select
with Today / This week (Monday) / This month (1st) / 7d / 30d / 90d / All /
Custom; workflow filters carried into workflow-stats.js (read worker)
- Budgets and cost alerts as alert rule types (alert_rules rebuilt without
its rule_type CHECK), GET /api/budgets/status, rule preview, spend pace,
status-bar budget chip; rules stay editable in place
- Query Explorer (/query, allowlisted sort, CSV/JSON export) and scheduled
reports (report_definitions/report_runs, Settings → Reports)
- Session Replay tab and immutable snapshots (session_snapshots, /snapshot/:token)
- Remote Codex sync, push ingest with a hashed token, privacy redaction and
ignored folders (Settings → Data), Cursor sessions (no cost)
- Read-only MCP server, statusline, Grafana/Prometheus files
Also: resizable sidebar, pet run/wave animations, the workspace home keeps a
half-typed prompt, and the pre-commit hook runs only the related tests for a
small commit.
667 lines
14 KiB
JSON
667 lines
14 KiB
JSON
{
|
|
"uid": "agenthub-overview",
|
|
"title": "AgentHub — Overview",
|
|
"description": "Health, activity and spend of one AgentHub dashboard (/api/metrics).",
|
|
"tags": ["agenthub"],
|
|
"editable": true,
|
|
"schemaVersion": 39,
|
|
"version": 1,
|
|
"refresh": "30s",
|
|
"time": {
|
|
"from": "now-24h",
|
|
"to": "now"
|
|
},
|
|
"timezone": "browser",
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"name": "ds",
|
|
"label": "Prometheus",
|
|
"type": "datasource",
|
|
"query": "prometheus",
|
|
"current": {},
|
|
"hide": 0
|
|
}
|
|
]
|
|
},
|
|
"links": [
|
|
{
|
|
"title": "AgentHub boards",
|
|
"type": "dashboards",
|
|
"tags": ["agenthub"],
|
|
"asDropdown": true
|
|
}
|
|
],
|
|
"annotations": {
|
|
"list": []
|
|
},
|
|
"panels": [
|
|
{
|
|
"id": 1,
|
|
"type": "stat",
|
|
"title": "Dashboard up",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 0,
|
|
"w": 4,
|
|
"h": 4
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"expr": "max(agenthub_up)",
|
|
"legendFormat": "__auto",
|
|
"instant": true,
|
|
"range": false
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "none",
|
|
"mappings": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"0": {
|
|
"text": "DOWN",
|
|
"color": "red"
|
|
},
|
|
"1": {
|
|
"text": "UP",
|
|
"color": "green"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": ["lastNotNull"],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"textMode": "auto"
|
|
}
|
|
},
|
|
{
|
|
"id": 2,
|
|
"type": "stat",
|
|
"title": "Version",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"gridPos": {
|
|
"x": 4,
|
|
"y": 0,
|
|
"w": 4,
|
|
"h": 4
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"expr": "agenthub_build_info",
|
|
"legendFormat": "{{version}}",
|
|
"instant": true,
|
|
"range": false
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "none"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": ["lastNotNull"],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"textMode": "name",
|
|
"colorMode": "none",
|
|
"graphMode": "none"
|
|
}
|
|
},
|
|
{
|
|
"id": 3,
|
|
"type": "stat",
|
|
"title": "Active sessions",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"gridPos": {
|
|
"x": 8,
|
|
"y": 0,
|
|
"w": 4,
|
|
"h": 4
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"expr": "sum(agenthub_sessions{status=\"active\"})",
|
|
"legendFormat": "__auto",
|
|
"instant": true,
|
|
"range": false
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "none"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": ["lastNotNull"],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"textMode": "auto"
|
|
}
|
|
},
|
|
{
|
|
"id": 4,
|
|
"type": "stat",
|
|
"title": "Working agents",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 0,
|
|
"w": 4,
|
|
"h": 4
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"expr": "sum(agenthub_agents{status=\"working\"})",
|
|
"legendFormat": "__auto",
|
|
"instant": true,
|
|
"range": false
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "none"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": ["lastNotNull"],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"textMode": "auto"
|
|
}
|
|
},
|
|
{
|
|
"id": 5,
|
|
"type": "stat",
|
|
"title": "Tokens (24h)",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"gridPos": {
|
|
"x": 16,
|
|
"y": 0,
|
|
"w": 4,
|
|
"h": 4
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"expr": "sum(increase(agenthub_tokens_total[24h]))",
|
|
"legendFormat": "__auto",
|
|
"instant": true,
|
|
"range": false
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": ["lastNotNull"],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"textMode": "auto"
|
|
}
|
|
},
|
|
{
|
|
"id": 6,
|
|
"type": "stat",
|
|
"title": "Spend (24h)",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"gridPos": {
|
|
"x": 20,
|
|
"y": 0,
|
|
"w": 4,
|
|
"h": 4
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"expr": "sum(increase(agenthub_cost_usd_total[24h]))",
|
|
"legendFormat": "__auto",
|
|
"instant": true,
|
|
"range": false
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "currencyUSD",
|
|
"decimals": 2
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": ["lastNotNull"],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"textMode": "auto"
|
|
},
|
|
"description": "Requires agenthub_cost_usd_total{tool,model} — empty on a dashboard that does not export it yet."
|
|
},
|
|
{
|
|
"id": 7,
|
|
"type": "timeseries",
|
|
"title": "Sessions by status",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 4,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"expr": "sum by (status) (agenthub_sessions)",
|
|
"legendFormat": "{{status}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "none",
|
|
"custom": {
|
|
"fillOpacity": 15,
|
|
"lineWidth": 2,
|
|
"stacking": {
|
|
"mode": "none"
|
|
}
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 8,
|
|
"type": "timeseries",
|
|
"title": "Agents by status",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 4,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"expr": "sum by (status) (agenthub_agents)",
|
|
"legendFormat": "{{status}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "none",
|
|
"custom": {
|
|
"fillOpacity": 15,
|
|
"lineWidth": 2,
|
|
"stacking": {
|
|
"mode": "none"
|
|
}
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 9,
|
|
"type": "timeseries",
|
|
"title": "Events per minute",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 12,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"expr": "sum(rate(agenthub_events_total[5m])) * 60",
|
|
"legendFormat": "events/min"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "none",
|
|
"custom": {
|
|
"fillOpacity": 15,
|
|
"lineWidth": 2,
|
|
"stacking": {
|
|
"mode": "none"
|
|
}
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 10,
|
|
"type": "timeseries",
|
|
"title": "Token burn (per second, by kind)",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 12,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"expr": "sum by (kind) (rate(agenthub_tokens_total[5m]))",
|
|
"legendFormat": "{{kind}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short",
|
|
"custom": {
|
|
"fillOpacity": 15,
|
|
"lineWidth": 2,
|
|
"stacking": {
|
|
"mode": "normal"
|
|
}
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 11,
|
|
"type": "timeseries",
|
|
"title": "Server memory (RSS)",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 20,
|
|
"w": 8,
|
|
"h": 7
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"expr": "agenthub_process_resident_memory_bytes",
|
|
"legendFormat": "rss"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "bytes",
|
|
"custom": {
|
|
"fillOpacity": 15,
|
|
"lineWidth": 2,
|
|
"stacking": {
|
|
"mode": "none"
|
|
}
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 12,
|
|
"type": "timeseries",
|
|
"title": "Server uptime",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"gridPos": {
|
|
"x": 8,
|
|
"y": 20,
|
|
"w": 8,
|
|
"h": 7
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"expr": "agenthub_process_uptime_seconds",
|
|
"legendFormat": "uptime"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s",
|
|
"custom": {
|
|
"fillOpacity": 15,
|
|
"lineWidth": 2,
|
|
"stacking": {
|
|
"mode": "none"
|
|
}
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 13,
|
|
"type": "timeseries",
|
|
"title": "Realtime clients / remote sources",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"gridPos": {
|
|
"x": 16,
|
|
"y": 20,
|
|
"w": 8,
|
|
"h": 7
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"expr": "agenthub_websocket_clients",
|
|
"legendFormat": "websocket clients"
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"expr": "sum by (enabled) (agenthub_remote_sources)",
|
|
"legendFormat": "remote sources (auto-sync {{enabled}})"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "none",
|
|
"custom": {
|
|
"fillOpacity": 15,
|
|
"lineWidth": 2,
|
|
"stacking": {
|
|
"mode": "none"
|
|
}
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|