提交 42f4bb0c authored 作者: testing's avatar testing

fix

上级 3bebba7c
global:
resolve_timeout: 5m
# global:
# resolve_timeout: 5m
# route:
# group_by: ['alertname']
# group_wait: 10s
# group_interval: 10s
# repeat_interval: 1h
# receiver: 'web.hook'
# receivers:
# - name: 'web.hook'
# webhook_configs:
# - url: 'http://127.0.0.1:5001/'
# inhibit_rules:
# - source_match:
# severity: 'critical'
# target_match:
# severity: 'warning'
# equal: ['alertname', 'dev', 'instance']
global:
# 每2分钟检查一次是否恢复
resolve_timeout: 2m
# 自定义通知模板
templates:
- '/etc/alertmanager/template/wechat.tmpl'
# route用来设置报警的分发策略
route:
# 采用哪个标签来作为分组依据
group_by: ['alertname']
# 组告警等待时间。也就是告警产生后等待10s,如果有同组告警一起发出
group_wait: 10s
# 两组告警的间隔时间
group_interval: 10s
# 重复告警的间隔时间,减少相同微信告警的发送频率
repeat_interval: 1h
receiver: 'web.hook'
# 设置默认接收人
receiver: 'wechat'
routes: # 可以指定哪些组接手哪些消息
- receiver: 'wechat'
continue: true
group_wait: 10s
receivers:
- name: 'web.hook'
webhook_configs:
- url: 'http://127.0.0.1:5001/'
inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
equal: ['alertname', 'dev', 'instance']
- name: 'wechat'
wechat_configs:
- corp_id: 'ww0a3a384b9c3064b4' #企业微信中 企业id
to_party: '2' #企业微信中的接受告警 部门id
agent_id: '1000002' #企业微信中 应用agent id
api_secret: '5UMId0_J-UbeikXADMg16ZgXUDylrLzrhkcGPg-7mm8' #企业微信中应用的 secret
send_resolved: true
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论