fix(flux-audit): stop a working alarm from looking like a broken job #173
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/flux-audit-alarm-semantics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
flux-audit was never broken. It has been running every night, finding real orphans, and exiting 1 to report them - which is indistinguishable from a crashed job. So three months of
BackoffLimitExceededread as noise.Confirmed by running it: 7 orphans right now, 5 of them cert-manager resources Flux does not own.
Worse: it posted findings to ntfy topic
flux-audit, which nothing subscribes to. Alertmanager sends everything tohomelab-alerts. Every finding went into the void twice - an alarm nobody received, expressed as a failure nobody trusted.Changes
exit 0= the audit RAN (findings go out by ntfy);exit 1= the audit is BROKEN. Job failure now means the check is blind, which is the only thing worth paging on.homelab-alerts, and treat an undeliverable notification as a job failure. A silent alarm is the bug being fixed, so it must not pass quietly.restartPolicy: Never.OnFailuremakes the Job controller delete the failed pod - which is exactly why months of failures could only be seen as "no pods retained, no logs", and why diagnosing this needed a hand-built debug pod.New: prometheus-rules-jobs.yaml
So no scheduled check can go quiet again:
HomelabCronJobFailing- would fire right now for 11 jobs, includingimmich-originals-backupandansible-runner/convergence-check, both failing since ~2026-08-06 with nobody told.HomelabCronJobNotScheduling- a job that stops being scheduled leaves no failed job to alert on. Measured against each CronJob's ownnext_schedule_time, not a flat "not run in 48h":nas/runs four weekly jobs, and a flat threshold would have paged on all four every week for being healthy - which is how an alert teaches people to ignore it.Verification
kubectl kustomizeclean forapps/flux-audit/,apps/monitoring/,apps/.