PagerDuty Integration
Configure PagerDuty integration for runbook actions in Harness AI SRE.
Integrate PagerDuty with AI SRE runbooks to automate incident management and on-call operations during incident response.
Use cases
Use PagerDuty runbook actions to:
Create incidents in PagerDuty
Add notes to existing incidents
Trigger escalations
Resolve incidents programmatically
Update incident urgency
Manage on-call schedules
Prerequisites
PagerDuty account with API access
PagerDuty API key or OAuth token
Services and escalation policies configured in PagerDuty
Configure the PagerDuty 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 PagerDuty credentials:
API Key: Generate from PagerDuty API Access Keys
Subdomain: Your PagerDuty subdomain
Test the connection.
Save the integration.
Available actions
Create incident
Create a new incident in PagerDuty with specified details and optionally assign responders.
Required fields:
From: Email address of user creating the incident
Title: Incident title
Summary: Incident description/summary
URL: Incident URL or reference
Service ID: PagerDuty service identifier
Responder ID: Optional responder to assign (user or escalation policy)
Add responder
Add a responder to an existing PagerDuty incident.
Required fields:
From: Email address of user adding the responder
Incident ID: PagerDuty incident identifier
Responder ID: User or escalation policy ID to add
Requester ID: User requesting the responder addition
Message: Optional message to include with the request
Resolve incident
Resolve an existing PagerDuty incident.
Required fields:
From: Email address of user resolving the incident
Incident ID: PagerDuty incident identifier
Resolution: Optional resolution description
Use PagerDuty actions in runbooks
PagerDuty 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 PagerDuty from the available actions.
Choose the action type (Create PagerDuty Incident, Add Responder to PagerDuty Incident, or Resolve PagerDuty Incident).
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 PagerDuty 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
{{Activity.id}}
Unique incident identifier
abc123...
Example runbook actions
Create PagerDuty incident
Use case: Create a PagerDuty incident when a critical incident is detected in AI SRE.
Runbook configuration:
In the runbook editor, add a Create Incident action from PagerDuty.
Configure the form fields:
Service: Select your PagerDuty service ID (e.g.,
P1234AB)Title:
SEV{{Activity.severity}}: {{Activity.title}}Body:
Urgency:
highfor SEV0/SEV1,lowfor SEV2+Incident Key:
ai-sre-{{Activity.id}}
Result: PagerDuty incident created with title SEV0: API Gateway Outage, high urgency, linked to AI SRE incident.
Add responder to incident
Use case: Add additional responders to an escalating PagerDuty incident.
Runbook configuration:
In the runbook editor, add an Add Responder to PagerDuty Incident action.
Configure the form fields:
From:
{{Activity.owner}}Incident ID: Enter PagerDuty incident ID
Responder ID: Enter user or escalation policy ID
Requester ID:
{{Activity.owner}}Message:
Additional responder needed for SEV{{Activity.severity}} incident
Result: Responder added to PagerDuty incident with notification.
Resolve on incident closure
Use case: Automatically resolve PagerDuty incident when AI SRE incident is resolved.
Runbook configuration:
In the runbook editor, add a Resolve Incident action from PagerDuty.
Configure the form fields:
Incident ID: Enter PagerDuty incident ID
Resolution Note:
Result: PagerDuty incident resolved with resolution note from AI SRE.
Create incident with responder
Use case: Create a PagerDuty incident and immediately assign it to a specific responder.
Runbook configuration:
In the runbook editor, add a Create PagerDuty Incident action.
Configure the form fields:
From:
{{Activity.owner}}Title:
SEV{{Activity.severity}}: {{Activity.title}}Summary:
{{Activity.summary}}URL:
{{Activity.url}}Service ID: Enter your PagerDuty service ID
Responder ID: Enter escalation policy or user ID to assign
Result: PagerDuty incident created and assigned to the specified responder.
Map urgency
Map AI SRE incident severity to PagerDuty urgency:
SEV0
high
Immediate phone call and SMS
SEV1
high
Immediate phone call and SMS
SEV2
low
Push notification and email
SEV3
low
Email only
SEV4
low
Email only
Integration best practices
Incident key for deduplication
Use consistent incident keys to prevent duplicate PagerDuty incidents:
This ensures:
Multiple runbook runs do not create duplicate PagerDuty incidents
Updates are properly correlated to the same incident
Incident resolution is correctly tracked
Map services
Map AI SRE services to PagerDuty services:
Security best practices
Follow these practices to secure the PagerDuty integration:
Use API keys with minimum required permissions
Rotate API keys regularly
Limit integration access to specific services
Use IP allowlisting when available
Audit integration usage
Enable two-factor authentication on PagerDuty accounts
Next steps
Configure Runbook Actions: Add PagerDuty actions to runbooks.
Runbook Best Practices: Review automation patterns.
Last updated
Was this helpful?