dashboards: zero-render stats, drop the aspirational folder annotation, keep the validator in the repo
- every count-style stat that can legitimately have no series now ends in 'or vector(0)', so an empty result renders 0 instead of 'No data' (that bit the Pending-pods stat the moment the one Pending pod went away) - no grafana_folder annotation: the sidecar's API reload 401s (Grafana's live admin password is the out-of-band one; the Secret is the first-boot seed), so the dashboards are imported by Grafana's file provider, which has no per-dashboard folder option and puts them in General. The annotation described a path the boards never take. - validate_panels.py lives next to build.py: reads the panel PromQL out of the provisioned ConfigMap and queries Prometheus, so 'every panel returns data' is a command, not a claim. 55/55 targets pass.
This commit is contained in:
parent
28632e61c6
commit
e63af123c5
6 changed files with 149 additions and 21 deletions
|
|
@ -10,7 +10,6 @@ metadata:
|
|||
grafana_dashboard: "1"
|
||||
app.kubernetes.io/part-of: homelab-dashboards
|
||||
annotations:
|
||||
grafana_folder: Homelab
|
||||
homelab.siriusdevops.com/managed-by: monitoring/controllers/home/dashboards/build.py
|
||||
data:
|
||||
home-lab-workloads.json: |
|
||||
|
|
@ -87,7 +86,7 @@ data:
|
|||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"expr": "count(kube_node_status_condition{condition=\"Ready\",status=\"true\"} == 1)",
|
||||
"expr": "count(kube_node_status_condition{condition=\"Ready\",status=\"true\"} == 1) or vector(0)",
|
||||
"refId": "A",
|
||||
"editorMode": "code",
|
||||
"range": true,
|
||||
|
|
@ -219,7 +218,7 @@ data:
|
|||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"expr": "sum(kube_pod_status_phase{phase=\"Pending\"} == 1)",
|
||||
"expr": "sum(kube_pod_status_phase{phase=\"Pending\"} == 1) or vector(0)",
|
||||
"refId": "A",
|
||||
"editorMode": "code",
|
||||
"range": true,
|
||||
|
|
@ -351,7 +350,7 @@ data:
|
|||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"expr": "sum(kube_persistentvolumeclaim_status_phase{phase=\"Bound\"} == 1)",
|
||||
"expr": "sum(kube_persistentvolumeclaim_status_phase{phase=\"Bound\"} == 1) or vector(0)",
|
||||
"refId": "A",
|
||||
"editorMode": "code",
|
||||
"range": true,
|
||||
|
|
|
|||
Loading…
Reference in a new issue