How to show the Affected Services from JSM incident to Opsgenie alerts
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
It is not possible to show the Affected Services on Opsgenie alerts, which are added to the Jira Service Management Incident ticket. This is due to a limitation and it is being currently tracked as a Feature Request mentioned below:
The below-mentioned workaround can help if you want to show the name of the Affected Services on the Opsgenie alert once it is updated on the Incident ticket in the service project.
Environment
Jira Service Management Cloud integrated with Opsgenie via the New Integration:
Solution
You can follow the approach mentioned below to configure the Automation rule in Jira to update the Affected Services as extra properties in the Opsgenie alert.
- Create an API Key in Opsgenie for Authorization purposes.
- Navigate to Settings → API key management.
- Click on Add new API key
- Add a Name > Select the following option for Access rights:
- Read
- Create and update. - Click on Add API key and copy it.
- Create an Automation Rule in Jira.
- Open the project that you have chosen while adding the Jira Service Management integration in Opsgenie.
- Navigate to Project Settings → Automation → Create Rule.
- Trigger: Select the Field Value Changed action
- Fields to monitor for Affected Services
- Change type: Any changes to the field value
- New action: Send a web request
- URL: https://api.opsgenie.com/v2/alerts/{{issue.key}}/details?identifierType=alias
- HTTP Method: POST
Web request body: Custom Data, send the below-mentioned data
{ "details": { "Affected Services": "{{issue.Affected Services.name}}" } }{ "details": { "Affected Services": "{{issue.Affected Services.name}}" } }
- Trigger: Select the Field Value Changed action
Note:
You can import the following mentioned automation rule in your cloud site. Once the import is completed, please add your API key from step 1.d above and save it.
References:
If you encounter issues or require further clarification on the topic, please consider reaching out to Atlassian Support for further assistance.