4 grade_and_report

This commit is contained in:
caramelteawithmint
2026-11-27 14:03:46 +03:00
parent d8b193f62b
commit b41a645ec3
12 changed files with 280 additions and 182 deletions
+16 -63
View File
@@ -1,87 +1,40 @@
{
"annotations": {"list": []},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"panels": [
{
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
"fieldConfig": {"defaults": {"unit": "reqps"}, "overrides": []},
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
"datasource": {"type": "prometheus", "uid": "prometheus"},
"fieldConfig": {"defaults": {"unit": "reqps"}},
"gridPos": {"h": 8, "w": 8, "x": 0, "y": 0},
"id": 1,
"options": {"legend": {"displayMode": "list", "placement": "bottom"}},
"targets": [
{
"expr": "sum(rate(http_requests_total[1m])) by (handler)",
"legendFormat": "{{handler}}",
"refId": "A"
}
],
"targets": [{"expr": "sum(rate(http_requests_total[1m])) by (handler)", "legendFormat": "{{handler}}"}],
"title": "API RPS",
"type": "timeseries"
},
{
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
"fieldConfig": {"defaults": {"unit": "percentunit"}, "overrides": []},
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 0},
"datasource": {"type": "prometheus", "uid": "prometheus"},
"fieldConfig": {"defaults": {"unit": "percentunit"}},
"gridPos": {"h": 8, "w": 8, "x": 8, "y": 0},
"id": 2,
"options": {"legend": {"displayMode": "list", "placement": "bottom"}},
"targets": [
{
"expr": "sum(rate(http_requests_total{status=~\"5..\"}[1m])) / sum(rate(http_requests_total[1m]))",
"legendFormat": "5xx ratio",
"refId": "A"
}
],
"targets": [{"expr": "sum(rate(http_requests_total{status=~\"5..\"}[1m])) / sum(rate(http_requests_total[1m]))", "legendFormat": "5xx ratio"}],
"title": "API Error Rate (5xx)",
"type": "timeseries"
},
{
"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"},
"fieldConfig": {"defaults": {"unit": "s"}, "overrides": []},
"gridPos": {"h": 8, "w": 24, "x": 0, "y": 8},
"datasource": {"type": "prometheus", "uid": "prometheus"},
"fieldConfig": {"defaults": {"unit": "s"}},
"gridPos": {"h": 8, "w": 8, "x": 16, "y": 0},
"id": 3,
"options": {"legend": {"displayMode": "list", "placement": "bottom"}},
"targets": [
{
"expr": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket[5m])) by (le, handler))",
"legendFormat": "p95 {{handler}}",
"refId": "A"
},
{
"expr": "histogram_quantile(0.50, sum(rate(http_request_duration_seconds_bucket[5m])) by (le, handler))",
"legendFormat": "p50 {{handler}}",
"refId": "B"
}
{"expr": "histogram_quantile(0.50, sum(rate(http_request_duration_seconds_bucket[5m])) by (le))", "legendFormat": "p50"},
{"expr": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket[5m])) by (le))", "legendFormat": "p95"},
{"expr": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket[5m])) by (le))", "legendFormat": "p99"}
],
"title": "API Duration p50/p95",
"title": "API Duration (p50/p95/p99)",
"type": "timeseries"
}
],
"schemaVersion": 39,
"tags": ["lab6"],
"templating": {
"list": [
{
"current": {},
"hide": 0,
"includeAll": false,
"label": "Prometheus",
"multi": false,
"name": "DS_PROMETHEUS",
"options": [],
"query": "prometheus",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
}
]
},
"time": {"from": "now-15m", "to": "now"},
"title": "Lab6 API",
"uid": "lab6-api",
"version": 1
"uid": "lab6-api"
}