You can integrate Jira with the Alert Management sub-service of Application Real-Time Monitoring Service (ARMS) by using a Jira account or Open Authorization (OAuth). This topic describes how to integrate Jira with Alert Management by using a Jira account. This way, an issue is created in Jira when an alert is generated in ARMS. The alert status and the issue status can be synchronized.

Integrate Jira with ARMS

  1. Log on to the ARMS console. In the left-side navigation pane, choose Alert Management > Integrations.
  2. On the Integrations page, click the Notification Integration tab and then click JIRA.
  3. In the Add Integration wizard, configure the following settings:
    1. On the Basic Information wizard page, enter the name of the integration, the URL that is provided by Jira, set Verification to Log On with Jira Account, enter the username and password of your Jira account, enter a description based on your business requirements, and then click Test Connectivity.
    2. If the message Connected. appears, click Next.
      Note If the connection fails, the specified URL, username, or password is invalid. Modify the settings and click Test Connectivity again.
    3. On the Alert Source Configuration wizard page, set the following parameters and click Save.
      Parameter Description Example
      Project Specify the Jira project to which the information about alerts is synchronized. Integrated monitoring, management, and control project
      Type The issue type in Jira. Valid values:
      • Task
      • Subtask
      • Improvement
      • New feature
      • Bug
      • Epic
      • Story
      Bug
      The status of the issue when the alert is disabled. The status of Jira issues when the issues are resolved. When a Jira issue is in the specified state, the Jira issue is identified as resolved. Operations on the alert that corresponds to the issue are not synchronized to the issue. Valid values:
      • To Do
      • In Progress
      • In Review
      • Done
      Note We recommend that you select Done. If you select another value and the status of an issue changes to Done, operations on the alert that corresponds to the issue are still synchronized to the issue.
      Done
      Priority The mappings between alert severity levels and issue priorities in Jira.
      Important
      • If an alert severity level is not mapped to an issue priority, alerts of this severity level are not synchronized to Jira.
      • When an alert is pushed to Jira for the first time, the severity level is synchronized based on the mapping that you configure. After the severity level is synchronized, if you modify only the severity level, the information about the modification is not synchronized to Jira.
      • P1: Highest
      • P2: High
      • P3: Medium
      • P4: Low
      • P5: Lowest
    After the settings are configured, you can view the Jira integration on the Notification Integration tab. Jira integration

Push alerts to Jira

After you add the Jira integration, you can push alerts to Jira by using one of the following three methods:

Method 1

Configure a notification policy that creates an issue in Jira when an alert is generated.

  1. In the left-side navigation pane, choose Alert Management > Notification Policies.
  2. On the Notification Policies page, click Create Notification Policy or edit an existing notification policy.
  3. In the When an alert is triggered, section on the edit page, specify the Contacts parameter. You must select at least one contact or contact group.
    Important
    • Jira searches for the user that has the same email address or name (username) as the first contact that is specified in the notification policy, and sets the user as the assignee of the issue that is created.
    • If Jira cannot find the user that matches the first contact that is specified in the notification policy, the alert is not pushed to Jira.
  4. Set the Ticket System parameter to the Jira integration that you created. Configure the other parameters as required. For more information, see Create and manage a notification policy.
  5. Click Save.
    This way, the alerts that match the notification policy are pushed to Jira.

Method 2

On the Alert Sending History page, push alerts to Jira and create issues in Jira.

  1. In the left-side navigation pane, choose Alert Management > Alert Sending History.
  2. In the upper-right corner of the Alert Sending History page, select the operator and click the name of the alert that you want to manage. The operator will be the assignee of the issue in Jira.
    Important
    • Jira searches for the user that has the same email address or name (username) as the operator, and sets the user as the assignee of the issue that is created.
    • If Jira cannot find a matching user, the alert is not pushed to Jira.
  3. On the details page of the alert, click the More icon in the upper-right corner, and then click Push Alerts.
  4. In the dialog box that appears, set the Ticket System parameter to the created Jira integration and click OK.
    After the alert is pushed, you can find the link of the Jira issue on the details page of the alert.

Method 3

After an alert is generated and an alert card is received in the DingTalk group chat that you specify, you can use the alert card to push the alert to Jira. Then, a corresponding issue is created in Jira.

Important
  • The operator who pushes the alert will be the assignee of the issue that is created in Jira.
  • The operator is a contact whose mobile phone number is associated with the alert cards of a DingTalk group chat. For more information, see Handle alerts.
  • If Jira finds a user who has the same email address or username as the contact that you specify in ARMS, the contact matches the user in Jira.
  • If Jira cannot find a matching user, the alert is not pushed to Jira.
  • In the alert card that you receive, click Push Alert, and then select the Jira integration that you created.
  • Click the name of the alert on the alert card. In the details panel of the alert, click Settings, click Push Ticket, and then select the Jira integration that you created.

After the alert is pushed, you can find the link of the Jira issue on the details page of the alert.

Alerts-related operations that can be synchronized

After you complete the preceding steps, the following operations on alerts in ARMS are synchronized to Jira.

The following operations on the Alert Sending History page are synchronized to Jira:

  • Claim an alert: The claimant will be the assignee of the issue in Jira.
    Note The claimant must have a matching user account in Jira.
  • Comment on an alert: The comment is synchronized to the comment of the issue in Jira.
  • Resolve an alert: The solution is synchronized to the comment of the issue in Jira.

The following operation on the alert card is synchronized to Jira:

Claim an alert: The claimant will be the assignee of the issue in Jira.

Note The claimant must have a matching user account in Jira.

Synchronize Jira operations to alerts

  1. On the Integration page in ARMS, click the Ticket Integration tab to obtain the integration key of Jira.
    Integration key of Jira
  2. Log on to Jira, click the Settings icon in the upper-right corner of the Jira page, and then click System.
    Jira settings
  3. Enter the password of the administrator and click OK to go to the System page.
  4. On the System page, choose Advanced > WebHooks in the left-side navigation pane.
  5. On the WebHooks page, click + Create a WebHook.
    Create a webhook in Jira
  6. On the page that appears, set URL to http://alerts.console.aliyun.com/api/jira/receiver/{token}/${project.key}/${issue.key}. {token} is the integration key that is obtained in Step 1.
    Create a webhook in Jira
  7. Set other parameters as required. For more information, see the Jira documentation. Then, click Create.

    After you complete the preceding steps, the following operations on an issue in Jira are synchronized to alert management of ARMS.

    • Modify the assignee of an issue: The handler of the corresponding alert is modified.
    • Comment on an issue: The comment is added to the comment of the corresponding alert.