-
Notifications
You must be signed in to change notification settings - Fork 195
Expand file tree
/
Copy pathalertmanager.yml
More file actions
63 lines (58 loc) · 1.84 KB
/
Copy pathalertmanager.yml
File metadata and controls
63 lines (58 loc) · 1.84 KB
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
global:
resolve_timeout: 5m
smtp_smarthost: '${SMTP_HOST}:${SMTP_PORT}'
smtp_from: '${SMTP_FROM}'
smtp_auth_username: '${SMTP_USERNAME}'
smtp_auth_password: '${SMTP_PASSWORD}'
smtp_require_tls: true
route:
receiver: slack-default
group_by: [alertname, severity]
group_wait: 30s
group_interval: 5m
repeat_interval: 4h
routes:
- matchers:
- severity = critical
receiver: pagerduty
continue: true
- matchers:
- severity = critical
receiver: email-oncall
continue: false
receivers:
- name: slack-default
slack_configs:
- api_url: ${SLACK_WEBHOOK_URL}
channel: '#alerts'
send_resolved: true
title: '[{{ .Status | toUpper }}] {{ .CommonLabels.alertname }}'
text: |
{{ range .Alerts }}
*Severity:* {{ .Labels.severity }}
*Summary:* {{ .Annotations.summary }}
*Description:* {{ .Annotations.description }}
{{ end }}
- name: pagerduty
pagerduty_configs:
- service_key: ${PAGERDUTY_SERVICE_KEY}
send_resolved: true
description: '{{ .CommonAnnotations.summary }}'
- name: email-oncall
email_configs:
- to: '${ALERT_EMAIL_TO}'
send_resolved: true
headers:
Subject: '[{{ .Status | toUpper }}] {{ .CommonLabels.alertname }} — TeachLink'
html: |
<h3>{{ .CommonLabels.alertname }}</h3>
<p><strong>Status:</strong> {{ .Status | toUpper }}</p>
{{ range .Alerts }}
<p><strong>Severity:</strong> {{ .Labels.severity }}<br>
<strong>Summary:</strong> {{ .Annotations.summary }}<br>
<strong>Description:</strong> {{ .Annotations.description }}</p>
{{ end }}
inhibit_rules:
- source_matchers: [severity = critical]
target_matchers: [severity = warning]
equal: [alertname, service]