forked from mtusi2026/mtusi2026lab5
50 lines
1.8 KiB
JSON
50 lines
1.8 KiB
JSON
{
|
|
"title": "Messenger Observability",
|
|
"uid": "messenger-observability",
|
|
"schemaVersion": 39,
|
|
"version": 1,
|
|
"refresh": "10s",
|
|
"panels": [
|
|
{
|
|
"id": 1,
|
|
"title": "API RPS",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"targets": [{"expr": "sum(rate(messenger_http_requests_total[1m]))", "legendFormat": "RPS"}]
|
|
},
|
|
{
|
|
"id": 2,
|
|
"title": "API error ratio",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 0},
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"targets": [{"expr": "sum(rate(messenger_http_requests_total{http_response_status_code=~\"5..\"}[5m])) / sum(rate(messenger_http_requests_total[5m]))", "legendFormat": "5xx ratio"}]
|
|
},
|
|
{
|
|
"id": 3,
|
|
"title": "API duration",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 8},
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"targets": [{"expr": "histogram_quantile(0.95, sum(rate(messenger_http_duration_seconds_bucket[5m])) by (le))", "legendFormat": "p95 seconds"}]
|
|
},
|
|
{
|
|
"id": 4,
|
|
"title": "Worker outcomes",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 8},
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"targets": [{"expr": "sum(rate(messenger_jobs_processed_total[5m])) by (outcome)", "legendFormat": "{{outcome}}"}]
|
|
},
|
|
{
|
|
"id": 5,
|
|
"title": "Worker duration p95",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 16},
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"targets": [{"expr": "histogram_quantile(0.95, sum(rate(messenger_jobs_duration_seconds_bucket[5m])) by (le))", "legendFormat": "p95 seconds"}]
|
|
}
|
|
]
|
|
}
|