Alert Manager source URL to point to TLS URL of Prometheus

27 views
Skip to first unread message

sunils...@gmail.com

unread,
Sep 14, 2020, 1:48:20 AM9/14/20
to Prometheus Users
Hi, 

I have setup prometheus with TLS using Nginx in front of Prometheus as below path. 

Request --> nginx --> Prometheus . 

Now the challenge is , AlertManager is directly associated with PRometheus and when I access AlertManager , All the source links ate pointing to Prometheus directly . 
Can we configure alertmanager source URL to TLS URL of Prometheus  ? 

Thanks 

Wesley Peng

unread,
Sep 14, 2020, 1:50:49 AM9/14/20
to promethe...@googlegroups.com
You can setup Nginx to proxy both Alertmanager and Prometheus itself on
different http port.

regards.

Sagar

unread,
Sep 14, 2020, 2:03:04 AM9/14/20
to Wesley Peng, Prometheus Users
Hi Wesley, 
Thanks for your quick response on this .
My AlertManage is running behind Nginx . 

But on the Alertmanager page, as shown in below pic, the source link is pointing to the direct URL of Prometheus (without nginx). 

image.png


--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/427ffa62-06f1-9e59-d613-310ddcf1a32b%40pobox.com.

Julien Pivotto

unread,
Sep 14, 2020, 2:21:11 AM9/14/20
to Sagar, Wesley Peng, Prometheus Users
Hello,

You can set the nginx url with the --web.external-url parameter of Prometheus.

Sagar

unread,
Sep 14, 2020, 10:47:06 AM9/14/20
to Julien Pivotto, Wesley Peng, Prometheus Users
Hi Julien, 

Thanks for this solution  , this method worked . 
Prometheus is still accessible through port 9090 . Can we stop this accessibility, so that it is accessible only through nginx . 

Thanks 

Brian Candler

unread,
Sep 14, 2020, 11:12:19 AM9/14/20
to Prometheus Users
As long as nginx is proxying to 127.0.0.1:9090, bind prometheus to localhost using  --web.listen-address="127.0.0.1:9090"
Reply all
Reply to author
Forward
0 new messages