Configuring OpsGenie to Receive alerts via webhooks

1. Activate the OpsGenie app on your Cloud instance.

  • If you want to use an already existing Atlassian site, do the following:

a. Create a Jira Service Management project.

b. Create a team.

c. Add OpsGenie integration.

Note: If your site URL is https://{your-atlassian-site}.atlassian.net, the OpsGenie app will be accessible on the following link: https://{your-atlassian-.site}.app.opsgenie.com/alert/list.

  • You can also register a new OpsGenie account in an independent way, without starting from a Jira project. In this case, a new Atlassian Cloud site will be automatically set up for you without Jira integration in place.

Important: If you opted for data storage in the EU, then the URL of your OpsGenie will contain an extra β€œ.eu” segment, for example: https://{your-atlassian-.site}.app.eu.opsgenie.com/alert/list

The geological location of your instance will also impact the URL of the OpsGenie API. In the EU: https://api.eu.opsgenie.com Everywhere else: https://api.opsgenie.com

Please keep in mind that the Service URL in the auto-generated template has to be adjusted accordingly.

Basic configuration (required)

1. Acquire an API key so that Email This Issue for Jira will be able to authenticate with OpsGenie.

Important: There is a possibility for misconfiguration. If adding a new API key from the Teams tab using the API key management option under APP SETTINGS, the generated key can not be used for creating alerts. It is highly recommended to start the integration process from the Settings tab as described below!

Choose from the following options:

  • Use the default integration configuration.

a. Go to Settings, and choose Configured Integrations under INTEGRATIONS.

b. Select the Default API entry.

c. Use the API key in the default configuration without any changes as shown in the following image:

  • Create a new integration configuration.

a. Go to Settings, and choose Integration list under INTEGRATIONS.

b. Select the API option from the Integration list.

c. The API key is generated automatically. Select the Create and Update Access permission scope and the Enabled option as sown in the image below:

Important: For Free and Essentials plans, the integrations can only be added from the Team Dashboards.

2. To add the integration, do the following, as shown in the image below:

a. Go to Teams, and choose Integrations.

b. Click on the Add integration button.

For more information, see the API Integration documentation: https://support.atlassian.com/opsgenie/docs/what-is-a-default-api-integration/

Creating alerts with custom content (optional)

Although Email This Issue for Jira provides you with a general-purpose template to create alerts in OpsGenie, you may want to further customize the posted request.

Headers

  • Content-type: application/json (automatically added)

  • Authorization: GenieKey <api key>

Message payload (JSON body)

The request body may be enriched with the following fields that are parsed by OpsGenie while creating the alert based on the incoming request:

Field

Requirement

Description

Limit

message

Mandatory

The message of the alert.

130 characters

alias

Optional

This field is used for alert de-duplication. When there is an open alert with the same alias, no new alert is created, only a counter is incremented. After closing this alert, and there is a new alert with the same alias sent in, a new alert is created.

512 characters

description

Optional

Generally used for providing a detailed information about the alert.

15000 characters

tags

Optional

The tags of the alert.

20 x 50 characters

details

Optional

The map of key-value pairs to use as custom properties of the alert.

8000 characters total

entity

Optional

Generally used for specifying, which domain the alert is related to.

512 characters

priority

Optional

The priority level of the alert. Its possible values are P1, P2, P3, P4 and P5. The default value is P3.

For more details, see API.

Last updated