How do I tell Prometheus' Alertmanager to send email through Gmail's SMTP server

duggulous picture duggulous · Feb 25, 2016 · Viewed 12.2k times · Source

I would like Prometheus to send emails from a Gmail (Gapps) account when metrics cross certain thresholds. In the Alertmanager config docs, there's no mention of passwords. How do I authenticate to the SMTP server?

Answer

brian-brazil picture brian-brazil · Feb 26, 2016

This can be done with the fields auth_username, auth_password and auth_identity in the config file.

There's a full guide at http://www.robustperception.io/sending-email-with-the-alertmanager-via-gmail/

Make sure you're using a very recent alertmanager, 0.1.1 won't work.