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:
- Navigate to Add-on user interface and go to Settings > Searches, Reports, and Alerts.
- Click New Alert'.
- Click Create Alert and provide the appropriate information.
- Select "Jira Issue Integration" from the alert actions dropdown list.
- 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 a Project Key to create a Jira issue in that project. For example, "TEMP". This field will not be used while updating the Jira issue.
- Provide an Issue Type for which you want to create a Jira Issue. For example, "Story". This field will not be used while updating the Jira issue
- Provide a Summary.
- Provide a Priority. Confirm that this priority value exists in your selected Jira cloud instance. If the priority does not exist, then the Jira issue won't be created and the error will be logged.
- Provide a Description. The value entered here will be interpreted as "text" format by the add-on and the API request will be sent to the Jira cloud to create or update the Jira issue
- Provide a Label in a comma-separated list. This is used to add the labels for the Jira issue that is created or updated.
- Provide the Component as a comma-separated list. This adds the components in the Jira issue that you are creating or updating.
- Specify any 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. - Provide a "Jira Key" if you want to update the Jira issue. For example, "TEMP-123".
- Provide a "Status" value if you want to update the status of the Jira Issue provided in Jira Key above
- Click on 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 throws 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.
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"
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
When an existing Jira issue is updated using the alert action, the values provided by the user in the alert action configuration will replace the existing values in the Jira Issue and will not be appended.
Configure inputs for the Splunk Add-on for Jira Cloud | Use the custom command in Splunk Add-on for Jira Cloud |
This documentation applies to the following versions of Splunk® Supported Add-ons: released
Feedback submitted, thanks!