Email#
Alertmanager 内置 email_configs,适合低频、审计类、非实时告警。
1. API / Protocol#
Email 使用 SMTP。
docs:
2. Alertmanager Config#
global:
smtp_smarthost: smtp.example.com:587
smtp_from: alertmanager@example.com
smtp_auth_username: alertmanager@example.com
smtp_auth_password: ${SMTP_PASSWORD}
smtp_require_tls: true
route:
receiver: email-platform
receivers:
- name: email-platform
email_configs:
- to: platform@example.com
send_resolved: true
headers:
subject: '{{ template "alert.title" . }}'
html: '{{ template "alert.text" . }}'3. Notes#
Best Practice:
Email 不适合强实时告警
用于日报、审计、低优先级告警更合适
SMTP password 使用 Secret 管理