3

Is it possible to remove the link that we get when AlertManager posts to Slack?

At the moment it's going to http://localhost:9093/.

markalex
  • 8,623
  • 2
  • 7
  • 32
Snowcrash
  • 80,579
  • 89
  • 266
  • 376

1 Answers1

1

You can overwrite it with different link, for example the real one (can even try to pull null). Mind that default configuration is being used if you don't change it in Alertmanager receivers:

[ title_link: <tmpl_string> | default = '{{ template "slack.default.titlelink" . }}' ]

where

{{ define "slack.default.titlelink" }}{{ template "__alertmanagerURL" . }}{{ end }}

Please check your current config by going to <your_prometheus_url>:9093/#/status and then change configs in alertmanager.yml receivers: section.

Check slack_receiver configuration here: https://www.prometheus.io/docs/alerting/latest/configuration/#slack_config

Check this blog entry for some examples: https://prometheus.io/blog/2016/03/03/custom-alertmanager-templates/

Ivan Aracki
  • 4,861
  • 11
  • 59
  • 73