Search code examples
smtpgmailsmtp-authprometheus

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


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?


Solution

  • 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.