Files
timmy-telemetry/grafana/dashboards/sovereignty.json
perplexity 7969842132 Sovereign telemetry stack: Prometheus + Grafana + exporter
- Docker Compose with 3 containers (prometheus, grafana, exporter)
- Custom Python exporter reads Gitea API, heartbeat JSONL, inference metrics, model health
- Sovereignty score: 7 dimensions, weighted composite (0-100)
- Top 5 common sense metrics: commit velocity, issues/PRs, heartbeat, inference, model health
- Grafana auto-provisioned with 'Timmy Sovereign Command' dashboard
- Grafana on :3033, Prometheus on :9090, Exporter on :9101

Refs: #590, #594
2026-03-27 01:19:13 +00:00

471 lines
13 KiB
JSON

{
"annotations": { "list": [] },
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"id": null,
"links": [],
"panels": [
{
"id": 1,
"title": "⚡ SOVEREIGNTY INDEX",
"description": "Composite sovereignty score across all dimensions (0-100)",
"type": "gauge",
"gridPos": { "h": 8, "w": 6, "x": 0, "y": 0 },
"targets": [
{
"expr": "timmy_sovereignty_score",
"legendFormat": "Sovereignty",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": { "mode": "thresholds" },
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "#ff0000", "value": null },
{ "color": "#ff4500", "value": 20 },
{ "color": "#ff8c00", "value": 40 },
{ "color": "#ffd700", "value": 60 },
{ "color": "#32cd32", "value": 80 },
{ "color": "#00ff00", "value": 95 }
]
},
"min": 0,
"max": 100,
"unit": "none"
},
"overrides": []
},
"options": {
"reduceOptions": { "calcs": ["lastNotNull"] },
"showThresholdLabels": false,
"showThresholdMarkers": true,
"orientation": "auto"
}
},
{
"id": 2,
"title": "Sovereignty Dimensions",
"description": "Individual sovereignty scores per dimension",
"type": "bargauge",
"gridPos": { "h": 8, "w": 10, "x": 6, "y": 0 },
"targets": [
{
"expr": "timmy_sovereignty_dimension",
"legendFormat": "{{dimension}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": { "mode": "thresholds" },
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "#ff4500", "value": null },
{ "color": "#ff8c00", "value": 30 },
{ "color": "#ffd700", "value": 50 },
{ "color": "#32cd32", "value": 70 },
{ "color": "#00ff00", "value": 90 }
]
},
"min": 0,
"max": 100,
"unit": "none"
},
"overrides": []
},
"options": {
"reduceOptions": { "calcs": ["lastNotNull"] },
"displayMode": "gradient",
"orientation": "horizontal",
"showUnfilled": true,
"minVizWidth": 0,
"minVizHeight": 10,
"valueMode": "color"
}
},
{
"id": 3,
"title": "System Status",
"description": "Core infrastructure health at a glance",
"type": "stat",
"gridPos": { "h": 8, "w": 8, "x": 16, "y": 0 },
"targets": [
{
"expr": "timmy_ollama_up",
"legendFormat": "Ollama",
"refId": "A"
},
{
"expr": "timmy_ollama_inference_ok",
"legendFormat": "Inference",
"refId": "B"
},
{
"expr": "timmy_gitea_up",
"legendFormat": "Gitea",
"refId": "C"
},
{
"expr": "timmy_heartbeat_ticks_1h",
"legendFormat": "Heartbeat (1h)",
"refId": "D"
}
],
"fieldConfig": {
"defaults": {
"mappings": [
{ "options": { "0": { "text": "DOWN", "color": "red" }, "1": { "text": "UP", "color": "green" } }, "type": "value" }
],
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "red", "value": null },
{ "color": "green", "value": 1 }
]
}
},
"overrides": [
{
"matcher": { "id": "byName", "options": "Heartbeat (1h)" },
"properties": [
{ "id": "mappings", "value": [] },
{ "id": "thresholds", "value": { "mode": "absolute", "steps": [{ "color": "red", "value": null }, { "color": "yellow", "value": 1 }, { "color": "green", "value": 4 }] } }
]
}
]
},
"options": {
"reduceOptions": { "calcs": ["lastNotNull"] },
"colorMode": "background",
"graphMode": "none",
"justifyMode": "auto",
"textMode": "auto",
"wideLayout": true,
"showPercentChange": false
}
},
{
"id": 10,
"title": "① Commit Velocity (24h)",
"description": "Commits across repos in the last 24 hours",
"type": "timeseries",
"gridPos": { "h": 7, "w": 12, "x": 0, "y": 8 },
"targets": [
{
"expr": "timmy_commits_24h",
"legendFormat": "{{repo}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"drawStyle": "line",
"lineWidth": 2,
"fillOpacity": 20,
"pointSize": 5,
"showPoints": "auto",
"spanNulls": false
},
"unit": "short"
},
"overrides": []
},
"options": {
"legend": { "displayMode": "list", "placement": "bottom" },
"tooltip": { "mode": "multi" }
}
},
{
"id": 11,
"title": "② Issues & PRs",
"description": "Open issues and PRs per repo",
"type": "bargauge",
"gridPos": { "h": 7, "w": 12, "x": 12, "y": 8 },
"targets": [
{
"expr": "timmy_open_issues",
"legendFormat": "Issues: {{repo}}",
"refId": "A"
},
{
"expr": "timmy_open_prs",
"legendFormat": "PRs: {{repo}}",
"refId": "B"
}
],
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"min": 0,
"unit": "short"
},
"overrides": []
},
"options": {
"reduceOptions": { "calcs": ["lastNotNull"] },
"displayMode": "gradient",
"orientation": "horizontal",
"showUnfilled": true
}
},
{
"id": 12,
"title": "③ Heartbeat Health",
"description": "Heartbeat tick rate and last tick age",
"type": "stat",
"gridPos": { "h": 7, "w": 8, "x": 0, "y": 15 },
"targets": [
{
"expr": "timmy_heartbeat_ticks_1h",
"legendFormat": "Ticks (1h)",
"refId": "A"
},
{
"expr": "timmy_heartbeat_consecutive_healthy",
"legendFormat": "Consecutive OK",
"refId": "B"
},
{
"expr": "timmy_heartbeat_last_tick_age_seconds",
"legendFormat": "Last Tick Age",
"refId": "C"
},
{
"expr": "timmy_alerts_today",
"legendFormat": "Alerts Today",
"refId": "D"
}
],
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "red", "value": null },
{ "color": "green", "value": 1 }
]
}
},
"overrides": [
{
"matcher": { "id": "byName", "options": "Last Tick Age" },
"properties": [
{ "id": "unit", "value": "s" },
{ "id": "thresholds", "value": { "mode": "absolute", "steps": [{ "color": "green", "value": null }, { "color": "yellow", "value": 900 }, { "color": "red", "value": 1800 }] } }
]
},
{
"matcher": { "id": "byName", "options": "Alerts Today" },
"properties": [
{ "id": "thresholds", "value": { "mode": "absolute", "steps": [{ "color": "green", "value": null }, { "color": "yellow", "value": 1 }, { "color": "red", "value": 5 }] } }
]
}
]
},
"options": {
"reduceOptions": { "calcs": ["lastNotNull"] },
"colorMode": "background",
"graphMode": "none",
"textMode": "auto"
}
},
{
"id": 13,
"title": "④ Local Inference",
"description": "Local model call volume and success rate today",
"type": "timeseries",
"gridPos": { "h": 7, "w": 8, "x": 8, "y": 15 },
"targets": [
{
"expr": "timmy_inference_calls_today",
"legendFormat": "Calls: {{model}}",
"refId": "A"
},
{
"expr": "timmy_inference_success_rate * 100",
"legendFormat": "Success %: {{model}}",
"refId": "B"
}
],
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"drawStyle": "line",
"lineWidth": 2,
"fillOpacity": 10,
"pointSize": 5,
"showPoints": "auto"
},
"unit": "short"
},
"overrides": []
},
"options": {
"legend": { "displayMode": "list", "placement": "bottom" },
"tooltip": { "mode": "multi" }
}
},
{
"id": 14,
"title": "⑤ Model Health",
"description": "Ollama status, models loaded, inference health",
"type": "stat",
"gridPos": { "h": 7, "w": 8, "x": 16, "y": 15 },
"targets": [
{
"expr": "timmy_ollama_up",
"legendFormat": "Ollama Process",
"refId": "A"
},
{
"expr": "timmy_ollama_api_up",
"legendFormat": "API Responding",
"refId": "B"
},
{
"expr": "timmy_ollama_inference_ok",
"legendFormat": "Inference OK",
"refId": "C"
},
{
"expr": "timmy_models_loaded",
"legendFormat": "Models Loaded",
"refId": "D"
},
{
"expr": "timmy_dpo_pairs_staged",
"legendFormat": "DPO Pairs Staged",
"refId": "E"
}
],
"fieldConfig": {
"defaults": {
"mappings": [
{ "options": { "0": { "text": "DOWN", "color": "red" }, "1": { "text": "UP", "color": "green" } }, "type": "value" }
],
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "red", "value": null },
{ "color": "green", "value": 1 }
]
}
},
"overrides": [
{
"matcher": { "id": "byName", "options": "Models Loaded" },
"properties": [
{ "id": "mappings", "value": [] },
{ "id": "thresholds", "value": { "mode": "absolute", "steps": [{ "color": "red", "value": null }, { "color": "green", "value": 1 }] } }
]
},
{
"matcher": { "id": "byName", "options": "DPO Pairs Staged" },
"properties": [
{ "id": "mappings", "value": [] },
{ "id": "thresholds", "value": { "mode": "absolute", "steps": [{ "color": "blue", "value": null }] } }
]
}
]
},
"options": {
"reduceOptions": { "calcs": ["lastNotNull"] },
"colorMode": "background",
"graphMode": "none",
"textMode": "auto"
}
},
{
"id": 20,
"title": "Agent Activity (24h Commits)",
"description": "Commits per agent in the last 24 hours",
"type": "bargauge",
"gridPos": { "h": 6, "w": 12, "x": 0, "y": 22 },
"targets": [
{
"expr": "timmy_agent_commits_24h",
"legendFormat": "{{agent}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"min": 0,
"unit": "short"
},
"overrides": []
},
"options": {
"reduceOptions": { "calcs": ["lastNotNull"] },
"displayMode": "gradient",
"orientation": "horizontal",
"showUnfilled": true
}
},
{
"id": 21,
"title": "Sovereignty Over Time",
"description": "Track the composite sovereignty score trending over time",
"type": "timeseries",
"gridPos": { "h": 6, "w": 12, "x": 12, "y": 22 },
"targets": [
{
"expr": "timmy_sovereignty_score",
"legendFormat": "Sovereignty Index",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": { "fixedColor": "#7b68ee", "mode": "fixed" },
"custom": {
"drawStyle": "line",
"lineWidth": 3,
"fillOpacity": 30,
"gradientMode": "scheme",
"pointSize": 5,
"showPoints": "auto",
"spanNulls": true
},
"min": 0,
"max": 100,
"unit": "none",
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "red", "value": null },
{ "color": "orange", "value": 30 },
{ "color": "yellow", "value": 50 },
{ "color": "green", "value": 70 }
]
}
},
"overrides": []
},
"options": {
"legend": { "displayMode": "list", "placement": "bottom" },
"tooltip": { "mode": "single" }
}
}
],
"refresh": "30s",
"schemaVersion": 39,
"tags": ["timmy", "sovereignty"],
"templating": { "list": [] },
"time": { "from": "now-24h", "to": "now" },
"timepicker": {},
"timezone": "browser",
"title": "Timmy Sovereign Command",
"uid": "timmy-sovereign",
"version": 1
}