The log store shipped in t_34ddaa83 but nothing could read it: the Loki datasource ConfigMap was live and written into Grafana's provisioning volume, and Grafana still listed only Prometheus + Alertmanager. Root cause was not the ConfigMap. The datasource sidecar writes the file and then POSTs /api/admin/provisioning/datasources/reload with monitoring/grafana-admin, which was 401-ing because Grafana's DB password had drifted from that Secret (the documented "the Secret is only the seed" behaviour) — Grafana reads provisioning/datasources only at startup, so the datasource never loaded. - Reset the live admin password to the Secret's value (in-pod `grafana cli admin reset-admin-password`, value read from the Secret and never printed), so seed and DB match again and the sidecar's reload returns 200. Documented in docs/grafana-persistence.md, including the sidecar consequence of drift. - New generated dashboard `logs` (uid: logs) with the two queries worth having: secret access over time by user from the apiserver audit stream, and pod errors by namespace, plus the runner namespaces and a note panel on field names. - The audit stream's names are the Alloy allowlist's, not the audit event's: objectRef.resource arrives as the stream label `resource` and user.username as the field `user`. `| json | objectRef_resource="secrets"` returns 0 rows (measured); the panels use `resource="secrets"` in the selector + `| json` for the user dimension. No pipeline, retention or filter change. - Runner panels discover their namespace via a `runner_ns` variable (.*(runner|forgejo).*) instead of pinning one name, so the t_2bbe34a8 move to ci-runners needs no edit here. - validate_panels.py now dispatches on the target's datasource and queries Loki for `loki` panels (a logs panel must return rows, not just series).
14 lines
633 B
YAML
14 lines
633 B
YAML
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
kind: Kustomization
|
|
# Custom dashboards, loaded by the kube-prometheus-stack grafana sidecar
|
|
# (label grafana_dashboard=1, NAMESPACE=ALL, folder annotation grafana_folder).
|
|
# Regenerate the YAML from build.py after editing a panel; the JSON inside each
|
|
# ConfigMap is the deliverable, the .yaml is generated.
|
|
resources:
|
|
- forgejo-runners.yaml
|
|
- cnpg-postgres.yaml
|
|
- home-lab-workloads.yaml
|
|
# Loki panels: secret access from the apiserver audit stream, pod errors by
|
|
# namespace, CI runner output. Datasource uid `loki`
|
|
# (infrastructure/logging/datasource.yaml).
|
|
- logs.yaml
|