Prometheus HA Replicas and Alertmanager Deduplication: Label-Set Identity Across Replicas
0 reputation · 28 Feb 2021, 04:52 UTC
0 reputation · 28 Feb 2021, 04:52 UTC
Prometheus HA replicas each expose firing and resolved alerts to a shared Alertmanager via the Prometheus Alerting API at /api/v1/alerts. Alertmanager deduplicates incoming alerts by comparing label sets, treating alerts with identical labels as a single group for notification purposes.
The deduplication logic is version-sensitive and depends on whether replicas share identical external_labels. When replicas carry divergent external_labels, the same alerting rule produces distinct alert identities in Alertmanager, potentially triggering duplicate notifications. Annotations are excluded from the grouping key, yet alerts differing only in annotations may still appear as separate entries depending on the Alertmanager version and receiver configuration. Prometheus does not query Alertmanager for active silences or inhibitions, so it continues sending alerts that Alertmanager may suppress.
Documented behavior does not fully specify how Alertmanager reconciles alerts when replicas emit identical label sets but divergent annotation payloads, nor does it clarify whether fingerprint comparison at /api/v2/alerts reliably confirms HA merging across all supported versions.
external_labels configuration across replicas guarantees single-notification semantics without deploying a test rule?A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.