This repository has been archived by the owner on Jul 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
alertmanager.yml
executable file
·65 lines (56 loc) · 1.63 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
global:
resolve_timeout: 1m
route:
receiver: default
repeat_interval: 24h
group_by: ['alertname', 'instance']
receivers:
- name: default
slack_configs:
- api_url: <SLACK_API_URL>
channel: '#monitoring'
send_resolved: true
icon_url: https://avatars3.githubusercontent.com/u/3380462
title: |-
[{{ .Status | toUpper }}] {{ .CommonLabels.alertname }} for {{ .CommonLabels.instance }}
text: >-
{{ range .Alerts -}}
*Alert:* {{ .Annotations.title }}
*Description:* {{ .Annotations.description }}
*Status:* {{ .Status }}
*Labels:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
{{ end }}
opsgenie_configs:
- api_key: <OPSGENIE_API_KEY>
api_url: <OPSGENIE_API_URL>
send_resolved: true
message: |-
{{ .CommonLabels.alertname }} for {{ .CommonLabels.instance }}
description: >-
{{ range .Alerts -}}
<b>Alert:</b> {{ .Annotations.title }}
<b>Description:</b> {{ .Annotations.description }}
<b>Status:</b> {{ .Status }}
<b>Labels:</b>
{{ range .Labels.SortedPairs }} • <b>{{ .Name }}:</b> {{ .Value }}
{{ end }}
{{ end }}
source: alertmanager
priority: |-
{{ if eq (index .Alerts 0).Labels.severity "critical" }}P1{{ else }}P3{{ end }}
responders:
- name: Administrators
type: team
inhibit_rules:
- target_match_re:
alertname: '[^(ClientDown)]'
source_match:
alertname: 'ClientDown'
equal: ['job', 'instance']
- target_match_re:
alertname: '[^(SystemDown)]'
source_match:
alertname: 'SystemDown'
equal: ['job', 'instance']