Skip to content
Last9 named a Gartner Cool Vendor in AI for SRE Observability for 2025! Read more →
Last9

Create Jira Issues from Alerts

Setup Jira integration to automatically create issues from Last9 alerts.

Getting started

Last9 can automatically create Jira issues when alerts are triggered. This document provides step-by-step instructions on how to set up Jira integration with Last9.

Prerequisites

  • A Jira Cloud or Jira Data Center instance
  • API token or credentials with permission to create issues
  • Project key where issues should be created

Setting up Jira API Access

For Jira Cloud:

  1. Log in to your Atlassian account at id.atlassian.com

  2. Go to Security > API tokens

  3. Click Create API token

  4. Give it a descriptive label (e.g., “Last9 Integration”)

  5. Copy the generated token

  6. Your webhook URL will be:

    https://your-domain.atlassian.net/rest/api/3/issue
  7. For authentication, you’ll need to base64 encode email:api_token:

    echo -n "your-email@example.com:your-api-token" | base64

For Jira Data Center:

  1. Generate a Personal Access Token (PAT) from your Jira profile

  2. Your webhook URL will be:

    https://your-jira-server.com/rest/api/2/issue

Setting up a notification channel in Last9

  1. In Notification Channels, click Add to create a new channel

    Notification channels list

  2. Provide the following details:

    • Channel Name: A descriptive name to easily identify the channel (e.g., “Jira Production Alerts”)

    • Channel: Select Webhook from the dropdown

    • Webhook URL: Enter your Jira API endpoint:

      https://your-domain.atlassian.net/rest/api/3/issue
    • Headers: Add the following headers:

      KeyValueRequired
      AuthorizationBasic <base64-encoded-credentials>Yes
      Content-Typeapplication/jsonYes
      JIRA_PROJECT_NAME_KEYYour project key (e.g., ALERTS)Yes
      JIRA_PRIORITY_ENABLEDtrue to enable priority mappingOptional
      JIRA_PROJECT_RESOLUTION_STATUS_KEYTransition ID for resolved statusOptional
    • Send Resolved: Enable if you want resolution comments added to issues

    Add webhook channel

  3. Click Save to enable the channel

The JIRA_PROJECT_NAME_KEY header is required. Without it, Last9 cannot create issues in your Jira project.

Assigning a notification channel to an alert group

  1. Navigate to your Alert Group in Alert Studio

  2. Click on the notification channel icon to configure notifications

  3. Select your Jira channel from the dropdown

Jira Issue Format

Last9 creates Jira issues with the following structure:

FieldDescription
ProjectSet via JIRA_PROJECT_NAME_KEY header
SummaryAlert summary (max 255 characters)
Issue TypeTask
DescriptionADF-formatted description with full alert details
Labelslast9-automated-alert + deduplication key
PriorityMapped from severity (if JIRA_PRIORITY_ENABLED is true)

Priority Mapping

When JIRA_PRIORITY_ENABLED is set to true:

Last9 SeverityJira Priority
BreachHighest
ThreatHigh

Issue Description

The issue description is formatted using Atlassian Document Format (ADF) and includes:

  • Main Information: Top-level alert fields (summary, severity, timestamp)
  • Custom Details: All custom details as labeled fields
  • URLs: Clickable links to the Last9 dashboard
  • Raw Data: Full JSON payload in a code block for debugging

Labels

Each issue is automatically labeled with:

  • last9-automated-alert - For easy filtering
  • Deduplication key - For tracking related alerts

Deduplication

Last9 only creates Jira issues for first-time alerts. Repeated triggers of the same alert will not create duplicate issues. This is controlled by checking the repeat count - if an alert has been triggered more than once, a new issue is not created.

Resolution Handling

When Send Resolved is enabled:

  1. Last9 finds the existing Jira issue using the deduplication key label
  2. Adds a resolution comment with the timestamp
  3. Optionally transitions the issue to a resolved status (if JIRA_PROJECT_RESOLUTION_STATUS_KEY is configured)

Configuration Examples

Basic Configuration (Issues Only)

Headers:
Authorization: Basic dXNlckBleGFtcGxlLmNvbTpteS1hcGktdG9rZW4=
Content-Type: application/json
JIRA_PROJECT_NAME_KEY: ALERTS

With Priority Mapping

Headers:
Authorization: Basic dXNlckBleGFtcGxlLmNvbTpteS1hcGktdG9rZW4=
Content-Type: application/json
JIRA_PROJECT_NAME_KEY: ALERTS
JIRA_PRIORITY_ENABLED: true

With Auto-Resolution

Headers:
Authorization: Basic dXNlckBleGFtcGxlLmNvbTpteS1hcGktdG9rZW4=
Content-Type: application/json
JIRA_PROJECT_NAME_KEY: ALERTS
JIRA_PRIORITY_ENABLED: true
JIRA_PROJECT_RESOLUTION_STATUS_KEY: 31

Using Terraform

You can also create the Jira notification channel using the Last9 Terraform Provider:

resource "last9_notification_channel" "jira" {
name = "jira-production-alerts"
type = "webhook"
destination = "https://your-domain.atlassian.net/rest/api/3/issue"
send_resolved = true
headers = {
Authorization = "Basic <base64-encoded-credentials>"
Content-Type = "application/json"
JIRA_PROJECT_NAME_KEY = "ALERTS"
JIRA_PRIORITY_ENABLED = "true"
}
}

Troubleshooting

Issues not being created

  1. Verify the webhook URL is correct and contains atlassian.net (Cloud) or your Jira server URL
  2. Check that the API token/credentials are valid
  3. Ensure the JIRA_PROJECT_NAME_KEY header is set correctly
  4. Verify the project exists and your credentials have permission to create issues
  5. Check Jira’s issue type settings - “Task” must be available in the project

Authentication errors (401)

  1. Verify your API token hasn’t expired
  2. Check that the base64-encoded credentials are correct
  3. Ensure you’re using the correct format: email:api_token for Cloud

Project not found errors

  1. Verify the project key is correct (case-sensitive)
  2. Ensure your credentials have access to the project

Issues not being resolved

  1. Ensure Send Resolved is enabled
  2. Check that the original issue still exists and has the correct label
  3. Verify the JIRA_PROJECT_RESOLUTION_STATUS_KEY transition ID is valid

Alternative header name

Last9 also accepts project_key (lowercase) as an alternative to JIRA_PROJECT_NAME_KEY.

Please get in touch with us on Discord or Email if you have any questions.