Docs/Prometheus/alertmanager.md
2022-10-18 16:59:37 +08:00

27 lines
No EOL
702 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

建立警告与通知的主要步骤:
```
创建和配置AlertManager
启动prometheus时通过-alertmanager.url配置alertmanager地址使prometheus与alertmanager建立链接
```
#### 创建配置文件alertmanager.yaml
```
global:
resolve_timeout: 5m
route:
group_by: ['ops']
group_wait: 10s #组报警等待时间
group_interval: 10s #组报警间隔时间
repeat_interval: 1m #重复报警间隔时间
receiver: 'web.hook'
receivers:
- name: 'web.hook'
webhook_configs:
- url: 'http://10.211.55.2:8888/open/test'
inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
equal: ['alertname', 'dev', 'instance']
```