forked from mtusi2026/mtusi2026lab7
82 lines
3.4 KiB
JSON
82 lines
3.4 KiB
JSON
{
|
|
"annotations": {"list": []},
|
|
"editable": false,
|
|
"fiscalYearStartMonth": 0,
|
|
"graphTooltip": 1,
|
|
"id": null,
|
|
"links": [],
|
|
"liveNow": false,
|
|
"panels": [
|
|
{
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"fieldConfig": {"defaults": {"unit": "reqps"}, "overrides": []},
|
|
"gridPos": {"h": 8, "w": 8, "x": 0, "y": 0},
|
|
"id": 1,
|
|
"options": {"legend": {"displayMode": "table", "placement": "bottom"}},
|
|
"targets": [{"expr": "sum(rate(messenger_http_server_requests_total[1m]))", "legendFormat": "all requests", "refId": "A"}],
|
|
"title": "API request rate",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"fieldConfig": {"defaults": {"unit": "reqps"}, "overrides": []},
|
|
"gridPos": {"h": 8, "w": 8, "x": 8, "y": 0},
|
|
"id": 2,
|
|
"options": {"legend": {"displayMode": "table", "placement": "bottom"}},
|
|
"targets": [{"expr": "sum by (status_class) (rate(messenger_http_server_requests_total[1m]))", "legendFormat": "{{status_class}}", "refId": "A"}],
|
|
"title": "API responses by status class",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"fieldConfig": {"defaults": {"unit": "s"}, "overrides": []},
|
|
"gridPos": {"h": 8, "w": 8, "x": 16, "y": 0},
|
|
"id": 3,
|
|
"options": {"legend": {"displayMode": "table", "placement": "bottom"}},
|
|
"targets": [{"expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_http_server_duration_seconds_bucket[5m])))", "legendFormat": "p95", "refId": "A"}],
|
|
"title": "API duration",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"fieldConfig": {"defaults": {"unit": "jobs"}, "overrides": []},
|
|
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 8},
|
|
"id": 4,
|
|
"options": {"legend": {"displayMode": "table", "placement": "bottom"}},
|
|
"targets": [{"expr": "sum by (outcome) (increase(messenger_worker_jobs_total[5m]))", "legendFormat": "{{outcome}}", "refId": "A"}],
|
|
"title": "Worker jobs by outcome",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"fieldConfig": {"defaults": {"unit": "s"}, "overrides": []},
|
|
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 8},
|
|
"id": 5,
|
|
"options": {"legend": {"displayMode": "table", "placement": "bottom"}},
|
|
"targets": [{"expr": "histogram_quantile(0.95, sum by (le, outcome) (rate(messenger_worker_job_duration_seconds_bucket[5m])))", "legendFormat": "p95 {{outcome}}", "refId": "A"}],
|
|
"title": "Worker processing duration",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": {"type": "loki", "uid": "loki"},
|
|
"gridPos": {"h": 10, "w": 24, "x": 0, "y": 16},
|
|
"id": 6,
|
|
"options": {"dedupStrategy": "none", "enableLogDetails": true, "showCommonLabels": false, "showLabels": false, "showTime": true, "sortOrder": "Descending", "wrapLogMessage": true},
|
|
"targets": [{"expr": "{service_name=~\"messenger-(api|worker)\"}", "queryType": "range", "refId": "A"}],
|
|
"title": "Correlated structured logs",
|
|
"type": "logs"
|
|
}
|
|
],
|
|
"refresh": "5s",
|
|
"schemaVersion": 41,
|
|
"tags": ["mtusi", "lab6", "grade3"],
|
|
"templating": {"list": []},
|
|
"time": {"from": "now-15m", "to": "now"},
|
|
"timepicker": {},
|
|
"timezone": "browser",
|
|
"title": "MTUSI Lab 6 — Grade 3",
|
|
"uid": "mtusi-lab7-grade3",
|
|
"version": 1
|
|
}
|
|
|