alertmanager配置企业微信
alertmanager部署详见prometheus的方案设计以及部署详解
配置企业微信:
[root@bogon ~]# cat /etc/alertmanager/alertmanager.yml
global:
resolve_timeout: 5m
wechat_api_url: 'https://qyapi.weixin.qq.com/cgi-bin/'
templates:
- '/etc/alertmanager/wechat.tmpl'
route:
group_by: ['alertname']
group_wait: 10s
group_interval: 10s
repeat_interval: 10m
receiver: 'wechat'
receivers:
- name: 'wechat'
wechat_configs:
- corp_id: 'ww7329a73bf83d1d39'
to_party: '3'
agent_id: '1000005'
api_secret: 'lzWFlJIfbVW8QdlTvcVcFqZ-Rf0nR_gTr43oiS4AENE'
send_resolved: true
inhibit_rules:
- equal: ['alertname', 'cluster', 'servic