Skip to main content

How to Create Escalation Rules in OpsGenie

Creating escalation rules in OpsGenie allows you to control the actions taken when an alert isn’t acknowledged. This guide will walk you through configuring escalation rules in the stack configuration of the opsgenie-team component, ensuring timely response and proper alert handling. By defining escalation conditions and actions, you can efficiently manage alert escalations within your teams.

Problem

You want to control what to do when an alert isn’t acknowledged.

Solution

tip

TL;DR This is controlled by escalation rules in the stack configuration of the opsgenie-team.

An Escalation resource for a team is directly exposed via a map. Have a look at escalations in terraform for exact variable names and How do escalations work in opsgenie to determine how you want to configure your escalations.

An example is below

components:
terraform:
opsgenie-team-my-team:
component: opsgenie-team
...
escalations:
my-team_escalate_to_sre:
enabled: true
description: "Escalate to 'sre' team if 'my-team' team does not acknowledge"
rule:
condition: if-not-acked
notify_type: all
delay: 5
recipients:
- type: team
team_name: sre
repeat:
wait_interval: 10
count: 2
reset_recipient_states: false
close_alert_after_all: false