[Phase 4] Add api_data_freshness_seconds SLO alert to flux/monitoring/prometheusrule-apis.yaml #88
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Problem
The
flux/monitoring/prometheusrule-apis.yamldefines SLO alerts forAPIHighErrorRateandAPIHighLatencybut is missing an alert forapi_data_freshness_seconds. This metric (gauging seconds since last successful data re-seed) is defined in the metrics standard (docs/metrics-standard.md) and must be instrumented per ROADMAP.md §Phase 4, but no alert fires if data goes stale.Without a freshness alert, an API could serve month-old cached data silently and no one would be notified.
What to do
Add a new PrometheusRule alert group to
flux/monitoring/prometheusrule-apis.yaml:Threshold: 2592000 seconds = 30 days (matching the monthly re-seed schedule in ROADMAP.md §Phase 2).
Also add a critical alert at 60 days:
Acceptance criteria
kustomize build flux/passes with the updated PrometheusRulekubectl apply --dry-run=client -f flux/monitoring/prometheusrule-apis.yamlagainst a cluster)APIDataStale(warning, 30d) andAPIDataCriticallyStale(critical, 60d) alerts appear in the Prometheus Alerts UI once deployedAPIHighErrorRateandAPIHighLatencyalerts are unmodified.gitea/workflows/validate-flux.yaml) passes on the PRDependencies
api_data_freshness_seconds)(Reference: ROADMAP.md §Phase 4; docs/metrics-standard.md)
✅ Implemented — PR #92 merged.
Changes to
flux/monitoring/prometheusrule-apis.yaml:APIDataStalefor:from5m→30mas specifiedAPIDataCriticallyStalealert at 60-day threshold (5184000s),for: 1h, severity: criticalkustomize build flux/passes. Existing alerts unmodified.