# Send alerts to Opsgenie

Alert an Opsgenie team when a monitor goes down and close the alert on recovery. Create an API integration and connect it to StatusCheck.

Connect Opsgenie so that a monitor going down creates an alert in Opsgenie, and its recovery closes it. Opsgenie then notifies the team you route it to, following the rules you keep in Opsgenie.

Opsgenie is available on the Team plan and up, and the integration shows a **Team+** badge. A workspace has one Opsgenie connection.

**Before you start**

- You need the **Owner**, **Admin** or **Editor** role in the StatusCheck workspace.
- You need permission to add integrations in Opsgenie, usually as an Opsgenie admin or the admin of the team. If you are not sure, ask whoever manages your Opsgenie account.
- Know which Opsgenie region your account is in. If you sign in at `app.eu.opsgenie.com`, it is Europe; otherwise it is the United States.

## Create an API integration in Opsgenie

StatusCheck needs an **API key** from Opsgenie: a code that lets StatusCheck create and close alerts in your Opsgenie account. You get one by adding an API integration.

Opsgenie's menus and button names vary between accounts and versions, so treat the names below as a guide.

1. In Opsgenie, open **Teams** and select the team that should receive alerts.

2. Open the team's **Integrations** tab.

3. Select **Add integration**.

4. Search for **API** and select it.

5. Enter a name, for example StatusCheck.

6. Make sure **Create and Update Access** is turned on and the integration is enabled.

7. Copy the **API Key**.

8. Select **Save Integration** (or **Save**).

If you would rather not tie the integration to one team, add it from **Settings**, then **Integrations**, instead.

Your Opsgenie menus may look different, for example because your company now uses Opsgenie features inside Jira Service Management. If so, look for an integration of the type **API** wherever integrations are listed, or ask your Opsgenie admin to create it and send you the key.

## Connect Opsgenie in StatusCheck

1. In StatusCheck, open **Integrations** in the sidebar and choose **Opsgenie**.

   ![The Opsgenie integration page in StatusCheck, with three setup steps, the API key, Team and Region fields and the Connect button, and a Details card showing the Team+ plan.](https://www.statuscheck.io/_astro/integration-opsgenie.CcRDW8dB.png)

2. Paste the key into **API key**.

3. Optionally enter **Team**: the name of the Opsgenie team to route alerts to, exactly as it appears in Opsgenie. Without one, alerts arrive unassigned.

4. Choose **Region**: **United States** (the default) or **Europe**. It must match your Opsgenie account.

5. Select **Connect**. The status reads **Connected**.

6. Select **Send test alert**. A test alert appears in Opsgenie within a few seconds, and Opsgenie may notify the team.

7. Close the test alert in Opsgenie.

StatusCheck encrypts the key and does not show it again. To change the key, team or region, select **Disconnect** and connect again.

## Choose which events Opsgenie receives

A new connection receives all three events. To change that, open the integration's page in StatusCheck, keep the events you want under **Events**, and select **Save events**.

| Event | What happens in Opsgenie |
| --- | --- |
| **Monitor down** | Creates an alert. Reminders from **Resend while down** use the same alias, so Opsgenie counts them against the open alert instead of creating new ones. |
| **Monitor recovered** | Closes the alert. Keep this selected, or alerts stay open after the monitor recovers. |
| **Status updates** | Creates a separate alert for each status update, which StatusCheck never closes. Clear this event unless you want status updates to notify the team. |

## Choose which monitors alert through Opsgenie

Connecting Opsgenie does not change any monitor. Only monitors you select it on create alerts.

1. In StatusCheck, open **Monitors** in the sidebar and select the monitor.

2. Open the **Notifications** tab.

3. Under **Channels**, select the Opsgenie connection.

4. Select **Save changes**. The monitor's next down alert creates an Opsgenie alert.

## How StatusCheck incidents map to Opsgenie

- **One Opsgenie alert per StatusCheck incident.** Each alert has the alias `statuscheck-<incident ID>`, a label Opsgenie uses to recognize messages about the same problem. It ties the create, any reminders and the close together.
- **Closing.** When the monitor recovers, or when someone resolves the incident in StatusCheck, StatusCheck closes the alert by its alias.
- **Priority.** Severity is how serious an incident is. StatusCheck severity maps to Opsgenie priority as follows. New incidents open as **Major**, so they arrive as P2.

| StatusCheck severity | Opsgenie priority |
| --- | --- |
| Critical | P1 |
| Major | P2 |
| Minor | P3 |

- **Content.** The alert message names the monitor and what happened. The description and details carry the location, status code and failure reason, start time and a link to the incident (and the URL, if **Show URL in notifications** is on). StatusCheck tags alerts `statuscheck` and with the event name, for example `monitor.down`, and their source is StatusCheck.

Opsgenie and StatusCheck do not sync acknowledgments.

## Troubleshooting

**The test fails with an authorization error.** The key is wrong, the integration is disabled, or it lacks **Create and Update Access**. Check the integration in Opsgenie, then disconnect and connect again.

**The test fails although the key is correct.** The **Region** does not match your account. An EU account needs **Europe**.

**Alerts arrive but are not assigned to a team.** **Team** is empty or does not match an Opsgenie team name exactly. Disconnect and connect again with the exact name.

**The integration shows "Available on" a plan instead of a setup form.** Your current plan does not include Opsgenie. The workspace owner can upgrade from **Explore plans**.

## Related

- [How alerts work](/docs/alerts/) explains delays, reminders and muting.
- [Respond to an incident](/docs/incidents/) covers severity, acknowledging and resolving in StatusCheck.
- [PagerDuty](/docs/alerts/pagerduty/) is the equivalent integration for PagerDuty services.
- [Webhooks](/docs/alerts/webhooks/) send the same events to any other incident tool.
