Skip to main content

Jira

InfraSage automatically creates Jira tickets when anomalies are detected, tracks their status, and transitions them as incidents progress through resolution.


Configuration

JIRA_API_TOKEN=your-jira-api-token
JIRA_DOMAIN=mycompany.atlassian.net
JIRA_USERNAME=ops@mycompany.com
JIRA_PROJECT_KEY=OPS

Generate a Jira API token at id.atlassian.com/manage-profile/security/api-tokens.


Automatic Ticket Creation

When InfraSage declares a high-severity anomaly, it creates a Jira issue:

FieldValue
ProjectConfigured JIRA_PROJECT_KEY
Issue typeBug (configurable)
Summary[InfraSage] CPU anomaly on payment-api — score 0.93
PriorityMapped from anomaly score (see table below)
DescriptionFull RCA summary, blast radius, suggested actions, confidence score, link to InfraSage
Labelsinfrasage, auto-generated, <service-id>
Custom fieldsanomaly_id, service_id, root_cause_category

Priority mapping

Anomaly ScoreJira Priority
0.4–0.6Medium
0.6–0.8High
0.8–1.0Critical

Status Transitions

InfraSage automatically transitions Jira issues as incidents progress:

TriggerJira Transition
Anomaly detectedCreate issue (status: Open)
Runbook startedTransition to In Progress
Runbook completedAdd comment with execution result
Anomaly resolvedTransition to Resolved
Human resolves in PagerDutyTransition to Done + add resolution note

Configure your Jira transition IDs:

JIRA_TRANSITION_IN_PROGRESS=21
JIRA_TRANSITION_RESOLVED=31
JIRA_TRANSITION_DONE=41

Find transition IDs:

curl -u "$JIRA_USERNAME:$JIRA_API_TOKEN" \
"https://$JIRA_DOMAIN/rest/api/3/issue/OPS-123/transitions" | jq '.transitions[] | {id, name}'

Custom Fields

Map InfraSage fields to custom Jira fields:

JIRA_CUSTOM_FIELDS='{
"customfield_10001": "anomaly_id",
"customfield_10002": "service_id",
"customfield_10003": "root_cause_confidence"
}'

Linking to Existing Issues

If your team already tracks services in Jira, configure InfraSage to link new anomaly issues to a parent epic:

JIRA_PARENT_EPIC_KEY=OPS-100 # Existing epic for infrastructure incidents

Verification

After an anomaly is detected:

# Check Jira for recently created issues
curl -u "$JIRA_USERNAME:$JIRA_API_TOKEN" \
"https://$JIRA_DOMAIN/rest/api/3/search?jql=project=$JIRA_PROJECT_KEY+AND+labels=infrasage+ORDER+BY+created+DESC&maxResults=5" | \
jq '.issues[] | {key, summary: .fields.summary, status: .fields.status.name}'