Fix Alertmanager inhibit rule for Gmail OAuth duplicate alerts #323
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/pal-e-platform#323
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
Type
Bug
Lineage
Standalone — discovered 2026-05-01 during alert-state audit. Related to
forgejo_admin/pal-e-platform #290(the PR that introduced the inhibit rule).Repo
forgejo_admin/pal-e-platformWhat Broke
The Alertmanager inhibit rule added in #290 fails to suppress the
GmailOAuthTokenExpiringSoonwarning whenGmailOAuthTokenExpiredcritical is already firing. Both fire simultaneously, doubling the noise.The rule:
Equals on
alertname, but the two alerts have different alertnames (GmailOAuthTokenExpiredvsGmailOAuthTokenExpiringSoon), so the rule never matches them.Repro Steps
GmailOAuthTokenExpiredandGmailOAuthTokenExpiringSoonto fire (token age >7d).kubectl exec -n monitoring alertmanager-... -c alertmanager -- wget -qO- http://localhost:9093/api/v2/alerts→ both alerts present, neither inhibited.Expected Behavior
When
GmailOAuthTokenExpiredis firing,GmailOAuthTokenExpiringSoonis suppressed (not delivered to telegram receiver).Environment
monitoringkube-prometheus-stackterraform/modules/monitoring/main.tf,inhibit_rulesblockAcceptance Criteria
OOMKilledetc.)secret-label inhibit rule; OR equal-onnamespaceonly)Related
pal-e-platform— projectforgejo_admin/pal-e-platform #290— origin of the buggy rulealert-report-2026-05-01— alert snapshot