--- # Grafana dashboard for VM health (docs/10 — per-platform-component dashboard). A plain ConfigMap # labeled `grafana_dashboard` that the kube-prometheus-stack Grafana sidecar auto-loads (searchNamespace # ALL, see platform/monitoring/kube-prometheus-stack.yaml). No CRD dependency, but co-located with the # rest of the KubeVirt monitoring wiring and applied via platform-config for locality. apiVersion: v1 kind: ConfigMap metadata: name: kubevirt-vm-health-dashboard namespace: monitoring labels: grafana_dashboard: "1" data: kubevirt-vm-health.json: | { "title": "KubeVirt — VM Health", "uid": "kubevirt-vm-health", "schemaVersion": 39, "timezone": "browser", "tags": ["kubevirt", "platform"], "time": {"from": "now-6h", "to": "now"}, "templating": {"list": []}, "panels": [ { "id": 1, "type": "stat", "title": "Running VMIs", "gridPos": {"h": 6, "w": 8, "x": 0, "y": 0}, "targets": [ {"expr": "sum(kubevirt_vmi_phase_count{phase=\"Running\"})", "legendFormat": "running"} ] }, { "id": 2, "type": "stat", "title": "Failed VMIs", "gridPos": {"h": 6, "w": 8, "x": 8, "y": 0}, "fieldConfig": {"defaults": {"thresholds": {"steps": [ {"color": "green", "value": null}, {"color": "red", "value": 1} ]}}}, "targets": [ {"expr": "sum(kubevirt_vmi_phase_count{phase=\"Failed\"})", "legendFormat": "failed"} ] }, { "id": 3, "type": "timeseries", "title": "VMI count by phase", "gridPos": {"h": 8, "w": 24, "x": 0, "y": 6}, "targets": [ {"expr": "sum by (phase) (kubevirt_vmi_phase_count)", "legendFormat": "{{phase}}"} ] }, { "id": 4, "type": "timeseries", "title": "virt-launcher restarts (15m)", "gridPos": {"h": 8, "w": 24, "x": 0, "y": 14}, "targets": [ {"expr": "increase(kube_pod_container_status_restarts_total{pod=~\"virt-launcher-.*\"}[15m])", "legendFormat": "{{namespace}}/{{pod}}"} ] } ] }