How to create automaically an issue when an incident is created
Asked by serge calderara:

Dear all,

We need to try to automate as much things we can and we were thinking of a scenario during our evaluation of opsgenie.

Question 1 :   
Is there a way to create automatically an incident when an certain amount of alert occurs ?

Question 2:

When an incident is created is there a way to create automatically an issue in Jira which is linked to Opsgenie incident ?

Thanks for advise

regards


Answers:
author: Samir
body: Hi [@serge calderara](/t5/user/viewprofilepage/user-id/3385932) !

**Question 1:**

There isn't a way to create an incident in Opsgenie based on *multiple* alerts. However, you can use [Incident Rules to automatically create an incident in Opsgenie](https://support.atlassian.com/opsgenie/docs/automatically-create-an-incident-via-incident-rules/) when a specific alert is created.

i.e. if alert is created with message containing "Host XXX down", create an incident.

We do have a feature request to be able to create an incident in Opsgenie based on the creation of *multiple* alerts.

**Question 2:**

There isn't a way to have a jira issue automatically created from the incident itself, since the automated jira integration is based on *alerts* in Opsgenie.

However, each incident will create responder alert(s) for each team that is a responder on the incident. So you could setup the Jira integration to create issues in Jira from one of the responder alerts.

Each responder alert will have an extra property field..

**incident-alert-type:**Responder

e.g.

![2021-04-15_10-46-23.png](https://community.atlassian.com/t5/image/serverpage/image-id/138839iF8339C412A078407/image-size/large?v=v2&px=999 "2021-04-15_10-46-23.png")

So in the Jira integration, you can set it up to create issues in Jira that contain that field.

Right now integrations in Opsgenie pretty much all are based around alerts. I believe there will be more functionality between integrations with *incidents* in Opsgenie in the future.

Let me know if you have anymore questions!

comments: author: serge calderara
body: based on your reply :

I could find the proper place to setup creating issue in integration ?

Do you have screenshot.

So far for simplicity we have only define an email integration

thanks for help

regards


author: Samir
body: It sounds like you may be on a plan that doesn't support automatic incident creation via incident rules.

Are you on a [JSM plan](https://www.atlassian.com/software/jira/service-management/pricing)? If so - you would need to be on jsmPremium plan in order to use incident rules to automate incident creation from alerts.

![2021-04-15_11-31-24.png](https://community.atlassian.com/t5/image/serverpage/image-id/138848iA3BD9EFC2E0D5286/image-size/large?v=v2&px=999 "2021-04-15_11-31-24.png")


author: serge calderara
body: right I am on a trial


author: Samir
body: [@serge calderara](/t5/user/viewprofilepage/user-id/3385932) Yeah you can still be on a trial, but it depends which plan you are trialing. You can see which JSM plan you are on via admin.atlassian.com -\> click on your site -\> manage subscriptions.

![2021-04-16_09-22-08.png](https://community.atlassian.com/t5/image/serverpage/image-id/139012iDA898D8E0C5653FD/image-size/large?v=v2&px=999 "2021-04-16_09-22-08.png")


author: serge calderara
body: hello [@Samir](/t5/user/viewprofilepage/user-id/2168284) , I switch my JSM plan to Premium as you mention earlier in order to get access to incident rules, but still I could not find this menu in my opsgenie,

![vMuv4LOvZf.png](https://community.atlassian.com/t5/image/serverpage/image-id/142773iD0DC6CC3D40DAFF8/image-size/large?v=v2&px=999 "vMuv4LOvZf.png")

Any idea where should I find it ?

regards


author: Samir
body: Hi [@serge calderara](/t5/user/viewprofilepage/user-id/3385932) - incident rules are configured under a particular service.

You add a service from the "Services" tab under a particular team, and then within that service you can create [incident rules](https://support.atlassian.com/opsgenie/docs/automatically-create-an-incident-via-incident-rules/) to automate incident creation when a particular alert goes to that team:

e.g.

![2021-05-10_09-22-35.png](https://community.atlassian.com/t5/image/serverpage/image-id/142813iB457F8B3EE25850A/image-size/large?v=v2&px=999 "2021-05-10_09-22-35.png")

Thanks,

Samir


author: serge calderara
body: hello [@Samir](/t5/user/viewprofilepage/user-id/2168284) , got it

Do I need to go through this rule as well if I want to create automatically an Issue in Jira or do I need to add the Jira integration to opsgenie for that ?

Idea is to create automatically Jira issue from either Alert or Incident

thanks for advise

regards


author: Samir
body: Creating jira issues from alerts would be done via the [Jira integration](https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-jira/).


author: serge calderara
body: hello [@Samir](/t5/user/viewprofilepage/user-id/2168284) so if I sumarize :

1. To create automatically Incident from Alert in Opsgenie =\> use Incident rule
2. To create automatically Issue in Opsgenie from Alert or Incident=\> use Jira integration

Can you confirm ?

I can see they are 2 jira inegration, Service Desk or Sofware, which one should better be used ?


author: Samir
body: Yes confirmed.

Use Jira Software integration if you are integrating with a Jira Software project, use a Jira Service Management integration if you are integrating with a Jira Service Management project.

[Jira Software](https://www.atlassian.com/software/jira) and [Jira Service Management](https://www.atlassian.com/software/jira/service-management) are 2 different products. They are similar, but designed for different types of projects.


author: serge calderara
body: All is clear [@Samir](/t5/user/viewprofilepage/user-id/2168284) thank you