You can integrate Jira with the alert management feature 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 of ARMS 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.
  2. In the left-side navigation pane, choose Alert Management > Integration.
  3. On the Integration page, click the Ticket Integration tab.
  4. On the Ticket Integration tab, click JIRA.
  5. In the Add integration wizard, configure the parameters based on the following information:
    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.
      • 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.
      Notice
      • 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 configuration is complete, you can view the Jira integration on the Ticket Integration tab of the Integration page. 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 policy.
  2. On the Notification policy 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.
    Notice
    • 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. Select the Jira integration that you created for the Ticket system parameter. Configure the other parameters as required. For more information, see Configure a notification policy.
  5. After the configuration is complete, click the Check icon in the upper-right corner.
    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 > Alarm Sending History.
  2. In the upper-right corner of the Alarm 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.
    Notice
    • The operator is a contact whose mobile phone number is associated with the alert cards of a DingTalk group. For more information, see Handle alerts.
    • 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 to Ticket System.
  4. In the Push Alert to Ticket System dialog box, select the Jira integration from the Ticket System drop-down list 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 that you specify, you can use the alert card to push the alert to Jira. Then, a corresponding issue is created in Jira.

Notice
  • 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. 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 Alarm 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.