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 ticket 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
- Log on to the ARMS console. In the left-side navigation pane, choose .
On the Integrations page, click the Notification Integrations tab, and then click JIRA.
In the Add Integration wizard, configure the parameters based on the following information:
In the Basic Information step, enter the integration name and Jira instance URL, set the Verification Method parameter to Log On with Jira Account, enter the username and password of the Jira instance, add the integration description as required, and then click Test Connection.
After the Connection Succeeded message appears, click Next.
NoteIf the connection fails, the specified URL, username, or password is invalid. Modify the parameters and click Test Connection again.
In the Alert Source Configuration step, configure the following parameters of alert synchronization 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
NoteWe 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.
ImportantIf 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 created Jira integration on the Notification Integrations tab.
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.
In the left-side navigation pane, choose .
On the Notification Policy page, click Create Notification Policy or edit an existing notification policy.
In the When an alert is triggered, section on the notification policy editing page, specify the Contacts parameter. You must select at least one contact or contact group.
ImportantJira 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 handler 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.
Select the Jira integration that you created for Ticket System. Configure other parameters as required. For more information, see Create and manage a notification policy.
Click Save.
This way, the alerts that match the notification policy are pushed to Jira.
Method 2
On the Alert Event History page, push alerts to Jira and create issues in Jira.
In the left-side navigation pane, choose .
In the upper-right corner of the Alert Sending History page, associate the handler of the Jira issue with the alert and click the name of the alert that you want to view.
ImportantJira searches for the user that has the same email address or name (username) as the operator, and sets the user as the handler of the issue that is created.
If Jira cannot find a matching user, the alert is not pushed to Jira.
On the details page of the alert, click the icon in the upper-right corner and click Push Alerts.
In the dialog box that appears, select the created Jira integration from the Ticket System drop-down list and click OK.
After the alert is pushed, you can view the link to the Jira issue corresponding to the alert on the alert details page.
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.
The operator who pushes the alert will be the handler of the issue that is created in Jira.
The operator is a contact whose mobile number is bound in the alert card of the DingTalk group. For more information, see the Handle alerts section of the View historical alerts topic.
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 in the DingTalk group, click Push Alerts and 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 Alerts, and then select the Jira integration that you created.
After the alert is pushed, you can find the link to the Jira issue corresponding to the alert 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 handler of the issue in Jira.
NoteThe 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 handler of the issue in Jira.
The claimant must have a matching user account in Jira.
Synchronize Jira operations to alerts
On the Integrations page in ARMS, click the Notification Integrations tab to obtain the integration key of Jira.
Log on to the Jira ticketing system. In the upper-right corner, click the Settings icon and click System.
Enter the administrator password and click OK to go to the System Configuration page.
In the left-side navigation pane of the System page, click Webhooks.
On the Webhook page, click + Create a webhook.
On the page that appears, set URL to
http://alerts.aliyuncs.com/api/jira/receiver/{token}/${project.key}/${issue.key}
. Replace {token} with the Jira integration key obtained in Step 1.Configure other parameters as required. For more information, see 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 handler 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.