How to close Opsgenie alert when corresponding Incident issue is resolved or closed in JIRA Service Management

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

目的

This knowledge base article will illustrate how to close the Opsgenie alert when the corresponding issue is resolved or closed. The reason to develop this workaround is that as of now Jira doesn't send any information to the Opsgenie in case of "issue closed" event is fired.



ソリューション

Please follow the steps below to build the solution. In the following example, the rule is being applied to Incident issue type issues which have been raised via creating an alert in Opsgenie.

Step 1: Configuration in Jira

Create an automation rule to add an internal comment on the closed issue:


Create an automation rule in which will add an internal comment to the issue when the issue transitions to the necessary status you're concerned with (e.g. Resolved / Cancelled / Closed / etc).
In the following Automation rule, I add an internal comment of "close alert" to the issue when the issue transitions to a completed state:

Once this has been created and is enabled, give it a quick test with a relevant test issue to make sure this part works.



Step 2: Configuration in Opsgenie

In Opsgenie we will be updating the respective integration to update the "Close Alert" action with a condition of where "commentBody" equals (or contains) the string "close alert" (Note: double quotes used here are not necessary for inclusion).


There are two main type of integrations with Jira Service Management, as shown in the following screenshot:

If using the “JIRA Service Management (NEW)” integration:

Modify the "incoming automation rules" to close alert when commentBody contains the string "close alert":
   

If using the "JIRA Service Management Cloud (Legacy)" integration:

Update the "Close Alert" action to include the condition of where "commentBody" equals (or contains) the string "close alert" (Note: double quotes used here are not necessary for inclusion):



最終更新日 2024 年 11 月 25 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.