trails/infrastructure/grafana/dashboards/planner.json
Ullrich Schäfer a931cb03f8
Add service health monitoring: postgres, node, cAdvisor exporters + dashboard
Exporters:
- postgres_exporter: DB connections, transactions, cache hit ratio, query stats
- node_exporter: host CPU, memory, disk, network
- cAdvisor: per-container CPU and memory usage

PostgreSQL:
- Enable pg_stat_statements for query-level performance tracking
- Track index scans vs sequential scans, cache hit ratio

Dashboard (service-health.json):
- DB: connections, size, transactions/s, slow queries, cache hit ratio, index usage
- Host: disk gauge, CPU, memory, network I/O, disk I/O
- BRouter: request latency p50/p95/p99, container CPU + memory
- All containers: CPU and memory comparison

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 19:01:15 +01:00

81 lines
No EOL
1.6 KiB
JSON

{
"title": "Planner",
"uid": "trails-planner",
"timezone": "browser",
"refresh": "30s",
"panels": [
{
"title": "Active Sessions",
"type": "stat",
"gridPos": {
"h": 6,
"w": 6,
"x": 0,
"y": 0
},
"targets": [
{
"expr": "planner_active_sessions",
"legendFormat": "Sessions"
}
]
},
{
"title": "Connected Clients",
"type": "stat",
"gridPos": {
"h": 6,
"w": 6,
"x": 6,
"y": 0
},
"targets": [
{
"expr": "planner_connected_clients",
"legendFormat": "Clients"
}
]
},
{
"title": "BRouter Latency",
"type": "timeseries",
"gridPos": {
"h": 6,
"w": 12,
"x": 12,
"y": 0
},
"targets": [
{
"expr": "histogram_quantile(0.50, rate(brouter_request_duration_seconds_bucket[5m]))",
"legendFormat": "p50"
},
{
"expr": "histogram_quantile(0.95, rate(brouter_request_duration_seconds_bucket[5m]))",
"legendFormat": "p95"
}
],
"fieldConfig": {
"defaults": {
"unit": "s"
}
}
},
{
"title": "Request Rate by Route",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 6
},
"targets": [
{
"expr": "sum(rate(http_request_duration_seconds_count{job=\"planner\"}[5m])) by (route)",
"legendFormat": "{{route}}"
}
]
}
]
}