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

How to automatically create a Jira Software Issue from an OpsGenie alert

Elisa Escapa October 13, 2021

I have tried searching the Community (and Google) for this exact scenario, but have come up blank. 

Illustrating an example (names changed for security): One of our OpsGenie alerts periodically comes in titled (Alias), "Transfer failed". We want OpsGenie/Jira Software to automatically create an Issue ticket in our "Tech Support" (TS) Project, when this alert is created in OpsGenie.

As far as I can tell, you can only configure this from OpsGenie > Settings > INTEGRATIONS > Configured integrations > Jira Service Management > Settings > For other Opsgenie alerts:

image.png

Is there no other way to automatically create issues from an OpsGenie Alert?

PS: We're already aware you can link issues to an Opsgenie Incident

2 answers

1 accepted

2 votes
Answer accepted
Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 13, 2021

Hi @Elisa Escapa ,

That is correct - the only way to create Jira issues from Opsgenie alerts is through the For other Opsgenie alerts: section within the integration.

Based on the screenshot you shared above, any alert that contained one of those conditions in the alias field of an alert would trigger the integration, and create in issue in the configured Jira project under these settings:

jiracommm1.jpg

^ That's where you'd configure Issue Type; Ticket, and  Project Key; TS.

Hope this helps! Let us know if you have any additional questions.

Elisa Escapa October 14, 2021

Hi Nick, thank you so much for confirming! 

If that's the case, then it sounds like there isn't a way to take this further and be able to map alert properties into issue fields? For example, say we had a custom field in Jira Software called Issue Category, and I want its value to be "Alerts: Transfer Failure" when the OG alert it was created from includes the words "Transfers failed" in that specific order.

I've heard about OEC but not entirely sure whether that is a way to work around this?

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 14, 2021

OEC is definitely what we suggest for working around this! 

You would install the OEC service on a server, and it will sit in the middle of Opsgenie and Jira. Opsgenie alerts would send to OEC, which will then execute a script to create Jira issues. You can modify the OEC script to customize things such as configure it to set an Opsgenie alert field as a required custom field in Jira (such as the Issue Category). 

Hope that helps! Let us know if you have any other questions.

 

EDIT: I should have mentioned this as well, but Opsgenie has a new Jira and JSM Integration Framework that offers the option to map custom required fields without using OEC! It's still in beta so if you'd be interested in testing, please open a ticket with Opsgenie support here: https://support.atlassian.com/opsgenie/

cfcomm1.jpg

Like # people like this
Elisa Escapa October 15, 2021

Oh that's brilliant, thank you for suggesting the beta feature! I'll ask Support for access, thank you so much for going up and beyond a standard answer 😄

Like Nick H likes this
Sterling Houghton December 3, 2021

Nick - does this beta feature exist for Jira as well, or only JSM?

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 3, 2021

Hi @Sterling Houghton ,

Yes this new integration framework is available for both Jira, and JSM

Edon Freiner May 6, 2022

"Field 'labels' cannot be set. It is not on the appropriate screen, or unknown.",

 

I get this error when ever it tries to create a ticket, anyone know why?

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 6, 2022

Hi @Edon Freiner ,

Like that error indicates, the labels field is probably not on the correct screen of the project / issue you are trying to create.

In Jira/JSM navigate to the Settings menu → Issues tab → Screens tab → Configure the same project’s screen that is configured in the integration’s action mapping section:

lab1.jpg

 

Another way to check whether or not this field is available is by trying to create an issue in Jira/JSM with the same project + issue type configured in the integration:

lab2.jpglab3.jpglab4.jpg

 

^ This should tell you whether or not the field is available. Then you can follow the steps outlined in the first part of this comment to add it.

Edon Freiner May 6, 2022

Thanks,

We dont really use labels what so ever.

I dont have it on any of my screens...

I also dont see a place where I can choose a screen on opsgeni.

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 6, 2022

Hi @Edon Freiner ,

You choose the screen in Jira / JSM. It's outlined above where to find and edit this.

As well where to check through a test issue. Before creating the issue under the same project / issue type configured in Opsgenie integration, select the Find your field option.

0 votes
Edon Freiner May 6, 2022

Seems like this is what I get, but we dont use this field, why is opsgeni requiring us to use it?

 

Screen Shot 2022-05-06 at 1.06.39 PM.png

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 6, 2022

Opsgenie sends a label (fromOG) to Jira / JSM when an Opsgenie alert creates a Jira / JSM issue. Which is why it's required.

Edon Freiner May 6, 2022

ahhh got it, ok thanks

Like Nick H likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events