109 lines
3.6 KiB
JSON
109 lines
3.6 KiB
JSON
{
|
|
"uid": "messenger-lab6",
|
|
"title": "Messenger — lab6 observability",
|
|
"tags": ["messenger", "lab6"],
|
|
"schemaVersion": 39,
|
|
"version": 1,
|
|
"refresh": "10s",
|
|
"editable": true,
|
|
"time": { "from": "now-30m", "to": "now" },
|
|
"timezone": "utc",
|
|
"panels": [
|
|
{
|
|
"id": 1,
|
|
"type": "timeseries",
|
|
"title": "API RPS (excluding health)",
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 },
|
|
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
|
"fieldConfig": { "defaults": { "unit": "reqps" }, "overrides": [] },
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "sum(rate(http_server_requests_total{http_route!~\"/health/.*\"}[1m]))",
|
|
"legendFormat": "RPS"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 2,
|
|
"type": "timeseries",
|
|
"title": "API 5xx ratio",
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 0 },
|
|
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
|
"fieldConfig": { "defaults": { "unit": "percentunit", "min": 0 }, "overrides": [] },
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "sum(rate(http_server_requests_total{http_response_status_code=~\"5..\"}[1m])) / clamp_min(sum(rate(http_server_requests_total{http_route!~\"/health/.*\"}[1m])), 0.001)",
|
|
"legendFormat": "5xx / business"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 3,
|
|
"type": "timeseries",
|
|
"title": "HTTP duration p95",
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 8 },
|
|
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
|
"fieldConfig": { "defaults": { "unit": "s" }, "overrides": [] },
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "histogram_quantile(0.95, sum by (le) (rate(http_server_request_duration_seconds_bucket[5m])))",
|
|
"legendFormat": "p95"
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"expr": "histogram_quantile(0.50, sum by (le) (rate(http_server_request_duration_seconds_bucket[5m])))",
|
|
"legendFormat": "p50"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 4,
|
|
"type": "timeseries",
|
|
"title": "Attachment jobs by outcome",
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 8 },
|
|
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
|
"fieldConfig": { "defaults": { "unit": "ops" }, "overrides": [] },
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "sum by (job_outcome) (rate(attachment_jobs_total[1m]))",
|
|
"legendFormat": "{{job_outcome}}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 5,
|
|
"type": "timeseries",
|
|
"title": "Worker job duration p95 by outcome",
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 16 },
|
|
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
|
"fieldConfig": { "defaults": { "unit": "s" }, "overrides": [] },
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "histogram_quantile(0.95, sum by (le, job_outcome) (rate(attachment_job_duration_seconds_bucket[5m])))",
|
|
"legendFormat": "{{job_outcome}}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 6,
|
|
"type": "timeseries",
|
|
"title": "API request rate by route (top 10)",
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 16 },
|
|
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
|
"fieldConfig": { "defaults": { "unit": "reqps" }, "overrides": [] },
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "topk(10, sum by (http_route, http_request_method) (rate(http_server_requests_total{http_route!~\"/health/.*\"}[1m])))",
|
|
"legendFormat": "{{http_request_method}} {{http_route}}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|