Hi!
I'd like to have certain critical alerts sent to be sent to chat/email only. If it hasn't been resolved within 30 minutes, send the same alert to pagerduty.
I'm on the latest versions of Prometheus (v2.3.1) and Alertmanager (v0.15.0). And Prometheus and Alertmanager are setup to send to our chat client, email and pagerduty for warning and critical alerts.
I've tried setting Alertmanager to wait 30 minutes, but seems to ignore the "group_wait: 30m" and sends the alert immediately to chat, email and pagerduty with the following in Alertmanager's config:
route:
receiver: operations
group_by: ['alertname', 'service']
group_wait: 60s
group_interval: 5m
repeat_interval: 1h
routes:
# Send these alerts to pagerduty immediately
- match_re:
project: production
pagerduty: true
receiver: production_pagerduty
# Send these alerts to chat, email. If not resolved in 30 minutes, send to pagerduty.
- match_re:
project: production
receiver: production
route:
- match_re:
project: production
severity: critical
receiver: production_pagerduty
group_wait: 30m
inhibit_rules:
- source_match_re:
severity: critical
target_match_re:
severity: warning
equal: ['alertname']
receivers:
# Alert chat, email and pagerduty
- name: production_pagerduty
slack_configs:
- channel: '#test'
title: '{{ template "slack.myorg.title" . }}'
text: '{{ template "slack.myorg.text" . }}'
send_resolved: true
email_configs:
- to: 'o...@company.tld'
send_resolved: true
pagerduty_configs:
- routing_key: xxxxxxxxxx
# Just chat and email for now.
- name: production
slack_configs:
- channel: '#test'
title: '{{ template "slack.myorg.title" . }}'
text: '{{ template "slack.myorg.text" . }}'
send_resolved: true
email_configs:
- to: 'o...@company.tld'
send_resolved: true
How can a critical alert, that hasn't been resolved within 30 minutes, be sent to another receiver (e.g. pagerduty in our case.)?
Thanks,
Frank