Skip to main content
Sumo Logic

Webhook Connection for Jira Cloud

You can send JSON payloads from Sumo Logic alerts as an HTTP POST request to create Jira issues in Jira Cloud. Learn more about the Jira REST API in their Jira Cloud platform Developer Reference.

Webhook connections rely on HTTP endpoints that tell Sumo Logic where to send data. You can set up any number of connections.

Prerequisite

To send webhook alerts to Jira Cloud you need to include a Basic Authentication Header with requests. This requires an API token, for reference on creating a token see API tokens in Atlassian Cloud Support.

  1. Generate an API token using your Atlassian Account: https://id.atlassian.com/manage/api-tokens.
  2. Using the email address of your Atlassian account and an API token you can generate the Basic Authentication Header. In the following cURL command replace <me@example.com> with your email address and <my-api-token> with your API token and run it:

    curl -v https://mysite.atlassian.net --user <me@example.com>:<my-api-token>
     
  3. Your response should look like the following image. You'll need the Authorization value when configuring the connection in Sumo Logic.
    Atlassian Basic Authentication.png

Configuration in Sumo Logic

In Sumo Logic, scheduled searches send alerts to other tools via webhook connections. To send alerts from Sumo Logic to Jira Cloud:

  1. Create a Webhook Connection.
  2. Use the Webhook Connection as the Alert Type in a scheduled search.

Create a Webhook Connection

  1. Go to Manage Data > Settings > Connections.
  2. On the Connections page click the + icon at the top-right of the table.
  3. Select the Jira option.
    Jira webhook button.png
  4. In the Create Jira Connection dialog:
    1. Enter a Name for the Connection.
    2. (Optional) Enter a Description for the Connection.
    3. Enter a URL from the Jira REST API to create issues. For example, to create an issue:

          https://<cloud_jira_instance>/rest/api/2/issue
    4. Enter your Authorization Header from the prerequisite. It should be in the format:

        Basic <random string>
       
    5. (Optional) Custom Headers, enter up to five comma separated key-value pairs.
    6. The following input fields are automatically updated in the JSON Payload and vice versa. Update them to meet your requirements.
      • Issue Type
      • Project Key
      • Issue Summary
      • Priority
      • Issue Description
    7. The following JSON is an example of the default Payload, you can customize it as needed. For details on the variables you can use as parameters within your JSON object, see Webhook Payload Variables.

      {
        "fields": {
          "issuetype": {
            "name": "Bug"
          },
          "project": {
            "key": "Sumo_Logic
          },
          "summary": "{{SearchName}}",
          "priority": {
            "id": "3"
          },
          "description": "{{SearchQueryUrl}}"
        }
      }


      Details on how to format your payload are available in the Jira Cloud platform Developer Reference.
       
    8. Click Save.

Scheduled searches are saved searches that run automatically at specified intervals. When a scheduled search is configured to send an alert, it can be sent to another tool using a webhook connection.

To set up a scheduled search for a webhook connection follow the steps in the Schedule Searches for Webhook Connections document.