> For the complete documentation index, see [llms.txt](https://docs.ilert.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ilert.com/on-call-management-and-escalations/escalation-policies.md). Agents can also search and read this documentation through its [MCP server](https://docs.ilert.com/~gitbook/mcp).

# Escalation policies

Decide who an alert notifies and in what order: escalation rules, their targets and timeouts, when ilert works out who is on call, the responder limit per rule, delayed escalation, and routing keys.

An escalation policy decides who an alert notifies, and who comes next if nobody accepts it. Every alert source uses one. The policy is a list of **escalation rules**, also called levels. Each rule names one or more targets (users, schedules or teams) and an escalation timeout. When the timeout runs out and nobody has accepted the alert, ilert moves on to the next rule.

Accepting or resolving the alert stops the escalation. Accepting means someone owns it.

## Create an escalation policy

{% stepper %}
{% step %}

### Open the editor

In the sidebar, go to **On-call** → **Escalation policies** and click **Create new escalation policy**.
{% endstep %}

{% step %}

### Name it

Enter a **Name**, for example `SRE Team`. Under **Teams**, optionally choose the teams that own the policy.
{% endstep %}

{% step %}

### Add the escalation rules

Under **Escalation rules**, choose the targets for the first rule. Click **Add escalation rule** for each further level, and set how many minutes each rule waits before ilert escalates to the next one. See [Escalation rules](#escalation-rules).
{% endstep %}

{% step %}

### Choose what happens after the last rule

The last rule shows **Last step: nothing escalates after this unless the policy repeats.** To start again from the first rule, select **Repeat this policy** and choose how many times. See [Repeat the policy](#repeat-the-policy).
{% endstep %}

{% step %}

### Save and check it

Click **Create new escalation policy**. The policy's page lists the **Escalation rules** as a numbered chain, and **Used in** lists the alert sources that use it. An alert source uses the policy once you select it there.
{% endstep %}
{% endstepper %}

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fgit-blob-580f877ae4645f5a25d7b94c5a534ca15b320802%2Fescalation-policy-detail.png?alt=media" alt="An escalation policy detail view. It lists the owning team, the alert sources using the policy, and its routing keys, then shows the escalation rules as a numbered chain: an on-call schedule at level one escalating after 10 minutes, two named responders at level two escalating after 15 minutes, and a final rule stating the policy does not repeat."><figcaption><p>Each level names its target and the time the previous level had to respond. <strong>Used in</strong> lists every alert source relying on this policy.</p></figcaption></figure>

{% embed url="<https://www.youtube.com/watch?v=RJWtioyb9k8>" %}
How escalation levels, timeouts and repeats work, and what stops an escalation
{% endembed %}

## Escalation rules

Each rule has:

* **Targets.** One or more users, schedules or teams. All of a rule's targets are notified at the same time.
  * A **user** is notified directly. Users whose role is Stakeholder or Viewer can't be targets.
  * A **schedule** notifies whoever is on call in it when the rule is reached.
  * A **team** notifies every member of the team, except Stakeholders and Viewers.
* **An escalation timeout.** How many minutes the rule's responders have to accept the alert before ilert escalates to the next rule: from 1 to 1440 minutes (24 hours). A rule that counts as more than one responder, for example two users or a team with two or more members, needs a timeout of at least 3 minutes. See [Responders per rule](#responders-per-rule).

A policy has at most 25 rules. You can't delete a policy while an alert source uses it.

### When ilert works out who is on call

ilert resolves a rule's targets **at the moment it reaches that rule**, not when the alert was created. A schedule notifies whoever is on call in it then, and a team notifies its members at that time.

For example, the day shift of a schedule ends at 17:00 and the night shift starts. The schedule is the target of rule 1 and rule 2, and rule 1 has a 10-minute timeout:

| Time  | What happens                                                                                           |
| ----- | ------------------------------------------------------------------------------------------------------ |
| 16:55 | The alert is created. Rule 1 notifies the day-shift responder.                                         |
| 17:05 | Nobody has accepted. Rule 2 is reached and notifies whoever is on call now: the night-shift responder. |

The day-shift responder stays a responder on the alert and can still accept it.

Some consequences of this:

* **A schedule with nobody on call is skipped at once.** If nobody is on call when ilert reaches a rule, for example because the schedule's layers only cover working hours, ilert moves to the next rule without waiting for the timeout. If no later rule has anyone to notify either, the escalation ends and nobody else is notified.
* **Responders of earlier rules keep being notified.** Escalating doesn't cancel the notifications of the rules before it. A user who is also a target of a later rule is notified again when that rule is reached.
* **A rejection escalates at once.** If a rule has one responder and they reject the alert, ilert moves to the next rule without waiting for the timeout.
* **Changes to a schedule or team apply to open alerts.** A shift change or a new team member counts from the next rule ilert reaches. Changing the policy itself, for example adding a rule, doesn't change alerts that are already open, unless an alert is raised to high priority or [re-routed](#routing-key-optional).

{% hint style="info" %}
**Low-priority alerts notify the first rule only.** An alert with priority `LOW`, for example one created outside [support hours](https://docs.ilert.com/alerting/configure-alerting/support-hours.md), never escalates past the first rule and doesn't repeat. Its responders are notified through their low-priority notification rules. If nobody is on call for the first rule, it notifies nobody.

When a `LOW` alert is raised to `HIGH`, by hand or by the alert source when support hours begin or end, its escalation starts again from the first rule with the whole policy.
{% endhint %}

### Responders per rule

How many responders one rule can notify depends on your plan:

| Plan       | Responders per escalation rule |
| ---------- | ------------------------------ |
| Free       | 3                              |
| Pro        | 5                              |
| Scale      | 10                             |
| Enterprise | 25                             |

The editor shows your limit next to the targets, for example **(max. 5)**. ilert counts the responders like this:

| Target     | Counts as                                                   |
| ---------- | ----------------------------------------------------------- |
| A user     | 1                                                           |
| A schedule | 1, however many people are in it                            |
| A team     | The number of its members, without Stakeholders and Viewers |

A user who is in two of a rule's targets counts twice, but is notified once. On Pro, a rule can hold a schedule and four users, or one team of five.

The editor counts a team as one target when you select it. When the rule's total, with each team counted by its members, is over your limit, a warning icon appears next to the targets: hover it for **Your chosen team exceeds the limit**. Saving such a rule fails with **The target count … of a rule exceeds your maximum allowed policy rule target count: …**. To notify a team that is larger than your limit, put an on-call schedule in the rule instead, or split the team across several rules.

Changing a team so that more of its members count, by adding a member or by changing a Stakeholder or Viewer to another role, checks every escalation policy that uses the team. If a rule would go over the limit, ilert refuses the change. The error lists the IDs of the policies and of the team.

The [REST API](https://docs.ilert.com/developer-docs/rest-api/api-reference) and the [Terraform provider](https://docs.ilert.com/developer-docs/terraform/terraform.md) enforce the same limits, so `terraform apply` fails with the same message.

### Repeat the policy

Select **Repeat this policy** to start again from the first rule when nobody has accepted the alert after the last one. A policy repeats from 1 to 9 times: with **3 times**, ilert goes through the rules four times in all. Without it, the escalation ends after the last rule, and the alert stays pending with its responders.

## Delayed escalation

To wait before notifying anyone, choose a delay in the first row of **Escalation rules**, which reads **Immediately** by default. The longest delay is 15 minutes.

An alert that resolves within the delay notifies nobody, so problems that fix themselves don't page anyone. The alert is still created, so an [alert action](https://docs.ilert.com/integrations/outbound-integrations.md) or [Action](https://docs.ilert.com/integrations/actions.md) triggered on alert creation still runs, for example to post it to a chat channel.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fo48uGJ4TZtTPzcMl4yHk%2F190445211-306f8cf1-b430-4d5e-95bf-3f5b87d7cc94-2.png?alt=media&amp;token=6a3e80bc-8f99-4c98-b40d-89e7d6ba201d" alt="The delayed escalation control at the top of an escalation policy, setting how long ilert waits before notifying anyone."><figcaption><p>Set a delay at the top of an escalation policy</p></figcaption></figure>

## Routing key (optional)

By default, every alert an alert source creates uses the alert source's escalation policy. A routing key lets the event choose another one.

1. Edit the escalation policy.
2. Under **Advanced settings** → **Optional routing keys**, enter one or more keys, separated by commas. A policy has at most 10 routing keys, and each key can belong to only one policy in your account.
3. Send the key in an event's `routingKey` field, or have the alert source take it from the event with a [dynamic routing template](https://docs.ilert.com/alerting/configure-alerting/alert-sources.md#dynamic-escalation-policy-routing). In Prometheus, set the `ilert_routingkey` label.

An event can carry several keys, separated by commas. ilert checks them from left to right and uses the first key that belongs to a policy. If none does, the alert uses the alert source's escalation policy. Keys must match exactly, including upper and lower case.

ilert reads the routing key on every alert event, not only the first:

* On an event that creates an alert, the key picks the policy.
* On a later event for an open alert, pending or accepted, a key that belongs to a different policy re-routes the alert. It moves to that policy and its escalation starts again from the first rule, without the new policy's delay. An accepted alert becomes pending again.
* A key that belongs to the alert's current policy, or to no policy, changes nothing.

### Route by time of day

A routing key can't depend on the time. The dynamic routing template only reads values from the event, and no template function returns the current time. To route by time of day, use one of these:

* **An event flow**, on the Scale plan or higher. Put a **Support hours** node in the flow, and on each of its branches, **In hours** and **Out of hours**, a **Route to alert source** node that overrides the escalation policy. See [Event flows](https://docs.ilert.com/alerting/configure-alerting/event-flows.md). The override works like a routing key, so a later event for the same open alert that arrives after support hours begin or end takes the other branch, and re-routes the alert to the other policy.
* **A schedule that covers only some hours.** [Limit the hours a layer covers](https://docs.ilert.com/on-call-management-and-escalations/on-call-schedules/recurring-schedules.md#limit-the-hours-a-layer-covers), and use the schedule as the first rule. Outside those hours nobody is on call, so ilert skips to the next rule at once.
* **Support hours on the alert source.** They don't change the policy. Depending on the alert source's notification priority, they make alerts `LOW` outside or inside support hours, and a `LOW` alert notifies only the first rule. See [Support hours](https://docs.ilert.com/alerting/configure-alerting/support-hours.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ilert.com/on-call-management-and-escalations/escalation-policies.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
