Files
2026-07-08 16:15:37 +02:00

54 lines
2.0 KiB
JSON

{
"uid": "hivegrid-ai-cost",
"title": "HiveGrid — AI Cost per Tenant",
"tags": ["hivegrid", "ai"],
"timezone": "browser",
"schemaVersion": 39,
"refresh": "1m",
"time": { "from": "now-24h", "to": "now" },
"panels": [
{
"id": 1,
"type": "barchart",
"title": "Top tenants — tokens consumed (last 24h)",
"gridPos": { "h": 10, "w": 12, "x": 0, "y": 0 },
"targets": [
{
"refId": "A",
"expr": "topk(20, sum by (tenant_bucket) (increase(ai_tokens_consumed_total[24h])))",
"legendFormat": "{{tenant_bucket}}",
"datasource": { "uid": "hivegrid-prometheus", "type": "prometheus" }
}
]
},
{
"id": 2,
"type": "piechart",
"title": "Tokens by provider (24h)",
"gridPos": { "h": 10, "w": 12, "x": 12, "y": 0 },
"targets": [
{ "refId": "A", "expr": "sum by (provider) (increase(ai_tokens_consumed_total[24h]))", "legendFormat": "{{provider}}", "datasource": { "uid": "hivegrid-prometheus", "type": "prometheus" } }
]
},
{
"id": 3,
"type": "timeseries",
"title": "Daily token-consumption trend (per model)",
"gridPos": { "h": 10, "w": 24, "x": 0, "y": 10 },
"targets": [
{ "refId": "A", "expr": "sum by (model) (rate(ai_tokens_consumed_total[1h]))", "legendFormat": "{{model}}", "datasource": { "uid": "hivegrid-prometheus", "type": "prometheus" } }
]
},
{
"id": 4,
"type": "stat",
"title": "Cardinality of tenant_bucket (should stay ≤ 101)",
"gridPos": { "h": 4, "w": 6, "x": 0, "y": 20 },
"targets": [
{ "refId": "A", "expr": "count(count by (tenant_bucket) (ai_tokens_consumed_total))", "datasource": { "uid": "hivegrid-prometheus", "type": "prometheus" } }
],
"fieldConfig": { "defaults": { "thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }, { "color": "yellow", "value": 80 }, { "color": "red", "value": 101 }] } } }
}
]
}