Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to configure the integration between Jira and Opsgenie

Hi there, I'm Pedro and I work as a Support Engineer for the Jira Service Management team in AMER. Since Opsgenie was released bundled with JSM we started receiving cases where the customers were having a hard time performing the integration between these products.

It can be a little tricky to configure the integration between those two products, but when configured it can be a powerful tool. It’s possible to integrate them for when a ticket is created in Jira it will create an alert in Opsgenie, when this alert is acknowledged a comment can be added to the Jira ticket, when the alert is closed it’s possible to close the ticket directly in Jira.

That being said, let’s cover the steps necessary to complete this integration.

Requirements:

  • JSM/Opsgenie access;

  • API Token;

Steps:

  1. Integration setup in Opsgenie;

  2. Webhook configuration in Jira;

Configuring the Integration in Opsgenie

  1. In Opsgenie, go to Teams and select your team - If you are on JSM Premium, you can find this under Settings > Integration List as well;

  2. On the left sidebar go to Integrations;

  3. Add Integration > Select either Jira Software or Jira Service Management (both will work, however, I personally recommend using the Jira Software integration even if your project is a Service Management, it has more filter options);

  4. Copy the URL to use it on the Jira Webhook;
    url.png

  5. Name the integration, assign it to a Team and enable it;

  6. Enable the two options below to create this back and forth communication between the products;
    3.png

  7. For the next step, you will need to configure your API Token, for that, follow the steps here.

  8. On the section below, you need to paste the Issue Type exactly as it is displayed in Jira, your site URL, the email of the user who configured the API Token, the API Token itself, and the project key.
    (After you save the integration, the API Token will be displayed empty as below, this is expected);
    4.png

  9. Under the Alert Fields section, you can configure the fields that will be displayed in the alert and select the user who will be added as responsible for the notes;

  10. Save the integration;

Configure the Webhook in Jira

Webhooks are user-defined HTTP POST callbacks. They provide a lightweight mechanism for letting remote applications receive push notifications from Jira, without requiring polling. For example, you may want any changes in Jira bugs to be pushed to a test management system so that they can be retested.

  1. Log in as a user with the Administer Jira global permission;

  2. Choose  > System. Under Advanced, select WebHooks;

  3. Create a new Webhook filtering by the issues that you want to pass it over to Opsgenie, for example:
    1.png

  4. Don’t forget to select issue and comments events at least;

  5. Paste the URL you copied from the Opsgenie integration:
    2.png

  6. Create;

That’s it, the integration is configured and should be working as expected now. You can now create an alert to see if it will create a ticket in the Jira project configured.

Make sure you don’t have mandatory fields during the Jira issue creation that could block the process.

Let me know if you have questions.

10 comments

Gary Blower (Clearvision)
Contributor
October 8, 2021

Doesn't the new Responders and Alert Responders functionality in the ITSM JSM template do this automatically now? https://community.atlassian.com/t5/Jira-Service-Management-articles/Announcing-Incident-Responders-and-Linked-Alerts-in-Jira-Service/ba-p/1782632 

Pedro Henrique Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 11, 2021

Hi Gary,

Yes, but only for projects in the new ITSM templates. Old project templates don't have the Incident Management section in the project settings.

Gary Blower (Clearvision)
Contributor
October 11, 2021

Pedro. Ah gotcha. Thank you for clarifying.

James Halpin
Contributor
February 14, 2022

Pedro,

In step 5, it says "Copy the URL, this will be used in the Opsgenie integration." However, where is this URL defined? We can't find it in Jira or in OpsGenie.

Pedro Henrique Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 14, 2022

Hi @James Halpin

I have updated the steps. You will copy the URL from the Jira Software or Jira Service Management integration in Opsgenie and will paste it on the Webhook in Jira. 

Step 4 on the first section and step 5 on the second section.

Thanks for your feedback! 

balajisk March 12, 2022

Hi, 

For Opsgenie to JIRA,  I have created API token and configured the remaining fields under Opsgenie to Jira Service Management, but getting below error in Activity Log. Kindly suggest.

 

Reason: Cannot get transition id. Reason: 404 Not Found: [{"errorMessages":["Issue does not exist or you do not have permission to see it."],"errors":{}}]

Pedro Henrique Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 17, 2022

Hi @balajisk 

The user associated to the API Token you created for Opsgenie needs to have permission to create/transition/comment on issues in Jira. The error leads me to believe that your account in Opsgenie doesn't have these permissions in Jira.

If necessary, please raise a ticket with our support.

balajisk March 17, 2022

OK

Albet Tanjung
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 28, 2022

Can I do this integration if I have a separate plan for both Opsgenie and Jira Service Management?

Gary Blower (Clearvision)
Contributor
November 29, 2022

@Albet Tanjung Yes, but there is a newer and better integration for JSM Cloud to Opsgenie now if you are on that platform. See https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-jira-service-management-cloud/

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events