apiVersion: v1 kind: ConfigMap metadata: name: cluster-health-grafana-dashboard namespace: monitoring labels: grafana_dashboard: "1" data: cluster-health.json: | { "title": "Cluster Health / Crash Overview", "uid": "cluster-health", "schemaVersion": 39, "time": { "from": "now-6h", "to": "now" }, "refresh": "30s", "templating": { "list": [ { "name": "datasource", "type": "datasource", "query": "prometheus", "current": {} } ] }, "panels": [ { "id": 1, "title": "Container aktuell im Waiting-Zustand", "type": "stat", "datasource": { "type": "prometheus", "uid": "${datasource}" }, "gridPos": { "h": 5, "w": 24, "x": 0, "y": 0 }, "fieldConfig": { "defaults": { "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 1 } ] } }, "overrides": [] }, "targets": [ { "expr": "sum(kube_pod_container_status_waiting == 1) or vector(0)", "legendFormat": "Waiting Container", "refId": "A" } ] }, { "id": 2, "title": "Welche Pods/Container warten", "type": "table", "datasource": { "type": "prometheus", "uid": "${datasource}" }, "gridPos": { "h": 8, "w": 24, "x": 0, "y": 5 }, "targets": [ { "expr": "kube_pod_container_status_waiting == 1", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } ] }, { "id": 3, "title": "Letzter Terminierungsgrund (ohne 'Completed')", "type": "table", "datasource": { "type": "prometheus", "uid": "${datasource}" }, "gridPos": { "h": 8, "w": 24, "x": 0, "y": 13 }, "targets": [ { "expr": "kube_pod_container_status_last_terminated_reason{reason!=\"Completed\"} == 1", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } ] }, { "id": 4, "title": "Pods nicht im Running/Succeeded Zustand", "type": "table", "datasource": { "type": "prometheus", "uid": "${datasource}" }, "gridPos": { "h": 8, "w": 24, "x": 0, "y": 21 }, "targets": [ { "expr": "kube_pod_status_phase{phase=~\"Failed|Unknown|Pending\"} == 1", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } ] }, { "id": 5, "title": "Meiste Container-Restarts (letzte Stunde)", "type": "table", "datasource": { "type": "prometheus", "uid": "${datasource}" }, "gridPos": { "h": 8, "w": 24, "x": 0, "y": 29 }, "targets": [ { "expr": "topk(10, increase(kube_pod_container_status_restarts_total[1h]) > 0)", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } ] } ] }