151 lines
5.3 KiB
JSON
151 lines
5.3 KiB
JSON
{
|
|
"annotations": { "list": [] },
|
|
"editable": true,
|
|
"graphTooltip": 1,
|
|
"title": "PlanPal Prod",
|
|
"uid": "planpal-prod",
|
|
"tags": ["planpal"],
|
|
"time": { "from": "now-1h", "to": "now" },
|
|
"refresh": "30s",
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"name": "namespace",
|
|
"type": "constant",
|
|
"query": "planpal-prod",
|
|
"current": { "text": "planpal-prod", "value": "planpal-prod" },
|
|
"hide": 2
|
|
}
|
|
]
|
|
},
|
|
"panels": [
|
|
{
|
|
"type": "row", "title": "HTTP golden signals (backend)",
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }
|
|
},
|
|
{
|
|
"type": "timeseries", "title": "Request rate (req/s) by route",
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 1 },
|
|
"fieldConfig": { "defaults": { "unit": "reqps" } },
|
|
"targets": [
|
|
{
|
|
"expr": "sum by (route) (rate(http_request_duration_seconds_count{namespace=\"$namespace\"}[5m]))",
|
|
"legendFormat": "{{route}}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "timeseries", "title": "Latency p95 (s) by route",
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 1 },
|
|
"fieldConfig": { "defaults": { "unit": "s" } },
|
|
"targets": [
|
|
{
|
|
"expr": "histogram_quantile(0.95, sum by (le, route) (rate(http_request_duration_seconds_bucket{namespace=\"$namespace\"}[5m])))",
|
|
"legendFormat": "{{route}}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "stat", "title": "Error rate % (5xx)",
|
|
"gridPos": { "h": 6, "w": 8, "x": 0, "y": 9 },
|
|
"fieldConfig": { "defaults": { "unit": "percent", "thresholds": { "steps": [
|
|
{ "color": "green", "value": null }, { "color": "yellow", "value": 1 }, { "color": "red", "value": 5 } ] } } },
|
|
"targets": [
|
|
{
|
|
"expr": "100 * sum(rate(http_request_duration_seconds_count{namespace=\"$namespace\",status=~\"5..\"}[5m])) / clamp_min(sum(rate(http_request_duration_seconds_count{namespace=\"$namespace\"}[5m])), 1)",
|
|
"legendFormat": "5xx %"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "stat", "title": "Requests/s (total)",
|
|
"gridPos": { "h": 6, "w": 8, "x": 8, "y": 9 },
|
|
"fieldConfig": { "defaults": { "unit": "reqps" } },
|
|
"targets": [
|
|
{ "expr": "sum(rate(http_request_duration_seconds_count{namespace=\"$namespace\"}[5m]))" }
|
|
]
|
|
},
|
|
{
|
|
"type": "timeseries", "title": "Requests by status class",
|
|
"gridPos": { "h": 6, "w": 8, "x": 16, "y": 9 },
|
|
"fieldConfig": { "defaults": { "unit": "reqps" } },
|
|
"targets": [
|
|
{
|
|
"expr": "sum by (status) (rate(http_request_duration_seconds_count{namespace=\"$namespace\"}[5m]))",
|
|
"legendFormat": "{{status}}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "row", "title": "Database pool",
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 15 }
|
|
},
|
|
{
|
|
"type": "timeseries", "title": "DB pool connections (active / idle / max)",
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 16 },
|
|
"targets": [
|
|
{ "expr": "db_pool_connections_active{namespace=\"$namespace\"}", "legendFormat": "active" },
|
|
{ "expr": "db_pool_connections_idle{namespace=\"$namespace\"}", "legendFormat": "idle" },
|
|
{ "expr": "db_pool_connections_max{namespace=\"$namespace\"}", "legendFormat": "max" }
|
|
]
|
|
},
|
|
{
|
|
"type": "gauge", "title": "DB pool saturation %",
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 16 },
|
|
"fieldConfig": { "defaults": { "unit": "percent", "min": 0, "max": 100, "thresholds": { "steps": [
|
|
{ "color": "green", "value": null }, { "color": "yellow", "value": 70 }, { "color": "red", "value": 90 } ] } } },
|
|
"targets": [
|
|
{ "expr": "100 * sum(db_pool_connections_active{namespace=\"$namespace\"}) / clamp_min(sum(db_pool_connections_max{namespace=\"$namespace\"}), 1)" }
|
|
]
|
|
},
|
|
{
|
|
"type": "row", "title": "Pod health (all planpal-prod workloads)",
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 24 }
|
|
},
|
|
{
|
|
"type": "timeseries", "title": "CPU cores by pod",
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 25 },
|
|
"fieldConfig": { "defaults": { "unit": "short" } },
|
|
"targets": [
|
|
{
|
|
"expr": "sum by (pod) (rate(container_cpu_usage_seconds_total{namespace=\"$namespace\",container!=\"\",pod!=\"\"}[5m]))",
|
|
"legendFormat": "{{pod}}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "timeseries", "title": "Memory (working set) by pod",
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 25 },
|
|
"fieldConfig": { "defaults": { "unit": "bytes" } },
|
|
"targets": [
|
|
{
|
|
"expr": "sum by (pod) (container_memory_working_set_bytes{namespace=\"$namespace\",container!=\"\",pod!=\"\"})",
|
|
"legendFormat": "{{pod}}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "timeseries", "title": "Pod restarts (increase, 1h)",
|
|
"gridPos": { "h": 6, "w": 12, "x": 0, "y": 33 },
|
|
"targets": [
|
|
{
|
|
"expr": "sum by (pod) (increase(kube_pod_container_status_restarts_total{namespace=\"$namespace\"}[1h]))",
|
|
"legendFormat": "{{pod}}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "stat", "title": "Ready pods",
|
|
"gridPos": { "h": 6, "w": 12, "x": 12, "y": 33 },
|
|
"targets": [
|
|
{
|
|
"expr": "sum by (deployment) (kube_deployment_status_replicas_ready{namespace=\"$namespace\"})",
|
|
"legendFormat": "{{deployment}}"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"schemaVersion": 39,
|
|
"version": 1
|
|
}
|