Commit graph homek8s/monitoring/controllers/home/dashboards/forgejo-runners.yaml
Author SHA1 Message Date
Lance Walters
e63af123c5 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.
2026-10-27 01:40:15 -04:00
Lance Walters
28632e61c6 dashboards: fix runner pod selector and custom-metric labels after panel validation
Panel validation against the live Prometheus API caught three real faults:
- pod=~"forgejo-runner-.*" also matched the forgejo-runner-prune-* CronJob pods,
  which are Completed and permanently not-Ready, so the not-Ready stat read 3.
- CNPG custom-query metrics carry namespace/pod from the scrape, not the
  exporter's cluster label, so cluster="pg" matched nothing (empty panels).
- a missing paren in the memory-working-set expression (HTTP 400 from Prometheus).

Also make two legitimately-empty stats render a hard 0 (or vector(0)) instead of
'No data': not-Ready runner pods, and nodes with DiskPressure.

55/55 panel targets now return non-empty results.
2026-10-27 01:36:02 -04:00
Lance Walters
9e851f4dfe monitoring: custom Forgejo runner, CNPG and workload dashboards from git
Dashboards (uid forgejo-runners, cnpg-postgres, home-lab-workloads) live as
ConfigMaps generated from monitoring/controllers/home/dashboards/build.py and are
loaded by the kube-prometheus-stack grafana sidecar.

Postgres was not scraped at all before this: add a hand-written PodMonitor per
CNPG cluster (release=kube-prometheus-stack, which is what this Prometheus's
podMonitorSelectorNilUsesHelmValues default requires) plus
spec.monitoring.customQueriesConfigMap on both Clusters. enablePodMonitor stays
false — deprecated in CNPG 1.27 and it gives no control over labels.

pg-actions-queries.yaml adds the Forgejo Actions queue/outcome/last_online
metrics that only the forgejo database can answer.

prometheus-node-exporter is no longer pinned to siriussec: the arm64 runner's
jobs are host containers on rpi, so the Pi's root filesystem is the disk that
matters there and kubelet cannot see it.

docs/monitoring-dashboards.md documents the PromQL, the exporter GRANT and the
known unknowns (arm64 per-job breakdown, hostPath PVs have no kubelet volume
stats, single-instance replication, no backups).
2026-10-27 01:32:20 -04:00