-
Notifications
You must be signed in to change notification settings - Fork 70
65 lines (58 loc) · 1.92 KB
/
Copy pathalertmanager.yml
File metadata and controls
65 lines (58 loc) · 1.92 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
64
65
global:
resolve_timeout: 5m
slack_api_url: '${SLACK_WEBHOOK_URL}'
templates:
- '/etc/alertmanager/templates/*.tmpl'
route:
group_by: ['alertname', 'team']
group_wait: 30s
group_interval: 5m
repeat_interval: 4h
receiver: 'slack-default'
routes:
- match:
severity: critical
receiver: 'slack-critical'
continue: true
- match:
team: contracts
receiver: 'slack-contracts'
continue: true
- match:
alertname: ContractPaused
receiver: 'pagerduty-oncall'
receivers:
- name: 'slack-default'
slack_configs:
- channel: '#trivela-alerts'
send_resolved: true
title: '[{{ .Status | toUpper }}] {{ .GroupLabels.alertname }}'
text: >-
{{ range .Alerts }} *Alert:* {{ .Annotations.summary }} *Details:* {{
.Annotations.description }} *Runbook:* {{ .Annotations.runbook_url }} {{ end }}
- name: 'slack-critical'
slack_configs:
- channel: '#trivela-critical'
send_resolved: true
title: '🚨 CRITICAL: {{ .GroupLabels.alertname }}'
text: >-
{{ range .Alerts }} *Summary:* {{ .Annotations.summary }} *Description:* {{
.Annotations.description }} *Runbook:* {{ .Annotations.runbook_url }} {{ end }}
- name: 'slack-contracts'
slack_configs:
- channel: '#trivela-contracts'
send_resolved: true
title: '📋 Contract Alert: {{ .GroupLabels.alertname }}'
text: >-
{{ range .Alerts }} {{ .Annotations.description }} Runbook: {{ .Annotations.runbook_url }}
{{ end }}
- name: 'pagerduty-oncall'
pagerduty_configs:
- service_key: '${PAGERDUTY_SERVICE_KEY}'
description: '{{ .GroupLabels.alertname }}: {{ (index .Alerts 0).Annotations.summary }}'
inhibit_rules:
- source_match:
alertname: 'BackendDown'
target_match_re:
alertname: 'HighBackendErrorRate|BackendProcessRestart'
equal: ['instance']