https://www.e-learn.cn/content/qita/2638665
AlertManager警报通知 E-mail 微信 模板
#AlertManager配置
#alertmanager.yml
全局配置项
global:
resolve_timeout: 5m #超时,默认5min
#邮箱smtp服务
smtp_smarthost: ‘smtp.qq.com:587’
smtp_from: ‘report@elven.vip’
smtp_auth_username: ‘report@elven.vip’
smtp_auth_password: ‘xxx密码’
smtp_hello: ‘qq.com’
#smtp_require_tls: false
#wechat
#wechat_api_url: “https://qyapi.weixin.qq.com/cgi-bin/”
wechat_api_corp_id: “wwe518* 企业微信账号唯一ID”
wechat_api_secret: “自定义应用 应用的密钥”
模板
templates:
- ‘/alertmanager/*.tmpl’
路由
route:
group_by: [‘alertname’] # 报警分组依据
group_wait: 20s #组等待时间
group_interval: 20s # 发送前等待时间
repeat_interval: 12h #重复周期
receiver: ‘email’ # 默认警报接收者
#子路由
routes:
- r