通过 Email 接收告警
修改 AlertManager 配置文件
global:
smtp_smarthost: 'smtp.qq.com:587'
smtp_from: 'xxx@qq.com'
smtp_auth_username: 'xxx@qq.com'
smtp_auth_password: 'your_email_password'
route:
# If an alert has successfully been sent, wait 'repeat_interval' to resend them.
repeat_interval: 10s
# A default receiver
receiver: team-X-mails
receivers:
- name: 'team-X-mails'
email_configs:
- to: 'team-X+alerts@example.org'在prometheus下添加 alert.rules 文件
修改 prometheus.yml 文件
启动AlertManager服务
启动prometheus服务
Last updated