-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreceiver.yaml
38 lines (38 loc) · 1.47 KB
/
receiver.yaml
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
37
38
apiVersion: monitoring.coreos.com/v1alpha1
kind: AlertmanagerConfig
metadata:
name: critical-non-live-new
namespace: monitoring
labels:
prometheus: main
spec:
route:
receiver: slack
groupBy: ['alertname']
groupWait: 30s
groupInterval: 30s
repeatInterval: 12h
matchers:
- name: severity
value: "critical"
receivers:
- name: slack
slackConfigs:
- channel: "alerts-critical"
username: "Alert Manager"
iconEmoji: ":alert_bell_med:"
sendResolved: true
title: |-
[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .CommonLabels.alertname }} ({{ .CommonLabels.cluster }})
titleLink: "{{ .CommonAnnotations.link }}"
pretext: "{{- if .CommonAnnotations.alert_owner_user -}} <@{{.CommonAnnotations.alert_owner_user}}> {{end}} {{- if .CommonAnnotations.alert_owner_team -}} <!subteam^{{.CommonAnnotations.alert_owner_team}}> {{end}}*{{ .CommonAnnotations.summary }}*"
text: |-
{{ range .Alerts -}}
>{{ .Annotations.description }}
{{ end }}
footer: |-
{{ range .CommonLabels.SortedPairs }}{{ if and (ne .Name "app") (ne .Name "namespace") (ne .Name "class") (ne .Name "alertname") (ne .Name "resolvable") (ne .Name "severity")}}
• *{{ .Name }}:* `{{ .Value }}`{{ end }}{{ end }}
apiURL:
name: slack-webhook
key: url