---
title: Opsgenie
description: >-
  Forward alerts to Opsgenie and Jira Service Management Operations from
  Datadog.
breadcrumbs: Docs > Integrations > Opsgenie
---

# Opsgenie

## Overview{% #overview %}

Connect Opsgenie to Datadog in order to:

- Create, acknowledge, and close alerts in Opsgenie from monitor events by using `@opsgenie` in your monitor description
- View your on-call schedules and open incidents directly in Datadog
- Send Opsgenie events back to Datadog

## Setup{% #setup %}

### Configuration{% #configuration %}

#### Create a Datadog integration in Opsgenie{% #create-a-datadog-integration-in-opsgenie %}

1. Log in to your Opsgenie account and go to the [Opsgenie Integrations](https://app.opsgenie.com/settings/integration/integration-list) page.
1. Search for Datadog and click on the tile.
1. Fill in the Integration Name and, if desired, set the Assignee Team.
1. After clicking **Submit**, stay on the page and save the API Key of the newly created Integration. You need this to complete the setup.
1. Add more Datadog integrations on Opsgenie by going to the [Opsgenie Integrations](https://app.opsgenie.com/settings/integration/integration-list) page and repeating the previous steps.

#### Register the integration(s) you made in Opsgenie in Datadog{% #register-the-integrations-you-made-in-opsgenie-in-datadog %}

1. In Datadog, go to the [Integrations page](https://app.datadoghq.com/integrations), then search for and select the Opsgenie tile.
1. Check that you are on the Configuration tab of the dialog box that pops up.
1. Click **New Integration Service**.
1. Paste the API Key saved earlier from the Datadog integration (created in Opsgenie) in the **Opsgenie API Key** field, and enter a **Service Name**.
   1. The Service Name should be descriptive and must be unique. Only alphanumeric values, dashes, underscores, and periods are allowed. Spaces are not allowed.
1. From the **Region** dropdown, select the United States or Europe depending on where your Opsgenie account operates.
1. Click **Save**.

## Example usage{% #example-usage %}

### Route monitor alerts to Opsgenie{% #route-monitor-alerts-to-opsgenie %}

1. Create any monitor in the [Monitors page](https://app.datadoghq.com/monitors/manage).
1. In the monitor body, paste `@opsgenie-{service-name}` (replace `{service-name}` with the service name defined in the Opsgenie Integration Tile.)
1. Save the monitor.
1. Go to the Edit Page of the monitor and click "Test Notifications" to issue an example alert using your integration. A corresponding alert should be created in Opsgenie.
1. To notify multiple services, paste `@opsgenie-{service-name} @opsgenie-{service-name-2}` in the monitor body, and test with the same steps.
1. When the monitor recovers, it automatically resolves the Opsgenie service.

#### Permissions{% #permissions %}

By default, all users have full access to Opsgenie services.

Use [Granular Access Control](https://docs.datadoghq.com/account_management/rbac/granular_access/) to limit which roles can edit a specific service:

1. While viewing a service, click the gear icon in the upper-right corner to open the settings menu.
1. Select **Set Permissions**.
1. Click **Restrict Access**. The dialog box updates to show that members of your organization have **Viewer** access by default.
1. Use the dropdown to select one or more roles, teams, or users that can edit the Opsgenie service.
1. Click **Add**. The dialog box updates to show that the role you selected has the **Editor** permission.
1. Click **Save**.

**Note:** To maintain your edit access to the service, you must include at least one role you belong to before saving.

If you have edit access, you can restore general access to a restricted service by completing the following steps:

1. While viewing the service, click the gear icon in the upper-right corner to open the settings menu.
1. Select **Set Permissions**.
1. Click **Restore Full Access**.
1. Click **Save**.

To edit service permissions through the API:

1. Fetch the Opsgenie service IDs using the [Opsgenie Integration API](https://docs.datadoghq.com/api/latest/opsgenie-integration/).
1. Use the [Restriction Policies API](https://docs.datadoghq.com/api/latest/restriction-policies/), where the type is `integration-service` and the id is `opsgenie:<service_id>`.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

The Opsgenie integration does not include any metric.

### Events{% #events %}

The Opsgenie integration does not include any events.

### Service Checks{% #service-checks %}

The Opsgenie integration does not include any service checks.

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).

## Further Reading{% #further-reading %}

- [Integrations](https://docs.datadoghq.com/tracing/service_catalog/integrations/#opsgenie-integration)
- [Opsgenie](https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/integration_opsgenie_service_object)
