12345678910111213141516171819202122232425262728293031 |
- global:
- resolve_timeout: 5m
- # for mail (todo:需要邮件发送告警时需配置)
- # smtp_smarthost: smtp.qq.com:465
- # smtp_from: <smtp mail from>
- # smtp_auth_username: <username>
- # smtp_auth_identity: <username>
- # smtp_auth_password: <password>
- # smtp_require_tls: false
- route:
- group_by: ['alertname']
- group_wait: 10s
- group_interval: 10s
- repeat_interval: 1h
- receiver: 'default-receiver'
- receivers:
- - name: default-receiver
- # email_configs:
- # - to: <mail to address>
- # send_resolved: true
- webhook_configs: # todo:填写告警收集地址
- - url: 'http://localhost:9995/prometheusalert?type=dd&tpl=prometheus-dd&ddurl=钉钉机器人地址'
- - url: 'http://localhost:9995/prometheusalert?type=email&tpl=prometheus-email&email=Email地址'
- inhibit_rules:
- - source_match:
- severity: 'critical'
- target_match:
- severity: 'warning'
- equal: ['alertname', 'dev', 'instance']
|