-
Notifications
You must be signed in to change notification settings - Fork 10
/
alertmanager.yml
30 lines (28 loc) · 963 Bytes
/
alertmanager.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
global:
# Slack Workspace API URL
slack_api_url: 'https://hooks.slack.com/services/'
route:
# Group Alerts by
group_by: ['job']
group_wait: 30s
group_interval: 5m
repeat_interval: 4h
receiver: 'slack-notifications'
receivers:
- name: 'slack-notifications'
slack_configs:
# Slack Channel Name in Workspace
- channel: '#alerts'
send_resolved: true
icon_emoji: ':prometheus:'
# Slack Notification Formatting
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .CommonAnnotations.title }}'
text: >-
{{ range .Alerts }}
*Alert:* `{{ .Labels.severity }}` {{ .Annotations.summary }}
*Description:* {{ .Annotations.description }}
*Graph:* <{{ .GeneratorURL }}|:chart_with_upwards_trend:>
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
{{ end }}