forked from lisenet/kubernetes-homelab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
alertmanager-config-map.yml
36 lines (36 loc) · 1.35 KB
/
alertmanager-config-map.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
apiVersion: v1
kind: ConfigMap
metadata:
name: alertmanager
namespace: monitoring
labels:
app: alertmanager
data:
alertmanager.yml: |
global: {}
route:
group_by: ['alertname', 'job']
group_wait: 30s # how long to wait to buffer alerts of the same group before sending a notification initially
group_interval: 1h # how long to wait before sending an alert that has been added to a group for which there has already been a notification
repeat_interval: 30s # how long to wait before re-sending a given alert that has already been sent in a notification
receiver: 'slack_homelab' # default/fallback request handler
# Send severity=warning alerts to slack
routes:
- receiver: slack_homelab
match:
severity: warning
# See https://lisenet.slack.com/apps/A0F7XDUAZ-incoming-webhooks
receivers:
- name: 'slack_homelab'
slack_configs:
- api_url: SLACK_WEBHOOK_URL
channel: '#homelab'
send_resolved: true
title: "[{{ .Status | toUpper }}] {{ range .Alerts }}{{ .Annotations.summary }}\n{{ end }}"
text: |-
{{ range .Alerts }}*Description:* {{ .Annotations.description }}
*Context:* {{ .Labels.context }}
*Cluster:* {{ .Labels.cluster }}
*Severity:* {{ .Labels.severity }}
{{ end }}