How to close Opsgenie alert when corresponding Incident issue is resolved or closed in JSM

お困りですか?

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

コミュニティに質問

プラットフォームについて: Cloud のみ - この記事は クラウド プラットフォームのアトラシアン製品に適用されます。

要約

This article will illustrate how to close the Opsgenie alert when the corresponding issue is resolved or closed in Jira. At the moment Jira doesn't send any information to Opsgenie in case the "issue closed" event is fired.

Configure an Automation rule

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

Step 1: Configuration in Jira

Create an automation rule to add an internal comment on the closed issue:
Jira automation rule configuration screen to add a comment close alert when an incident is transitioned to Resolved, Cancelled, or Completed status. The rule is currently disabled.


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):
This screenshot shows the configuration settings for an integration. The Close Alert action is selected within the Integrations settings. The filter is set to match comments containing the phrase close alert. Available alert fields like Issue Key, Summary, Description, Status, Priority, Labels, Components, Comment Author, Comment Body, Assignee, and Reporter information can be dragged and dropped into the alert configuration. The user can save or cancel the integration settings.


最終更新日: 2025 年 2 月 11 日

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

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