Skip to content

fix(prometheus): keep a clustered Alertmanager from repeating a resolved alert - #118

Merged
hackallcode merged 1 commit into
masterfrom
fix/prometheus-am-peer-timeout
Dec 2, 2026
Merged

hackallcode merged 1 commit into
masterfrom
fix/prometheus-am-peer-timeout

Conversation

@hackallcode

Copy link
Copy Markdown
Owner

Summary

In an Alertmanager cluster a peer at position N takes its snapshot of a group, waits N × peer-timeout, and only then
checks the shared notification log. If another peer notified a resolution during that wait, the snapshot still holds
the alert as firing while the log entry does not, so the waiting peer sends it as firing again and the next flush
resolves it once more: the chat shows resolved, firing, resolved for one change.

The window is the wait itself. With the upstream 15s and a 30s group interval it catches a good share of
resolutions. The role now passes peer-timeout: 5s when alertmanager_cluster sets a listen-address; a normal
Telegram send completes well within that, and an explicit peer-timeout in alertmanager_cluster still wins. Without
a cluster the upstream {listen-address: ""} is kept, so no gossip flags appear.

…ved alert

A peer at a later cluster position takes its snapshot of a group, waits
peer-timeout times its position, then checks the notification log. When
another peer notified a resolution during that wait, the stale snapshot
holds a firing alert the log does not, so the peer sends it as firing and
the first peer resolves it once more. The 15 s upstream default makes
that window half a 30 s group_interval; 5 s still covers a normal send.
@hackallcode
hackallcode merged commit 0706af9 into master Dec 2, 2026
27 checks passed
@hackallcode
hackallcode deleted the fix/prometheus-am-peer-timeout branch December 2, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant