> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usekestrel.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# PagerDuty

> Route Kestrel incidents to PagerDuty with full root cause analysis, severity mapping, and service routing

The PagerDuty integration connects Kestrel's automated incident detection to your existing on-call workflows. When Kestrel detects a Kubernetes or cloud incident, it creates a PagerDuty incident with full root cause analysis, affected resources, and AI-generated remediation steps.

## Prerequisites

* **Organization Admin** role in Kestrel
* PagerDuty account with admin access

## Setup

Kestrel supports two connection methods:

### Method 1: API Token (Recommended)

Enables full service management, namespace routing, and cloud resource routing.

**1. Create a PagerDuty API token**

In PagerDuty: **User Icon → My Profile → User Settings → Create API User Token**. Copy the token.

**2. Connect in Kestrel**

1. Navigate to **Integrations → PagerDuty** in your Kestrel dashboard
2. Ensure **Use API Token** is checked
3. Paste the API token

**3. Set up the webhook for bidirectional sync**

1. Copy the **Webhook URL** shown in the setup dialog
2. In PagerDuty, go to **Integrations → Generic Webhooks (V3)** and create a subscription using the URL
3. Copy the **Signing Secret** from the webhook configuration
4. Paste the signing secret in Kestrel

**4. Sync services**

Click **Connect PagerDuty**, then click **Sync Services** to import your PagerDuty services.

### Method 2: Routing Key (Legacy)

For simple setups that route alerts to a single service:

1. Uncheck **Use API Token**
2. In PagerDuty, add an **Events API v2** integration to your service
3. Copy the **Integration Key** (routing key)
4. Paste it in the **Integration/Routing Key** field
5. Enter a **Service Name** and click **Connect PagerDuty**

## How It's Used

### In Workflows

**Trigger blocks:**

* **Incident Triggered** — fires when a new PagerDuty incident is created
* **Incident Acknowledged** — fires when a PagerDuty incident is acknowledged by a responder
* **Incident Resolved** — fires when a PagerDuty incident is resolved
* **Any PagerDuty Incident** — fires on any PagerDuty incident state change
* **High Urgency Incident** — fires when a high-urgency PagerDuty incident is triggered

**Action blocks:**

* **Create Alert** — create a new PagerDuty alert on a specified service
* **Acknowledge Alert** — acknowledge an existing PagerDuty alert
* **Add Note to Alert** — attach a note with investigation context to a PagerDuty alert
* **Resolve Alert** — resolve a PagerDuty alert
* **Escalate** — escalate a PagerDuty incident to the next escalation level

Example: A workflow triggers on a high-urgency incident, runs an automated root cause analysis, adds the findings as a note, and escalates if the issue matches a known critical pattern.

### In Incident Response

* **Automatic alerting** — when Kestrel detects an incident, a PagerDuty incident is created with full RCA context
* **Auto-resolution** — when incidents resolve in Kestrel, PagerDuty incidents are automatically resolved
* **Bidirectional sync** — PagerDuty incidents are updated as Kestrel's investigation progresses
* **Service routing** — route alerts to specific PagerDuty services based on namespace or cloud resource
* **Severity mapping** — map Kestrel severity levels (Low, Medium, High, Critical) to PagerDuty severity levels

### In Cloud AI Copilot

* Query PagerDuty incident status from the chat: `What PagerDuty incidents are open for the payments service?`
* Trigger PagerDuty incidents from the copilot for manual escalation

## Configuration

### Namespace Routing

Route Kubernetes incidents to specific PagerDuty services based on affected namespace:

1. Go to the **Namespaces** tab
2. Click **Add Assignment** → select a **Cluster**, **Namespace**, and target **PagerDuty Service**

### Cloud Resource Routing

Route cloud incidents to specific PagerDuty services:

1. Go to the **Cloud Resources** tab
2. Click **Add Assignment** → select a **Cloud Resource** and target **PagerDuty Service**

### Notification Settings

Configure which incidents trigger PagerDuty alerts in the **Overview** tab:

* **Notify on Kubernetes incidents** — enable/disable K8s alerts
* **Notify on Cloud incidents** — enable/disable AWS/OCI alerts
* **Skip transient incidents** — filter out auto-resolving incidents
* **Minimum severity** — set the threshold (Low, Medium, High, Critical)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.