HOMELAB-698: fix(monitoring): guard CNPGLastBackupOld alert for clusters without active archiving #150

Merged
aaron merged 1 commit from plane/HOMELAB-698-cnpg-alert-guard into live 2026-04-03 22:42:59 +00:00
Owner

Summary

  • Fixed CNPGLastBackupOld alert to only fire when clusters are actively archiving WALs
  • Added guard clause and cnpg_pg_stat_archiver_archived_count > 0 to PromQL expression
  • Prevents false alerts on clusters with backups intentionally disabled (e.g., lab-director per HOMELAB-590)

Changes

  • Modified core/manifests/monitoring/rules/backup-alerts.yaml
  • Updated CNPGLastBackupOld alert expression

Acceptance Criteria

  • CNPGLastBackupOld alert no longer fires for lab-director namespace
  • PrometheusRule is deployed and active in cluster
  • Alert still fires for clusters WITH active WAL archiving that fall behind
  • No other PrometheusRule alerts are affected
  • Future CNPG clusters with backups disabled are automatically excluded
  • Fixes: HOMELAB-698
  • Related: HOMELAB-590 (B2 API quota conservation)

🤖 Generated with Claude Code

## Summary - Fixed CNPGLastBackupOld alert to only fire when clusters are actively archiving WALs - Added guard clause `and cnpg_pg_stat_archiver_archived_count > 0` to PromQL expression - Prevents false alerts on clusters with backups intentionally disabled (e.g., lab-director per HOMELAB-590) ## Changes - Modified `core/manifests/monitoring/rules/backup-alerts.yaml` - Updated CNPGLastBackupOld alert expression ## Acceptance Criteria - [ ] CNPGLastBackupOld alert no longer fires for lab-director namespace - [ ] PrometheusRule is deployed and active in cluster - [ ] Alert still fires for clusters WITH active WAL archiving that fall behind - [ ] No other PrometheusRule alerts are affected - [ ] Future CNPG clusters with backups disabled are automatically excluded ## Related - Fixes: HOMELAB-698 - Related: HOMELAB-590 (B2 API quota conservation) 🤖 Generated with Claude Code
HOMELAB-698: fix(monitoring): guard CNPGLastBackupOld alert for clusters without active archiving
Some checks failed
0/0 projects applied successfully.
CI Review / ai-review (pull_request) Has been cancelled
CI Review / helm-validate (pull_request) Has been cancelled
CI Review / pr-title (pull_request) Has been cancelled
Lint & Validate / shellcheck (pull_request) Has been cancelled
Lint & Validate / yaml-lint (pull_request) Has been cancelled
Lint & Validate / terraform-validate (pull_request) Has been cancelled
181f01c4dc
aaron merged commit 5f1d0e42ef into live 2026-04-03 22:42:59 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aaron/infra-core!150
No description provided.