...
1global:
2 # The smarthost and SMTP sender used for mail notifications.
3 smtp_smarthost: 'localhost:25'
4 smtp_from: 'alertmanager@example.org'
5 smtp_auth_username: 'alertmanager'
6 smtp_auth_password: "multiline\nmysecret"
7 smtp_hello: "host.example.org"
8 slack_api_url: "http://mysecret.example.com/"
9 http_config:
10 proxy_url: 'http://127.0.0.1:1025'
11# The directory from which notification templates are read.
12templates:
13 - '/etc/alertmanager/template/*.tmpl'
14# The root route on which each incoming alert enters.
15route:
16 # The labels by which incoming alerts are grouped together. For example,
17 # multiple alerts coming in for cluster=A and alertname=LatencyHigh would
18 # be batched into a single group.
19 group_by: ['alertname', 'cluster', 'service']
20 # When a new group of alerts is created by an incoming alert, wait at
21 # least 'group_wait' to send the initial notification.
22 # This way ensures that you get multiple alerts for the same group that start
23 # firing shortly after another are batched together on the first
24 # notification.
25 group_wait: 30s
26 # When the first notification was sent, wait 'group_interval' to send a batch
27 # of new alerts that started firing for that group.
28 group_interval: 5m
29 # If an alert has successfully been sent, wait 'repeat_interval' to
30 # resend them.
31 repeat_interval: 3h
32 # A default receiver
33 receiver: team-X-mails
34 # All the above attributes are inherited by all child routes and can
35 # overwritten on each.
36
37 # The child route trees.
38 routes:
39 # This routes performs a regular expression match on alert labels to
40 # catch alerts that are related to a list of services.
41 - match_re:
42 service: ^(foo1|foo2|baz)$
43 receiver: team-X-mails
44 # The service has a sub-route for critical alerts, any alerts
45 # that do not match, i.e. severity != critical, fall-back to the
46 # parent node and are sent to 'team-X-mails'
47 routes:
48 - match:
49 severity: critical
50 receiver: team-X-pager
51 - match:
52 service: files
53 receiver: team-Y-mails
54 routes:
55 - match:
56 severity: critical
57 receiver: team-Y-pager
58 # This route handles all alerts coming from a database service. If there's
59 # no team to handle it, it defaults to the DB team.
60 - match:
61 service: database
62 receiver: team-DB-pager
63 # Also group alerts by affected database.
64 group_by: [alertname, cluster, database]
65 routes:
66 - match:
67 owner2: team-X
68 receiver: team-X-pager
69 continue: true
70 - match:
71 owner: team-Y
72 receiver: team-Y-pager
73 # continue: true
74# Inhibition rules allow to mute a set of alerts given that another alert is
75# firing.
76# We use this to mute any warning-level notifications if the same alert is
77# already critical.
78inhibit_rules:
79 - source_match:
80 severity: 'critical'
81 target_match:
82 severity: 'warning'
83 # Apply inhibition if the alertname is the same.
84 equal: ['alertname', 'cluster', 'service']
85receivers:
86 - name: 'team-X-mails'
87 email_configs:
88 - to: 'team-X+alerts@example.org'
89 - name: 'team-X-pager'
90 email_configs:
91 - to: 'team-X+alerts-critical@example.org'
92 pagerduty_configs:
93 - routing_key: "mysecret"
94 - name: 'team-Y-mails'
95 email_configs:
96 - to: 'team-Y+alerts@example.org'
97 - name: 'team-Y-pager'
98 pagerduty_configs:
99 - routing_key: "mysecret"
100 - name: 'team-DB-pager'
101 pagerduty_configs:
102 - routing_key: "mysecret"
103 - name: victorOps-receiver
104 victorops_configs:
105 - api_key: mysecret
106 routing_key: Sample_route
107 - name: opsGenie-receiver
108 opsgenie_configs:
109 - api_key: mysecret
110 - name: pushover-receiver
111 pushover_configs:
112 - token: mysecret
113 user_key: key
114 - name: slack-receiver
115 slack_configs:
116 - channel: '#my-channel'
117 image_url: 'http://some.img.com/img.png'
View as plain text