我如何告诉 Prometheus 的 Alertmanager 通过 Gmail 的 SMTP 服务器发送电子邮件

dug*_*ous 5 gmail smtp smtp-auth prometheus

当指标超过特定阈值时,我希望 Prometheus 从 Gmail (Gapps) 帐户发送电子邮件。在Alertmanager 配置文档中,没有提到密码。如何对 SMTP 服务器进行身份验证?

bri*_*zil 7

这可以通过域来完成auth_usernameauth_password并且auth_identity在配置文件中。

http://www.robustperception.io/sending-email-with-the-alertmanager-via-gmail/上有完整指南

确保您使用的是最新的警报管理器,0.1.1 将不起作用。