On Tuesday, 17 May 2022 at 02:18:58 UTC+1 [email protected] wrote:
> I just want to implement when one alertmanager is failed, there is another
> redundancy one is working well.
>
What you want is alertmanager clustering.
Create two separate alertmanagers in separate hosts (or pods). They can use
the same path prefix '/' or '/alertmanager/' as appropriate, since they
have separate hostnames (or service names).
Configure prometheus to send alerts to both alertmanagers, by listing them
both in the 'targets' section:
alerting:
alertmanagers:
- static_configs:
- targets: ['alertmanager1.monitoring.svc:9093',
'alertmanager2.monitoring.svc:9093']
Configure the two alertmanagers to gossip to each other with the
--cluster.* flags. For more information, please read the documentation:
https://prometheus.io/docs/alerting/latest/alertmanager/#high-availability
https://github.com/prometheus/alertmanager#high-availability
> So may I ask what's the difference between totally 2 different
deployments and 1 deployment with 2 replicas?
That's nothing to do with prometheus or alertmanager. Those are only
kubernetes concepts.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/e03f90f3-60de-411d-974a-aea9ea52a82en%40googlegroups.com.