Hi, you seem to be using external_labels without alert_relabel_configs to drop this label from your alerts again. Therefore, your alerts will have different labels and will not be de-duplicated.
See this blog post: https://www.robustperception.io/high-availability-prometheus-alerting-and-notification It has an example for the dc label (where you would need replica). Kind regards, Christian On 3/25/20 5:17 AM, sunil sagar wrote: > Hi , > > I have Prometheus environment in HA mode . And AlertManager is also in > HA mode . > I am receiving duplicate alerts . > When I start both the prometheus , because of global label with > different replica name , getting duplicate alert . Please advise. > > Prometheus Config: > > Prometheus Node1: > global: > external_labels: > replica: 1 > > alerting: > alertmanagers: > -static_configs: > - targets: > - alertmanager1:9093 > - alertmanager2:9093 > > ------------------------------------------------------ > Prometheus Node2: > global: > external_labels: > replica: 1 > > alerting: > alertmanagers: > -static_configs: > - targets: > - alertmanager1:9093 > - alertmanager2:9093 > ------------------------------------------------------------- > Sample AlertManager rule: > expr: max(up == 0 ) by (host) > > -- > You received this message because you are subscribed to the Google > Groups "Prometheus Users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to prometheus-users+unsubscr...@googlegroups.com > <mailto:prometheus-users+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/c1b788da-59c0-439c-8fc2-d1ded5f0bf46%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/c1b788da-59c0-439c-8fc2-d1ded5f0bf46%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/d27b20d4-9732-298f-85e1-d94a02a66db7%40hoffmann-christian.info.