Skip to content

Configure Alert Actions for the Splunk Add-on for Jira Cloud

The add-on provides an alert action to create or update a Jira issue in a selected domain and Jira cloud instance. To configure the alert action:

  1. Navigate to Add-on user interface and go to Settings > Searches, Reports, and Alerts.
  2. Click New Alert.
  3. Click Create Alert and provide the appropriate information.
  4. Select Jira Issue Integration from the alert actions drop-down.
  5. Select the API Token from the list of configured tokens or click on the navigation link and configure a new domain and API Token.

    Provide the following information:

    • Project Key to create a Jira issue in that project. For example, TEMP. This field is not used while updating the Jira issue.

    • Issue Type for which you want to create a Jira Issue. For example, Story. This field is not used while updating the Jira issue.

    • Summary

    • Priority - Confirm that this priority value exists in your selected Jira cloud instance. If the priority does not exist, the Jira issue is not created and the error is not logged.

    • Description - The value entered here is interpreted as text format by the add-on and the API request is sent to the Jira cloud to create or update the Jira issue.

    • Label in a comma-separated list. This is used to add the labels for the Jira issue that is created or updated.

    • Component as a comma-separated list. This adds the components in the Jira issue that you are creating or updating.

    • Custom Fields as || separated values in key=value pair, for example: field1=value1||field2=value2.

      Provide the keys in plain text, as the add-on supports creating or updating a Jira with text-type custom fields only.

    • Jira Key if you want to update the Jira issue. For example, TEMP-123.

    • Status value - If you want to update the status of the Jira Issue provided in Jira Key above.

  6. Click Save.

About Alert Actions

If the Jira Key you provide exists in the Jira Cloud instance, the add-on makes an API call to the Jira Cloud instance to update that Jira Issue. If the Jira Issue does not exist, the add-on generates an error.

If the value specified in the status field is available in the possible transition list, then the add-on will do the transition of the Jira Issue by updating the status.

If you do not specify the Jira Key field, the add-on checks whether the entered Project Key and Issue Type provided exist in the Jira instance. If found, the add-on makes an API call to create the Jira issue with the user-provided values while configuring the Alert Action.

To run the Alert Action, you can use the sendalert command to pass the correlation_id parameter. This value is used to track the Jira Issue created or updated by the Alert Action. The correlation ID will not be used to make API calls to Jira cloud and the value also will not appear in any of the Jira issues. The Correlation ID value will be logged along with successful loggers with the Jira issues being created or updated.

Example

See the following example for how to use correlation ID in the sendalert command:

index=<configured index> | sendalert jira_cloud_issue param.api_token="test" param.project_key="TEMP" param.issue_type="Story" param.summary="Test Summary" param.correlation_id="00000000-0000-0000-0000-00000000" param.status="In Progress" param.parent="ABCD-123"

In this example, the correlation ID is logged in the log file when this Jira Issue is created, so that the user can directly use this correlation ID to search the Jira Issue link.

Fields are case-sensitive and the API calls will be made using these fields. If the fields do not match the actual fields in the Jira instance, then the API will raise an error. The status field is case-insensitive. So the user can provide “IN PROGRESS” or “In Progress” for example, and the status of the mentioned Jira issue will be updated as applicable

Note

When an existing Jira issue is updated using the Alert Action, the values provided in the Alert Action configuration replace the existing values in the Jira Issue and are not appended.