-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
42 lines (39 loc) · 1.35 KB
/
config.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
37
38
39
40
41
42
---
route:
group_wait: 10s
group_interval: 30s
repeat_interval: 10m
receiver: "slack"
routes:
- receiver: "slack"
group_wait: 10s
match_re:
severity: critical|warning
continue: true
receivers:
- name: "slack"
slack_configs:
- api_url: 'https://yourslackhookurl.whatever/cddsfasfdas/adsfafdaf/aasdfafddafa'
send_resolved: true
channel: 'somechannel'
icon_url: https://avatars3.githubusercontent.com/u/3380462
title: |
[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .CommonLabels.alertname }} for {{ .CommonLabels.job }}
{{- if gt (len .CommonLabels) (len .GroupLabels) -}}
{{" "}}(
{{- with .CommonLabels.Remove .GroupLabels.Names }}
{{- range $index, $label := .SortedPairs -}}
{{ if $index }}, {{ end }}
{{- $label.Name }}="{{ $label.Value -}}"
{{- end }}
{{- end -}}
)
{{- end }}
text: |
{{ range .Alerts -}}
*Alert:* {{ .Annotations.title }}{{ if .Labels.severity }} - `{{ .Labels.severity }}`{{ end }}
*Description:* {{ .Annotations.description }}
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
{{ end }}