Files
mtusi2026lab3/infra/monitoring/grafana-dashboard.json
T

107 lines
2.1 KiB
JSON

{
"title": "Lab 3 — API scaling",
"uid": "highload-lab3",
"schemaVersion": 39,
"version": 1,
"refresh": "15s",
"time": {
"from": "now-30m",
"to": "now"
},
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"panels": [
{
"id": 1,
"type": "timeseries",
"title": "HTTP requests/s",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"gridPos": {
"x": 0,
"y": 0,
"w": 12,
"h": 8
},
"targets": [
{
"refId": "A",
"expr": "sum(rate(messenger_http_requests_total[2m])) by (status_class)"
}
]
},
{
"id": 2,
"type": "timeseries",
"title": "Latency p95, seconds",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"gridPos": {
"x": 12,
"y": 0,
"w": 12,
"h": 8
},
"targets": [
{
"refId": "A",
"expr": "histogram_quantile(0.95, sum(rate(messenger_http_duration_seconds_bucket[2m])) by (le))"
}
]
},
{
"id": 3,
"type": "timeseries",
"title": "In-flight requests",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"gridPos": {
"x": 0,
"y": 8,
"w": 12,
"h": 8
},
"targets": [
{
"refId": "A",
"expr": "sum(messenger_http_in_flight) by (pod)"
}
]
},
{
"id": 4,
"type": "timeseries",
"title": "API replicas",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"gridPos": {
"x": 12,
"y": 8,
"w": 12,
"h": 8
},
"targets": [
{
"refId": "A",
"expr": "kube_deployment_status_replicas_available{namespace=\"highload-applications\",deployment=\"api\"}"
}
]
}
]
}