Writing an email with Alert manager

43 views
Skip to first unread message

Big Noob

unread,
Mar 24, 2020, 5:25:24 AM3/24/20
to Prometheus Users
Hello everyone,
I have an SMTP for testing, I see that AlertManager is creating a connection with it (I have done all the necessary configuration), I want to know how can I create a custom mailing.
Thanks for your time.

Christian Hoffmann

unread,
Mar 24, 2020, 5:32:55 PM3/24/20
to Big Noob, Prometheus Users
Hi,
Have a look at the alertmanager email receiver config, especially at the
"html" and optionally "text" fields [1]. They take template strings,
which means that you can control the content.

It's a good idea to start with the default template (email.default.html)
[2].

[1] https://prometheus.io/docs/alerting/configuration/#email_config
[2]
https://github.com/prometheus/alertmanager/blob/master/template/default.tmpl#L85

Further links:
https://prometheus.io/docs/alerting/notifications/
https://prometheus.io/docs/alerting/notification_examples/

Kind regards,
Christian
Reply all
Reply to author
Forward
0 new messages