Alertmanager HA

45 views
Skip to first unread message

Dudi Cohen

unread,
Nov 14, 2020, 2:41:13 PM11/14/20
to Prometheus Developers
Hi all, I would like to configure Alertmanager for high availability in k8s.
Can anyone please explain the difference between `cluster.advertise-address` and `cluster.listen-address`? I've seen either one used in different examples, sometimes with `0.0.0.0` and sometimes with `$(POD_IP)` so i'm also not sure what the address should be. 
The documentation is a bit unclear regarding the differences: "The cluster.advertise-address flag is required if the instance doesn't have an IP address that is part of RFC 6890 with a default route."
Thanks!

Matthias Rampke

unread,
Nov 16, 2020, 2:44:07 AM11/16/20
to Dudi Cohen, Prometheus Developers
The listen address is the one that alertmanager binds to. Generally, this can be 0.0.0.0 (all interfaces), I believe that is the default and thus sometimes omitted.

It will try to guess which address it can be reached at by other AMs (which address it should advertise to them). In some circumstances this doesn't work right. A Kubernetes pod probably isn't one of those circumstances, but specifying the address explicitly doesn't hurt either.

So in short, I would expect everything to work out of the box in a standard Kubernetes pod, but you can be more explicit if you want to be.

/MR


--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/4b78b5fd-4e04-4276-a8d0-6388d8398413n%40googlegroups.com.

Dudi Cohen

unread,
Nov 16, 2020, 3:12:29 AM11/16/20
to Prometheus Developers
Thanks! It has indeed worked out of the box by just specifying cluster.peer.
Reply all
Reply to author
Forward
0 new messages