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.

  1. Create an API Key in Opsgenie for Authorization purposes.
    1. Navigate to Settings → API key management.
    2. Click on Add new API key
    3. Add a Name > Select the following option for Access rights:
      Read
      Create and update.
    4. Click on Add API key and copy it.

  2. Create an Automation Rule in Jira.
    1. Open the project that you have chosen while adding the Jira Service Management integration in Opsgenie.
    2. Navigate to Project Settings → Automation → Create Rule.
      1. Trigger: Select the Field Value Changed action
        1. Fields to monitor for Affected Services
        2. Change type: Any changes to the field value
      2. New action: Send a web request
        1. URL: https://api.opsgenie.com/v2/alerts/{{issue.key}}/details?identifierType=alias
        2. HTTP Method: POST
        3. Web request body: Custom Data, send the below-mentioned data

          { "details": { "Affected Services": "{{issue.Affected Services.name}}" } }
          {
              "details": {
                  "Affected Services": "{{issue.Affected Services.name}}"
              }
          }



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

  1. Opsgenie alert API
  2. Jira Automation Conditions
  3. Import automation rules to a Jira cloud site

If you encounter issues or require further clarification on the topic, please consider reaching out to Atlassian Support for further assistance.




Last modified on May 1, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.