OpsGenie --> JSM Inegration (control fields that are passed)
Asked by David Wimbush:

Hi,

I have the following questions about the OpsGenie to JSM integration:

1. How do I control the fields that OpsGenie will pass to JSM. At present, all that is passed is the summary.
   1. I understand that custom fields cannot be mapped (without OEC), however, there must be a way to include more data in the JSM ticket? Impacted Service for instance
2. I have noticed that some of the issues created by OpsGenie in JSM are created with a request type, whilst others are not. Furthermore, the Ones without a request type contain the label 'FromOG', the ones with a request type do not
3. How can I search in JQL (or another route) for alerts that are created via OpsGenie? This is so I can look at automation rules to update other issue fields with OpsGenie alert content but only where the issue is raised by OpsGenie

On a separate note, how do I associate an alert with a Service? We are looking at OpsGenie as a centralised event management alerting tool but without the ability to see which services link to which alerts it's falling short.

Thanks,

Dave W


Answers:
author: Nick H
body: Hi [@David Wimbush](/t5/user/viewprofilepage/user-id/1335592)

Thanks for reaching out. I'll try to address those with the same bulleted numbers;

1) At this time only the Opsgenie alert's Message maps to the JSM issue's Summary, and the alert's Description maps to the issue's Description.

Like you mentioned, OEC can be used to map Opsgenie alert fields to JSM issue fields - regardless if they are custom or not. We just typically see OEC being used more frequently for required custom fields.

We do have a new Jira / JSM framework being released that will be able to map Opsgenie alert fields \>\> JSM issue fields out-of-the-box without OEC. I don't have an ETA just yet on when that'll be, but we'll keep you updated when that is pushed!

2) If a Jira issue is created from an Opsgenie alert through an outgoing Jira integration, the label 'FromOG' will appear on the issue:

![jiracomm3.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/139571i24DD01855BF034BA/image-size/large?v=v2&px=999 "jiracomm3.jpg")![jiracomm4.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/139570i467C6A611A19E459/image-size/large?v=v2&px=999 "jiracomm4.jpg")

While alerts that create issues through linking will not show the 'FromOG' label:

![jiracomm5.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/139572iF7F6853568DD9E41/image-size/large?v=v2&px=999 "jiracomm5.jpg")

3) I would suggest using the JQL **labels = fromOG**to search for issues created by Opsgenie. Again - this will pull any with that label that were created through the Jira integration(s):

![jiracomm6.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/139573iF1CB276C312CE8DC/image-size/large?v=v2&px=999 "jiracomm6.jpg")

Hope this helps. Let us know if you have any additional questions, issues, etc.

comments: author: David Wimbush
body: Hi Nick,

First off, thank you for the prompt and thorough response!

Okay, understood. Do you have a ballpark ETA on the OpsGenie --\> JSM expansion that will allow for custom/additional field mapping? If we're talking a month or so, I will wait. However, if we're looking at 2-3 Months+ I will look at an OEC integration for the time being.

Regarding Point 2) I have seen issue in my linked JSM project that have been generated by OpsGenie but do not include the label 'From OG' (See attached).

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

Is there something else I'm missing here? I've compared the logs and alert detail from the ones with and without the labels and as far as I can tell, there is no difference in configuration.

On a seperate topic, I can't seem to get OpsGenie to create incidents from Alerts. I've configured this within the Service Rules (I tried matching alert content on a number of fields), however, no Incidents are created.

++Service Rules:++

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

When an alert comes through, that references 'Service Name 1', no Incident is created. Any ideas why this might be the case?

Thanks!

Dave W


author: Nick H
body: Hi [@David Wimbush](/t5/user/viewprofilepage/user-id/1335592) ,

Sorry for the delay. I believe the new framework beta will be rolled out over the next week or so. We should be announcing this in-app, so be on the lookout for that.

AFAIK - any Opsgenie alert that creates a Jira/JSM issue through the integration will add the FromOG label. So I'm wondering if you are creating issues through another method? Or if you have some automation rule(s) configured in Jira/JSM that are stripping the label.

As for the Incident Rules query - those conditions need to match one or more of the alert fields AFTER it's created / the data parses into those fields. So you would have to have "Service Name 1" included in one of these alert fields for one of those conditions to match:

![comm123.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/141692i0702FD8F553F65A7/image-size/large?v=v2&px=999 "comm123.jpg")

If the alert is matching on one of those conditions, it could be associating with an open existing incident as well: <https://support.atlassian.com/opsgenie/docs/associate-an-alert-with-an-incident/>

If it's associated with the incident, there should be an option to click into the incident, or check if it's associated:

![comm1233.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/141693iD699BE175A1C3C38/image-size/large?v=v2&px=999 "comm1233.jpg")


Tags: jira-cloud

jira-service-management