On Monday, 16 May 2022 at 09:05:28 UTC+1 [email protected] wrote:

> Thank you. I'm deploying 2 alertmanagers with 2 separate deployment files. 
> So I have to specify 2 different 
> --web.external-url=http://localhost:9093/alertmanager1/
> --web.external-url=http://localhost:9093/alertmanager2/ 
> <http://localhost:9093/alertmanager1/>
>

Only if you are running two alertmanagers on the same host.  Why do you 
want to do that?
 

> And then configure as below, am I right?
> alerting:
>       alertmanagers:
>       - scheme: http
>         path_prefix: "/alertmanager1/"
>
>         static_configs:
>         - targets: ['alertmanager1.monitoring.svc:9093']
> alerting:
>       alertmanagers:
>       - scheme: http
>         path_prefix: "/alertmanager1/"
>
>         static_configs:
>         - targets: ['alertmanager1.monitoring.svc:9093']
>
>
No, unless those two "alerting" sections are present in two different 
prometheus servers.

If you want a single prometheus to send all alerts to both alertmanagers, 
then you'd have a single "alerting" section with two targets. Unfortunately 
the "path_prefix" is common to all targets, so you would also have to 
configure alert_relabel_configs 
<https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs>
 to 
set the __alerts_path__ label separately for each target.

It's possible, but I don't understand what you're actually trying to 
achieve here, and therefore I suspect there's a much better and simpler way.

-- 
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/5217ba53-0752-45ad-90a3-db41bcb15f52n%40googlegroups.com.

Reply via email to