Edge Delta Jira Output

Trigger data to a Jira webhook.

Overview

This output type sends notifications and alerts to Jira’s REST API using a webhook. This integration can be used to create issues in Jira.

Process

  1. Obtain an API token using an authorized Jira account. See these instructions on the Atlassian website.
  2. Generate the API call’s Basic Auth header value using the token and the authorized account’s email address:
echo -n user@example.com:api_token_string | base64
  1. Copy the value that is returned.

  2. Create the integration configuration in the agent YAML. The following example calls the endpoint that creates issues and populates the issue with variable values. See the Jira API documentation for other endpoints:

      - name: jira-integration
        type: jira
        endpoint: "https://<jira site>/rest/api/2/issue"  
        custom_headers:
          Content-Type: "application/json"
          Authorization: "Basic <Authorization value from step 3>" 
        notify_content: 
          advanced_content: |
            {
                "fields": {
                    "project": {
                        "key": "<project key>"
                    },
                    "summary": "{{.Tag}}: {{.ThresholdDescription}}",
                    "description": "{{.CurrentValue}} exceeds {{.ThresholdValue}}",
                    "issuetype": {
                        "name": "<issue type e.g. Bug>"
                    }
                }
            }            

Note: The project key is in brackets after the project name in Jira. The issue type must match an issue that is allowed on the type of board. For example, on a Kanban project, only Epic and Task are allowed.

Parameters

name

Required

Enter a descriptive name for the output or integration.

For outputs, this name will be used to map this destination to a workflow.

name : jira-output

integration_name

Optional

This parameter refers to the organization-level integration created in the Integrations page.

If you need to add multiple instances of the same integration into the config, then you can add a custom name to each instance via the name parameter. In this situation, the name should be used to refer to the specific instance of the destination in the workflows.

integration_name: ed-alert-jira

type: jira

Required

Enter jira.

type: jira

endpoint

Required

Enter the Jira webhook URL.

endpoint: "https://<jira site>/rest/api/2/issue" 

custom_headers and custom_fields

Required

This parameter is used to customize the notification content. Include the content type and authorization.

If you do not want to use default fields in a notification, then you can create custom headers and fields.

notify_content: advanced_content

Required

A payload is JSON object that is used to define metadata for agent based alerts. See the trigger values page for templating the message.

notify_content: 
          advanced_content: |
            {
                "fields": {
                    "project": {
                        "key": "<project key>"
                    },
                    "summary": "{{.Tag}}: {{.ThresholdDescription}}",
                    "description": "{{.CurrentValue}} exceeds {{.ThresholdValue}}",
                    "issuetype": {
                        "name": "<issue type e.g. Bug>"
                    }
                }
            }