OpsGenie's Action Mappings for On-Premise JIRA Products

by Çağla Arıkan Jun 7, 2017

A couple of months ago, we introduced the Action Mapping feature for OpsGenie’s outbound integrations with Cloud-based products. Now, we are proud to announce that the action mappings feature is also available for on-premise product integrations, through the Marid integration tool! In this blog post, we’ll explain how this works in OpsGenie’s on-premise JIRA integration. In order to support the same functionality for JIRA’s self-hosted, on-premises product, we decided to add the action mappings feature to JIRA’s Marid package.

JIRA is a great tool for software planning, bug and issue tracking, and project management. It has both a cloud version and a self-hosted version that is available for on-premise installations.  OpsGenie’s action mappings feature lets you decide what will happen in JIRA when you perform various actions in OpsGenie. You can create new issues, add comments to issues, and set the status of issues to IN PROGRESS, CLOSED, RESOLVED, or DONE. You can choose which actions to synchronize this way while you are configuring the OpsGenie-JIRA Integration. In order to support the same integration functionality both for the Cloud and Self-Hosted JIRA versions, we decided to add the action mappings feature to JIRA’s Marid package.

 How to use the new Marid package to configure action mapping

Do you want to use our JIRA Marid package? It’s easy to set up:

  • First, you need to enable our new Send via Marid checkbox, on the JIRA Integration page. That lets OpsGenie know that all of your configurations for the Integration will go through the Marid package.
JIRA integration via Marid
  • After that, you set the mappings by choosing what should be done in JIRA for different OpsGenie actions.

Action Mapping for OpsGenie JIRA integration

  • You can configure other JIRA settings either on the JIRA Integration page or in the Marid configuration file: opsgenie-integration.conf.

Note for Integration SettingsSettings that you configure on the Integration page take precedence over ones that you configure in the Marid configuration file.

  • Finally, you need to paste the API key for the integration into the opsgenie-integration.conf file, as the value for the apiKey field.


After you take these steps, install and start Marid. You can learn more about how to configure and use Marid in our JIRA integration document.

Now you are ready to use the Integration!


What if you want to set an issue’s status to a custom value that you defined in JIRA?

One of the benefits of using the Marid Integration tool is that you can easily modify the code that we provide to you. You can check how we developed the integration to support different actions, and then add or change necessary lines to perform your desired action.


We send which action is performed on OpsGenie so you can easily set what the script should do in that situation using a simple if-else condition.

Note for JIRA integrationBefore you add such a condition, you set the mapping (on the JIRA integration page) for the action you want to take in JIRA when an action is taken in OpsGenie. Then you can change the code according to the action mapping you set and the action to be performed.

For example:

If I want to set to status of ACKNOWLEDGE whenever the corresponding OpsGenie alerts are acknowledged, I perform the following actions:

  • First, I set a mapping for what happens when an alert is acknowledged in OpsGenie. Note that this is a dummy mapping which will be overridden later. In this case, I set the mapping to “status of the issue will be set to CLOSED” in JIRA:
Action mapping
  • Next, I add a new if-else statement to the jiraActionExecutor.groovy file:


else if(mappedAction == "closeIssue" && action == “Acknowledge”)


      //code to perform setting status to ACKNOWLEDGE in JIRA will be written here



You can perform other custom actions in JIRA, by adding if-else statements, like the one above. Moreover, if you set custom mandatory fields in JIRA, you can add them to the payload for sending actions by modifying the groovy file.


OpsGenie’s new Marid package for the JIRA Integration gives you the ability to choose which actions to perform whenever an OpsGenie alert is created, updated, or closed —  which gives you more control over both alerts and issues. The new package also lets you easily change the code in order to support your custom actions and parameters.


Go ahead and test our integration! If you do not have an account yet, you can try OpsGenie for free!