Before creating an Outbound Integration, ensure there is a JIRA Inbound Integration.

Add Custom Fields

To begin creating an Outbound Integration for JIRA, several non-standard items must be created, some in JIRA, some in AlertOps.  In JIRA, create the following:

In AlertOps, a Template is used to create custom attributes.  In most cases, where only a small number of Attributes are created, extending the Standard Template is sufficient, though you can create a new one if you choose.  Create the following Attributes:

JIRA Outbound Integration Configuration

  1. We will create the Outbound Integration, with the following Methods:

To do this, we expand the Integrations menu and select Outbound Integrations, then press Add Outbound Integration.

Integration Name: JIRA
Web Security Type: Basic
UserName: AlertOps API (the JIRA user noted above)
Password: the Password assigned to the AlertOps API user

Press Save.

2. Add the Methods:

JIRA Create Issue 

JIRA Resolve Issue

Add Issue Comment (Optional)

Workflow Configuration

We will now create the Workflows that will apply the Outbound Integration.  For each workflow, select Workflow from the Menu and press Add Workflow.  

1. Create Issue Workflow

Name: JIRA Create Issue
Type: MessageThread
Template: choose the Template where the custom JIRA fields were added (above).
Schedued: checked - Recurrence Interval 0

Press Save.

Start Conditions: Use Match All Conditions, add the following conditions:

JIRAIssueID (Template field) is blank (prevent creating a duplicate issue in JIRA).

MessageThreadStatusType IS NOT Closed.

MessageThreadTimeFromBeginning is 1 (Workflow do not fire when an alert is first created, minimum wait time is 1 minute).

Workflow Action is Outbound Service Notification – JIRA Create Issue.

Press Enable in the top right of the window, then Save.

2. Resolve Issue Workflow

Name: JIRA Resolve Issue
Type: MessageThread
Template: choose the Template where the custom JIRA fields were added (above).
Scheduled: unchecked

Press Save.

Start Conditions: Use Match All Conditions, add the following conditions:

JIRAIssueID IS NOT empty (only close if we have JIRAIssueID).

MessageThreadStatusType is Closed (fires when the alert is closed)

Workflow Action is Outbound Service Notification – JIRA Resolve Issue.

Press Enable in the top right of the window, then Save.

3. Add Note on Assignment Workflow (optional)

You can add comments or notes to a JIRA Issue.
Name: JIRA Add Note on Assignment
Type: MessageThread
Scheduled: unchecked

Start Conditions: Use Match All Conditions, add the following conditions:

MessageThreadStatusType is Assigned (fires on assignment).

Workflow Action is Outbound Service Notification – JIRA Add Issue Comment.

JSON body:

{ "body": "The issue has been updated: Status = <<MessageThread.MessageThreadStatusType>>. Owner =  <<MessageThread.OwnerName>>"}

Press Enable in the top right of the window, then Save.

4. Add Note on Delivery Workflow (optional)
To add a note to the JIRA Issue when a Delivery event occurs (sent, acknowledged, failed, or delivered):

Name: JIRA Add Note on Delivery
Type: Delivery Attempt

Start Conditions: Use Match Any Conditions, add conditions you want notated:

JSON body:
{ "body": "Delivery status update for <<DeliveryAttempt.ContactName>> contact method <<DeliveryAttempt.ContactType>> at <<DeliveryAttempt.SentDate>> status <<DeliveryAttempt.Status>>"}

JIRA Configuration

!IMPORTANT!

If you are implementing two-way integrations (creating JIRA Issues from AlertOps and creating AlertOps Alerts from JIRA), you must include the AlertOps ID field in your JIRA implementation and also include the filter in your JIRA Business Rule.

Add a custom field to JIRA for the AlertOps ID.

Type: Text Field (single line)

Issue Type(s): Global (all issues), or choose a specific JIRA template.

Webhook to Send an Issue to AlertOps when Created

The Webhooks for close and open use the same Inbound Integration endpoint.

AlertOps may route requests to and endpoint to different (cloned) integrations.

The status value in the JIRA request to AlertOps tells AlertOps which action must be done.

Webhook to Send an Issue to AlertOps when Closed

The Webhooks for close and open use the same Inbound Integration endpoint.

AlertOps may route requests to and endpoint to different (cloned) integrations.

The status value in the JIRA request to AlertOps tells AlertOps which action must be done.

Did this answer your question?