forked from codefresh-io/runtime-cluster-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
alertmanager.yaml.erb
88 lines (88 loc) · 2.24 KB
/
alertmanager.yaml.erb
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
global:
resolve_timeout: 5m
route:
group_by: [alertname, runtime_env, service, severity]
group_wait: 10s
group_interval: 5m
repeat_interval: 24h
<% if defined? slack_hook %>
receiver: slack_warnings
<% else %>
receiver: 'null'
<% end %>
routes:
- match:
alertname: Watchdog
receiver: 'null'
- match:
handler: 'true'
receiver: alert_handler
continue: true
- match:
handler: nowait
receiver: alert_handler
group_wait: 2s
group_interval: 2s
continue: true
<% if defined? slack_hook %>
- match:
alertname: ReminderCritical
severity: critical
repeat_interval: 3h
group_by: [severity]
group_wait: 10m
receiver: slack_errors
<% end %>
<% if defined? victorops_api_key %>
- match:
severity: critical
receiver: victorops
continue: true
<% end %>
<% if defined? slack_hook %>
- match:
severity: critical
receiver: slack_errors
- match_re:
alertgroup: downtime|nodedown
repeat_interval: 3h
receiver: slack_errors
continue: true
<% end %>
receivers:
- name: 'null'
<% if defined? slack_hook %>
- name: slack_warnings
slack_configs:
- &slack
send_resolved: true
channel: '<%= slack_warnings %>'
api_url: <%= slack_hook %>
title: '{{ template "cf.title.slack" . }}'
title_link: 'https://<%= ENV['cluster'] %>/alertmanager/#/alerts'
text: '{{ template "cf.text" . }}'
- name: slack_errors
slack_configs:
- <<: *slack
channel: '<%= slack_errors %>'
<% end %>
- name: alert_handler
webhook_configs:
- send_resolved: false
url: http://am-alert-handler:4242
<% if defined? victorops_api_key %>
- name: victorops
victorops_configs:
- api_key: <%= victorops_api_key %>
routing_key: <%= victorops_routing %>
entity_display_name: '{{ template "cf.title.victorops" . }}'
state_message: '{{ template "cf.text" . }}'
<% end %>
inhibit_rules:
- source_match:
severity: critical
target_match:
severity: warning
equal: [alertgroup, node, service]
templates:
- /etc/alertmanager/config/alerts.tmpl