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).
- audit log section: allowlist fields, the two-retention-policies note, and the
05:52-05:58 UTC incident (stage.pack leaked _entry; fixed, purged by wiping
the PVC and resetting positions).
- measurements: 7.0x compression on the fresh store; two regimes (quiet 360
MB/day, osint crawl 3.2 GB/day raw) -> <=3.7 GiB over 192h against an 8Gi PVC.
- pitfalls that cost real time: alloy validate does not catch component build
errors, stage.json is JMESPath, stage.pack keeps _entry, file source needs an
explicit timestamp stage, alloy positions path permissions.
- acceptance evidence: the real 7-day lines, per-source retained depth (incl.
the honest 5d9h pod-log ceiling) and the restart test.
- alert threshold: 200 kB/s (was 12 MiB/s, which was ~50x too lax to mean
anything against an 8Gi PVC).
Measured during a crawl (2026-11-27 04:45-05:45Z): osint/news-scraper produced
~150 MB/h, 88 % of it one JSON item dump per crawled article (up to 4.7 kB per
line, the same rows are in the osint Postgres DB). At the observed 2.9x
compression that is ~10 GB over 192h and would not fit the 8Gi PVC, so drop
exactly those lines by prefix for that one container. Operational lines
(INFO/WARNING/ERROR, tracebacks, duplicate-URL warnings) still ship.
docs/logging.md: document the drop rule and the two measured regimes.
No log store existed: pod logs were kubelet files on the node and died with the
pod (~8h deepest history for a busy workload). Adds:
- Loki 3.7.1 single-binary (1 Deployment + 8Gi local-path PVC on siriussec),
retention_period 192h with the compactor deleting on filesystem, ingest rate
limits, so the store is time- and rate-bounded.
- Alloy 1.13.0 DaemonSet (all nodes, no RBAC, no API access) shipping
/var/log/pods, /var/log/journal and the Pi's docker json logs. File sources
read from byte 0 and stamp the timestamp from the line, so the history the
nodes already held (18d cilium on linode, 31d registry on rpi) landed on day
one instead of starting the 7-day clock at deploy time.
- Grafana datasource (uid loki) via the existing sidecar, ServiceMonitor,
ingest-rate guard rule.
- docs/logging.md with the measured bytes/day, the 8-day projection and the
runbook.
Measured: ~360-502 MB/day raw -> ~90 MB/day compressed, 192h -> <=0.8GiB, on a
node with 103GiB free (house floor 32GiB). Verified 7-day-old lines return for
kube-system cilium-agent and for the siriussec/linode journals, and survive a
Loki pod restart (PVC).