Repository navigation
fix(prometheus): keep a clustered Alertmanager from repeating a resolved alert - #118
Merged
Merged
Conversation
…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
commented
Dec 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In an Alertmanager cluster a peer at position N takes its snapshot of a group, waits
N × peer-timeout, and only thenchecks 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
15sand a30sgroup interval it catches a good share ofresolutions. The role now passes
peer-timeout: 5swhenalertmanager_clustersets alisten-address; a normalTelegram send completes well within that, and an explicit
peer-timeoutinalertmanager_clusterstill wins. Withouta cluster the upstream
{listen-address: ""}is kept, so no gossip flags appear.