OpsGenie Integration
Configure OpsGenie integration for runbook actions in Harness AI SRE.
Integrate OpsGenie with AI SRE runbooks to automate alert management and on-call operations during incident response.
Use cases
Use OpsGenie runbook actions to:
Create alerts in OpsGenie
Add notes to existing alerts
Acknowledge alerts programmatically
Close alerts when incidents resolve
Page on-call teams
Update alert priorities
Prerequisites
OpsGenie account with API access
OpsGenie API key
Team and escalation policies configured in OpsGenie
Configure the OpsGenie integration
Set up the connector with these steps:
Go to Project Settings, then Third-Party Integrations for AI SRE.
Select the connector you want to use or create a new one.
Provide your OpsGenie credentials:
API Key: Generate from OpsGenie settings
Region: US or EU
Test the connection.
Save the integration.
Available actions
Create alert
Create a new alert in OpsGenie with message, priority, and responder assignment.
Required fields:
Message: Alert message content
Priority: P1, P2, P3, P4, or P5
Responder Type: team, user, escalation, or schedule
Responder ID: ID of the responder
Should Wait for Result: Whether to wait for alert creation confirmation
Timeout Seconds: Optional timeout for waiting (default 120s, max 600s)
Add responder
Add a responder to an existing OpsGenie alert.
Required fields:
Alert ID: OpsGenie alert identifier
Responder Type: team, user, escalation, or schedule
Responder ID: ID of the responder to add
Close alert
Close an existing OpsGenie alert with optional note and source information.
Required fields:
Alert ID: OpsGenie alert identifier
Alert ID Type: Type of identifier (id or alias)
Note: Optional closing note
Source: Optional source of the closure
User: Optional user closing the alert
Use OpsGenie actions in runbooks
OpsGenie actions are configured through the runbook action form in the UI:
In your runbook, click New Step, then Action.
In the Select Action dialog, go to the On-Call category.
Select OpsGenie from the available actions.
Choose the action type (Create OpsGenie Alert, Add Responder to OpsGenie Alert, or Close OpsGenie Alert).
Fill in the form fields using the Data Picker to insert dynamic values like
incident.severity,incident.title, etc.
Available Mustache variables
Use these variables to map AI SRE incident data to OpsGenie fields:
{{Activity.title}}
Incident title
API Gateway Outage
{{Activity.summary}}
Incident summary
Payment API returning 500 errors
{{Activity.severity}}
Incident severity
0, 1, 2, 3, 4
{{Activity.status}}
Incident status
Detected, Investigating, Resolved
{{Activity.service}}
Affected service name
payment-service
{{Activity.environment}}
Environment
production, staging
{{Activity.owner}}
Incident owner email
jane.doe@company.com
{{Activity.created_at}}
Incident creation timestamp
2026-05-06T20:30:00Z
{{Activity.resolved_at}}
Incident resolution timestamp
2026-05-06T21:15:00Z
{{Activity.url}}
Incident URL in AI SRE
https://app.harness.io/...
{{Activity.short_id}}
Human-readable ID
INC-123
Example runbook actions
Create OpsGenie alert
Use case: Create an OpsGenie alert when a critical incident is detected in AI SRE.
Runbook configuration:
In the runbook editor, add a Create Alert action from OpsGenie.
Configure the form fields:
Message:
SEV{{Activity.severity}} Incident: {{Activity.title}}Description:
Priority:
P1for SEV0,P2for SEV1,P3for SEV2+Tags:
incident-{{Activity.short_id}}, service-{{Activity.service}}, env-{{Activity.environment}}Responders: Select team (e.g.,
platform-team)
Result: OpsGenie alert created with title SEV0 Incident: API Gateway Outage, P1 priority, assigned to platform-team.
Add responder to alert
Use case: Add additional responders to an escalating OpsGenie alert.
Runbook configuration:
In the runbook editor, add an Add Responder to OpsGenie Alert action.
Configure the form fields:
Alert ID: Enter OpsGenie alert ID
Responder Type:
teamResponder ID: Enter team ID or name
Result: Responder added to OpsGenie alert with notification sent.
Close alert on resolution
Use case: Automatically close OpsGenie alert when AI SRE incident is resolved.
Runbook configuration:
In the runbook editor, add a Close Alert action from OpsGenie.
Configure the form fields:
Alert ID: Enter OpsGenie alert ID
Note:
Result: OpsGenie alert closed with resolution note from AI SRE.
Map priorities
Map AI SRE incident severity to OpsGenie priorities:
SEV0
P1
Critical system-wide outages
SEV1
P2
Major incidents with significant impact
SEV2
P3
Moderate issues requiring attention
SEV3
P4
Minor issues with workarounds
SEV4
P5
Cosmetic or low-priority issues
Security best practices
Follow these practices to secure the OpsGenie integration:
Use API keys with minimum required permissions
Rotate API keys regularly
Limit integration access to specific teams
Audit integration usage
Use IP allowlisting when available
Next steps
Configure Runbook Actions: Add OpsGenie actions to runbooks.
Runbook Best Practices: Review automation patterns.
Last updated
Was this helpful?