Setting fields in responder alerts

David Young February 13, 2023

I am currently using the "Responder alert" functionality in JSM, which sets the appropriate responder based on the affected service, and sends that information to Opsgenie.  I need to set some additional information in the Opsgenie alert from custom properties in the JSM incident that triggered the alert.  I first looked at setting up an integration with JSM in Opsgenie, and set up a "Create alert" automation rule.  However, this just lead to two duplicate alerts being created in Opsgenie - one "responder alert" with the appropriate "Owner team" and "Responder" fields set, and another with the custom properties I need from the JSM incident.

How do I create an alert from a JSM incident that assigns the "Owner team" and "Responder" in the Opsgenie alert and also copy additional custom fields from the JSM incident into the Opsgenie alert?

1 answer

1 vote
Rafael Meira
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 15, 2023

Hey @David Young

To achieve this, you should be able to do it by creating an alert in Jira Service Management that includes the additional custom fields from the JSM incident. Here's how to do it:

  1. Go to the "Project settings" in JSM and select "Automation".
  2. Create a new automation rule and set the trigger to "Issue created".
  3. Add an action to "Send a responder alert" and select the appropriate responder.
  4. In the "Details" section of the responder alert, click on "Customize fields".
  5. Here, you can select the custom fields that you want to include in the responder alert. Simply click on the "Add custom field" button, select the appropriate field, and give it a name that will be used as the key in Opsgenie.
  6. Click "Save" to save the responder alert.

    https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-jira-service-management/

Now, when an incident is created in JSM, the appropriate responder alert will be triggered, and the custom fields you selected will be included in the alert. To copy the additional custom fields from the JSM incident into the Opsgenie alert, you can use the Opsgenie API and Jira API to create a custom integration. https://docs.opsgenie.com/docs/opsgenie-go-api-v2

  1. Create an API key in Opsgenie by going to "Settings" > "API".
  2. In JSM, create a new automation rule and set the trigger to "Issue created".
  3. Add an action to "Send web request" and set the method to "POST".
  4. Set the URL to the Opsgenie API endpoint to create an alert.
  5. In the "Body" section, include the data you want to send to Opsgenie, including the custom fields from the JSM incident.
  6. Use the appropriate keys in the request to map the JSM custom field values to the appropriate Opsgenie fields.
  7. Save the automation rule.

Now, when an incident is created in JSM, the appropriate responder alert will be triggered, and the custom fields you selected will be included in the alert. The Opsgenie API integration will then copy the additional custom fields from the JSM incident into the Opsgenie alert.

Because of the type of question you have, in case it does not work or you find yourself lost in any step, I strongly recommend you create a formal ticket with us for further assistance at https://support.atlassian.com/opsgenie/

Best,
Rafa

David Young February 28, 2023

Apologies for the late response. In step 3 (Add an action to "Send a responder alert" and select the appropriate responder), I do not see that action as an option. FWIW we do have the "Alerts" feature and "Responder alerts" enabled in our JSM project. Is there some other setting I need to enable?

Thanks!

Rafael Meira
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 1, 2023

Hey @David Young  My suggestion since I am more focused on the Opsgenie side of things, would be for you to create a formal ticket with the JSM support, in order to have the correct support to help you troubleshoot, ok?

You can open the ticket here:
https://support.atlassian.com/contact/

Then pick technical issues -> Pick JSM (Jira Service Management).

Let me know if you have any questions David.

Best,
Rafa

David Young March 2, 2023

As a followup for anyone wondering the same thing, this is not possible per Atlassian support, which is frustrating.

Like Róbert Szabó likes this
Rafael Meira
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 3, 2023

Hey @David Young 
The JSM could not assist you. Could you explain what happened?

I will try to provide assistance as soon as you reply back.

Thanks.

David Young March 3, 2023

Apparently, you cannot customize responder alerts.  I can create some automation rules in JSM that basically look at a property that contains the affected service and assign a responder (basically using a bunch of if/else statements).  Ultimately, it looks like I'll just wind up not using JSM and instead setting up an API integration with Opsgenie directly from Azure (where our alerts are fired from).  There are just too many missing features between the JSM <-> Opsgenie integration to make it a viable solution for our problems.  Even the native Azure integration with Opsgenie doesn't let you do something like assign the responder from a property in the Azure alert, which is frustrating and why I had to go with a custom API integration, instead.

Rafael Meira
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 3, 2023

Yes @David Young 
Was there a Feature Request created on your behalf on this topic?

David Young March 3, 2023

Christian, who was helping me, pointed me to this existing issue:  https://jira.atlassian.com/browse/OPSGENIE-917

Rafael Meira
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 6, 2023

I am glad you have the Feature Request in place, we will surely update you on the progress.

Hope you have a great day @David Young 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events