Creating Jira integrations
You can integrate with Jira to enable connectivity to Jira tickets. This enables you to view the resolutions for Jira incidents within IBM Cloud Pak for AIOps based on the similar Jira tickets. You can also get Jira issues created for incidents in IBM Cloud Pak for AIOps, update the incident in AIOps, and get the same update in the corresponding Jira issue.
For more information about working with Jira integrations, see the following sections:
- Before you begin
- Best practices
- Creating Jira integrations
- Enabling and disabling data flow in Jira integrations
- Editing Jira integrations
- Deleting Jira integrations
Before you begin
Ensure that you have following information to hand:
- Domain of the Jira instance
- Key for the Jira project
- User name to access the Jira server
- Password or API token for the Jira server
- Jira issue type
- Final state of the Jira issue
Best practices
- When creating multiple Jira connectors, use a different username and token to facilitate speedier data collection.
- Use a personal access token that does not expire.
- When Historical data collection is selected, select a start date close to the date that will be used for AI training. Selecting a date further back might result in more API calls to Jira, especially if there is a large volume of issues.
Creating Jira integrations
To create an Jira integration, complete the following steps:
-
Log in to IBM Cloud Pak for AIOps console.
-
Expand the navigation menu (four horizontal bars), then click Define > Integrations.
-
On the Integrations page, click Add integration.
-
From the list of available integrations, find and click the Jira tile.
Note: If you do not immediately see the integration that you want to create, you can filter the tiles by type of integration. Click the type of integration that you want in the Category section.
-
On the side-panel, review the instructions and click Get started.
-
On the Add integration page, define the general integration details:
- Name: The display name of your integration.
- Description: An optional description for the integration.
- Domain of Jira instance: Enter the domain of your Jira instance, for example
https://<your-environment-id>.atlassian.net
. - Jira project key: Enter the key for Jira project that contains your tickets.
- User name to access Jira server: Enter the name of a Jira user that has permissions to create and manage tickets in the specified project.
- Password or API token: +Enter the password or personal access token that IBM Cloud Pak for AIOps will use when calling the Jira APIs.
-
Click Test connection. It is best to wait for the test to succeed before continuing to the next step. This can take some time.
-
Click Next.
-
Use the Field mapping page to map IBM Cloud Pack for AIOps incident fields to Jira ticket fields. You can use the default template, or you can customize it to suit your environment.
Note: To customize the mapping, copy the text out of the mapping textbox and into your preferred text editor. Then add the mapping for your fields. When done, copy the text back into the mapping textbox.
The following example maps the states that are in the
statusMap
.Keys
are the IBM Cloud Pak for AIOps states andvalues
are Jira states. You can set the status using thestatusMap
as shown below:( $statusMap := { "resolved": "Resolved", "inProgress": "In Progress", "assigned": "To Do", "closed": "Done" }; { "summary": $string(incident.title), "description": $join(["Incident Id:", $string(incident.id), "\nAIOPS Incident Overview URL: https://", $string(URL_PREFIX), "/aiops/default/resolution-hub/incidents/all/", $string(incident.id), "/overview", "\nStatus: ", $string(incident.state), "\nDescription: ", $string(incident.description)]), "labels": [$join(["priority:", $string(incident.priority)])], "assignee": $string(incident.owner), "status": $statusMap[$string(incident.state)] ? $statusMap[$string(incident.state)] : $string(incident.state) })
You must enter the following information on this page according to your Jira project settings:
- Issue type for Jira: Enter the type of issue that will be created in Jira. The default value is
Task
. - Final state of Jira issue: Enter the final state of the Jira issue that contains the incident. The default value is
Done
.
- Issue type for Jira: Enter the type of issue that will be created in Jira. The default value is
-
Click Next.
-
Enter the following Collect ticket data information:
-
Data collection: Enable the toggle button.
-
Mode: Select one of the following options:
- Live - Continuous Similar Tickets training
- Historical - Initial Similar Tickets training
-
Jira issue sampling rate: Specify the frequency (in minutes) at which data is sampled for Jira issues.
-
-
Click Done.
You have created a Jira integration in your instance.
Using a policy to open a Jira ticket
When the Jira integration is up and running, you can create a policy that opens an incident within Jira by selecting the integration from the Open a ticket area of your Promote alerts to an incident policies. See Steps 12 and 13 of Promote alerts to an incident.
Enabling and disabling data flow in Jira integrations
If you did not enable your data collection during creation, you can enable your integration afterward. You can also disable a previously enabled integration the same way. To enable or disable a created integration, complete the following steps:
-
Log in to IBM Cloud Pak for AIOps console.
-
Expand the navigation menu (four horizontal bars), then click Define > Integrations.
-
On the Manage integrations tab of the Integrations page, click the Jira integration type.
-
Click the integration that you want to enable or disable.
-
Go to the Collect ticket data section. Enable the toggle button if required.
Note: Disabling data collection for an integration does not delete the integration.
You have enabled or disabled your integration. For more information about deleting an integration, see Deleting Jira integrations.
Editing Jira integrations
After you create your integration, you can edit it. To edit an integration, complete the following steps:
-
Log in to IBM Cloud Pak for AIOps console.
-
Expand the navigation menu (four horizontal bars), then click Define > Integrations.
-
Click the Jira integration type on the Manage integrations tab of the Integrations page.
-
On the Jira integrations page, click the name of the integration that you want to edit. Alternatively, you can click the options menu (three vertical dots) for the integration and click Edit. The integration configuration opens.
-
Edit your integration as required. Click Save when you are done editing.
You have edited your integration. If you have not previously enabled or disabled your application, you can enable or disable the integration directly from the interface. For more information about enabling and disabling your integration, see Enabling and disabling Jira integrations. For more information about deleting an integration, see Deleting Jira integrations.
Deleting Jira integrations
If you no longer need your Jira integration and want to not only disable it, but delete it entirely, you can delete the integration from the console.
To delete an integration, complete the following steps:
-
Log in to IBM Cloud Pak for AIOps console.
-
Expand the navigation menu (four horizontal bars), then click Define > Integrations.
-
Click the Jira integration type on the Manage integrations tab of the Integrations page.
-
On the Jira integrations page, click the options menu (three vertical dots) for the integration that you want to delete and click Delete.
-
Enter the name of the integration to confirm that you want to delete your integration. Then, click Delete.
Your integration is deleted.