Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prometheus Alert Manager Configure Notification Title URL

Tags:

prometheus

In Prometheus Alert Managers Slack Notifications, the default title includes a clickable url link that goes to: http://app:9093/#/alerts?receiver=<my_receiver_name>

How do I configure the http://app so that it can be http://myserver

like image 830
clay Avatar asked Jan 03 '23 09:01

clay


1 Answers

Looks to me like that link is generated by this Go template:

{{ define "__alertmanagerURL" }}{{ .ExternalURL }}/#/alerts?receiver={{ .Receiver }}{{ end }}

Which suggests that you should set --web.external-url=http://myserver (or -web.external-url=http://myserver on older releases) on the command line when starting alertmanager. The flag doesn't seem to be documented anywhere except the source code.

UPDATE: Newer releases of alermtmanager require two hyphens rather than one. Updating this accordingly for people finding this via search.

like image 106
Alin Sînpălean Avatar answered Mar 06 '23 00:03

Alin Sînpălean