2021-02-09 17:05:00 +01:00
|
|
|
# Documentation : https://prometheus.io/docs/alerting/configuration/
|
|
|
|
|
|
|
|
global:
|
|
|
|
resolve_timeout: 5m
|
|
|
|
slack_api_url: SLACK_WEBHOOK_ID
|
|
|
|
# The smarthost and SMTP sender used for mail notifications.
|
|
|
|
# smtp_smarthost: 'localhost:25'
|
2021-06-13 02:09:57 +02:00
|
|
|
# smtp_from: 'alertmanager@domain.com'
|
2021-02-09 17:05:00 +01:00
|
|
|
|
|
|
|
# The root route on which each incoming alert enters.
|
|
|
|
route:
|
|
|
|
# The root route must not have any matchers as it is the entry point for
|
|
|
|
# all alerts. It needs to have a receiver configured so alerts that do not
|
|
|
|
# match any of the sub-routes are sent to someone.
|
2021-06-13 02:09:57 +02:00
|
|
|
receiver: 'slack-default'
|
2021-02-09 17:05:00 +01:00
|
|
|
|
|
|
|
# The labels by which incoming alerts are grouped together. For example,
|
|
|
|
# multiple alerts coming in for cluster=A and alertname=LatencyHigh would
|
|
|
|
# be batched into a single group.
|
|
|
|
# group_by: ['alertname', 'cluster']
|
|
|
|
group_by: ['instance']
|
|
|
|
|
|
|
|
# When a new group of alerts is created by an incoming alert, wait at
|
|
|
|
# least 'group_wait' to send the initial notification.
|
|
|
|
# This way ensures that you get multiple alerts for the same group that start
|
|
|
|
# firing shortly after another are batched together on the first
|
|
|
|
# notification.
|
|
|
|
group_wait: 1m
|
|
|
|
|
|
|
|
# When the first notification was sent, wait 'group_interval' to send a batch
|
|
|
|
# of new alerts that started firing for that group.
|
|
|
|
group_interval: 1m
|
|
|
|
|
|
|
|
# If an alert has successfully been sent, wait 'repeat_interval' to
|
|
|
|
# resend them.
|
|
|
|
repeat_interval: 1h
|
|
|
|
|
|
|
|
|
|
|
|
# All the above attributes are inherited by all child routes and can
|
|
|
|
# overwritten on each.
|
|
|
|
|
|
|
|
# The child route trees.
|
|
|
|
# routes:
|
|
|
|
# This routes performs a regular expression match on alert labels to
|
|
|
|
# catch alerts that are related to a list of services.
|
|
|
|
# - match_re:
|
|
|
|
# service: ^(foo1|foo2|baz)$
|
|
|
|
# receiver: team-X-mails
|
|
|
|
|
|
|
|
routes:
|
|
|
|
- match:
|
|
|
|
severity: "low"
|
|
|
|
instance: "Hourly GMV"
|
|
|
|
type: "lower than static threshold"
|
2021-06-13 02:09:57 +02:00
|
|
|
receiver: slack-gmv-static-low
|
2021-02-09 17:05:00 +01:00
|
|
|
|
|
|
|
- match:
|
|
|
|
severity: "high"
|
|
|
|
instance: "Hourly GMV"
|
|
|
|
type: "lower than static threshold"
|
2021-06-13 02:09:57 +02:00
|
|
|
receiver: slack-gmv-static-high
|
2021-02-09 17:05:00 +01:00
|
|
|
|
|
|
|
- match:
|
|
|
|
severity: "low"
|
|
|
|
instance: "Hourly GMV"
|
2021-06-13 02:09:57 +02:00
|
|
|
receiver: slack-gmv-low
|
2021-02-09 17:05:00 +01:00
|
|
|
|
|
|
|
- match:
|
|
|
|
severity: "high"
|
|
|
|
instance: "Hourly GMV"
|
2021-06-13 02:09:57 +02:00
|
|
|
receiver: slack-gmv-high
|
2021-02-09 17:05:00 +01:00
|
|
|
|
|
|
|
- match:
|
|
|
|
instance: "Hourly GMV test"
|
2021-06-13 02:09:57 +02:00
|
|
|
receiver: slack-gmv-low
|
2021-02-09 17:05:00 +01:00
|
|
|
|
|
|
|
- match:
|
|
|
|
severity: "low"
|
2021-06-13 02:09:57 +02:00
|
|
|
receiver: slack-generic-low
|
2021-02-09 17:05:00 +01:00
|
|
|
|
|
|
|
- match:
|
|
|
|
severity: "medium"
|
2021-06-13 02:09:57 +02:00
|
|
|
receiver: slack-generic-medium
|
2021-02-09 17:05:00 +01:00
|
|
|
|
|
|
|
- match:
|
|
|
|
severity: "high"
|
2021-06-13 02:09:57 +02:00
|
|
|
receiver: slack-generic-high
|
2021-02-09 17:05:00 +01:00
|
|
|
|
|
|
|
- match:
|
|
|
|
severity: "critical"
|
2021-06-13 02:09:57 +02:00
|
|
|
receiver: slack-generic-critical
|
2021-02-09 17:05:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
# The service has a sub-route for critical alerts, any alerts
|
|
|
|
# that do not match, i.e. severity != critical, fall-back to the
|
|
|
|
# parent node and are sent to 'team-X-mails'
|
|
|
|
# routes:
|
|
|
|
# - match:
|
|
|
|
# severity: critical
|
|
|
|
# receiver: team-X-pager
|
|
|
|
|
|
|
|
|
|
|
|
# Inhibition rules allow to mute a set of alerts given that another alert is
|
|
|
|
# firing.
|
|
|
|
# We use this to mute any warning-level notifications if the same alert is
|
|
|
|
# already critical.
|
|
|
|
inhibit_rules:
|
|
|
|
|
|
|
|
- source_match:
|
|
|
|
severity: 'medium'
|
|
|
|
target_match:
|
|
|
|
severity: 'low'
|
|
|
|
# Apply inhibition if the alertname is the same.
|
|
|
|
equal: ['instance']
|
|
|
|
|
|
|
|
- source_match:
|
|
|
|
severity: 'high'
|
|
|
|
target_match:
|
|
|
|
severity: 'medium'
|
|
|
|
# Apply inhibition if the alertname is the same.
|
|
|
|
equal: ['instance']
|
|
|
|
|
|
|
|
- source_match:
|
|
|
|
severity: 'high'
|
|
|
|
target_match:
|
|
|
|
severity: 'low'
|
|
|
|
# Addition for GMV, which has no "medium" severity
|
|
|
|
equal: ['instance']
|
|
|
|
|
|
|
|
- source_match:
|
|
|
|
severity: 'critical'
|
|
|
|
target_match:
|
|
|
|
severity: 'high'
|
|
|
|
# Apply inhibition if the alertname is the same.
|
|
|
|
equal: ['instance']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
receivers:
|
2021-06-13 02:09:57 +02:00
|
|
|
- name: 'slack-gmv-static-low'
|
2021-02-09 17:05:00 +01:00
|
|
|
slack_configs:
|
|
|
|
- api_url: SLACK_WEBHOOK_ID
|
|
|
|
send_resolved: true
|
|
|
|
username: 'Chouette Vigilante [severity - low]'
|
|
|
|
icon_emoji: ':owl:'
|
|
|
|
title: ':mostly_sunny: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
|
|
|
text: "{{ .CommonAnnotations.description }}"
|
|
|
|
|
2021-06-13 02:09:57 +02:00
|
|
|
- name: 'slack-gmv-static-high'
|
2021-02-09 17:05:00 +01:00
|
|
|
slack_configs:
|
|
|
|
- api_url: SLACK_WEBHOOK_ID
|
|
|
|
send_resolved: true
|
|
|
|
username: 'Chouette Vigilante [severity - high]'
|
|
|
|
icon_emoji: ':fallen_leaf:'
|
|
|
|
title: ':tornado: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
|
|
|
text: "{{ .CommonAnnotations.description }}"
|
|
|
|
|
2021-06-13 02:09:57 +02:00
|
|
|
- name: 'slack-gmv-low'
|
2021-02-09 17:05:00 +01:00
|
|
|
slack_configs:
|
|
|
|
- api_url: SLACK_WEBHOOK_ID
|
|
|
|
send_resolved: true
|
|
|
|
username: 'Chouette Vigilante [severity - low]'
|
|
|
|
icon_emoji: ':owl:'
|
|
|
|
title: ':mostly_sunny: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
|
|
|
text: "{{ .CommonAnnotations.description }}
|
|
|
|
\n
|
|
|
|
\n{{ .CommonAnnotations.query }}"
|
|
|
|
|
2021-06-13 02:09:57 +02:00
|
|
|
- name: 'slack-gmv-high'
|
2021-02-09 17:05:00 +01:00
|
|
|
slack_configs:
|
|
|
|
- api_url: SLACK_WEBHOOK_ID
|
|
|
|
send_resolved: true
|
|
|
|
username: 'Chouette Vigilante [severity - high]'
|
|
|
|
icon_emoji: ':fallen_leaf:'
|
|
|
|
title: ':tornado: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
|
|
|
text: "{{ .CommonAnnotations.description }}
|
|
|
|
\n
|
|
|
|
\n{{ .CommonAnnotations.query }}"
|
|
|
|
|
2021-06-13 02:09:57 +02:00
|
|
|
- name: 'slack-generic-low'
|
2021-02-09 17:05:00 +01:00
|
|
|
slack_configs:
|
|
|
|
- api_url: SLACK_WEBHOOK_ID
|
|
|
|
send_resolved: true
|
|
|
|
username: 'Chouette Vigilante [severity - low]'
|
|
|
|
icon_emoji: ':owl:'
|
|
|
|
title: ':mostly_sunny: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
|
|
|
text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for a few seconds."
|
|
|
|
|
2021-06-13 02:09:57 +02:00
|
|
|
- name: 'slack-generic-medium'
|
2021-02-09 17:05:00 +01:00
|
|
|
slack_configs:
|
|
|
|
- api_url: SLACK_WEBHOOK_ID
|
|
|
|
send_resolved: true
|
|
|
|
username: 'Chouette Vigilante [severity - medium]'
|
|
|
|
icon_emoji: ':owl:'
|
|
|
|
title: ':sun_behind_rain_cloud: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
|
|
|
text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for more than 5 minutes."
|
|
|
|
|
2021-06-13 02:09:57 +02:00
|
|
|
- name: 'slack-generic-high'
|
2021-02-09 17:05:00 +01:00
|
|
|
slack_configs:
|
|
|
|
- api_url: SLACK_WEBHOOK_ID
|
|
|
|
send_resolved: true
|
|
|
|
username: 'Chouette Vigilante [severity - high]'
|
|
|
|
icon_emoji: ':fallen_leaf:'
|
|
|
|
title: ':tornado: {{ .Status|toUpper }} issue on {{ .CommonLabels.instance }}'
|
|
|
|
text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for an hour"
|
|
|
|
|
2021-06-13 02:09:57 +02:00
|
|
|
- name: 'slack-generic-critical'
|
2021-02-09 17:05:00 +01:00
|
|
|
slack_configs:
|
|
|
|
- api_url: SLACK_WEBHOOK_ID
|
|
|
|
send_resolved: true
|
|
|
|
username: 'Chouette Vigilante [severity - critical]'
|
|
|
|
icon_emoji: ':fire:'
|
|
|
|
title: ':boom: {{ .Status|toUpper }} issue on {{ .CommonLabels.instance }}'
|
|
|
|
text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for more than 12 hours"
|
|
|
|
|
2021-06-13 02:09:57 +02:00
|
|
|
- name: 'slack-default'
|
2021-02-09 17:05:00 +01:00
|
|
|
slack_configs:
|
|
|
|
- api_url: SLACK_WEBHOOK_ID
|
|
|
|
send_resolved: true
|
|
|
|
username: 'Chouette Vigilante [default]'
|
|
|
|
icon_emoji: ':owl:'
|