forked from PinSpace-Org/GistPin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalertmanager.yml
More file actions
53 lines (49 loc) 路 1.51 KB
/
Copy pathalertmanager.yml
File metadata and controls
53 lines (49 loc) 路 1.51 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
global:
resolve_timeout: 5m
slack_api_url: '${SLACK_WEBHOOK_URL}'
route:
group_by: ['alertname', 'severity']
group_wait: 30s
group_interval: 5m
repeat_interval: 4h
receiver: slack-critical
routes:
- match:
severity: critical
receiver: slack-critical
- match:
severity: warning
receiver: slack-warnings
# Include log alert routes
{{ include "alertmanager-routes.yml" . }}
receivers:
- name: slack-critical
slack_configs:
- channel: '#alerts-critical'
title: '[{{ .Status | toUpper }}] {{ .CommonLabels.alertname }}'
text: '{{ range .Alerts }}{{ .Annotations.description }}{{ end }}'
- name: slack-warnings
slack_configs:
- channel: '#alerts-warnings'
title: '[{{ .Status | toUpper }}] {{ .CommonLabels.alertname }}'
text: '{{ range .Alerts }}{{ .Annotations.description }}{{ end }}'
- name: slack-security
slack_configs:
- channel: '#alerts-security'
title: '[{{ .Status | toUpper }}][SECURITY] {{ .CommonLabels.alertname }}'
text: |
:shield: *SECURITY ALERT* :shield:
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }}
*Description:* {{ .Annotations.description }}
*Instance:* {{ .Labels.instance }}
*Runbook:* {{ .Annotations.runbook_url }}
{{ end }}
send_resolved: true
mention_channel: true
inhibit_rules:
- source_match:
severity: critical
target_match:
severity: warning
equal: ['alertname']