我已经实现了Prometheus和警报管理器,但是它只发送了启动警报实例,它也只发送了启动警报
Prometheus配置
名称:slack_config
slack_configs:
- channel: '#alertmanager'
send_resolved: True
title: '{{ if eq .Status "firing" }}:rotating_light: Dev-central-alerts {{ else }} :relaxed: Dev-central-alerts {{ end }} [{{ .Status | toUpper }}] {{ .CommonAnnotations.summary }} '
text: |-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }}
*Description:* {{ .Annotations.description }}
*Graph:* <https://prometheus.central.demo01.halo.telekom-dienste.de/alerts |:chart_with_upwards_trend:>
Details:
instance_ip: `{{ .Labels.instance }}`
{{ range .Labels.SortedPairs }} {{ if eq .Name "alertname"}} {{ .Name }}: `{{ .Value }}` {{ end }}
{{ end }}
{{ end }}
route:
group_by: ['alertname', 'app']
group_wait: 30s
group_interval: 5m
receiver: email_config
repeat_interval: 5m
routes:
- match:
severity: critical
continue: true
receiver: slack_config
repeat_interval: 60m
- match:
severity: page
repeat_interval: 5m
receiver: slack_config
- match:
severity: warning
repeat_interval: 5h
receiver: slack_config
#
规则文件