> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/ai-dlc-insights/use-ai-dlc-insights/setup/integrations/pagerduty/index.md).

# PagerDuty Integration

Set up the PagerDuty integration to ingest incident data into AI DLC Insights and surface Mean Time to Restore.

{% hint style="info" %}
This feature is in Beta[^1] and requires enablement. [View all early access features.](/release-notes/features.md)

{% @harness-feature-flag-access/request-feature-flag-access module="ai-dlc-insights" pagePath="ai-dlc-insights/use-ai-dlc-insights/setup/integrations/pagerduty/index" featureFlags="%5B%7B%22name%22%3A%22Enable%20the%20PagerDuty%20Integration%20in%20AI%20DLC%20Insights%22%2C%22key%22%3A%22SEI\_ENABLE\_PAGERDUTY%22%2C%22status%22%3A%22BETA%22%2C%22description%22%3A%22Enables%20teams%20to%20use%20PagerDuty%20incident%20data%20as%20the%20source%20for%20MTTR%20on%20the%20Efficiency%20Insights%20dashboard.%22%7D%2C%7B%22name%22%3A%22Enable%20PagerDuty%20as%20the%20MTTR%20data%20source%22%2C%22key%22%3A%22SEI\_MTTR\_PAGERDUTY\_ENABLED%22%2C%22status%22%3A%22BETA%22%2C%22description%22%3A%22Enables%20the%20Mean%20Time%20to%20Restore%20widget%20on%20the%20Efficiency%20Insights%20dashboard%20to%20calculate%20recovery%20time%20from%20ingested%20PagerDuty%20incident%20data.%22%7D%5D" %}
{% endhint %}

PagerDuty is a SaaS incident response platform for IT teams. The PagerDuty integration enables AI DLC Insights to ingest incident data from any cloud-based PagerDuty account or plan. AI DLC Insights uses this data to surface **Mean Time to Restore (MTTR)** on the [Efficiency Insights dashboard](/ai-dlc-insights/use-ai-dlc-insights/view-insights/efficiency.md).

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

Before you configure the PagerDuty integration, ensure you have the following:

* A cloud-based PagerDuty account
* A read-only PagerDuty API key. To create one, go to [API access keys](https://support.pagerduty.com/docs/api-access-keys) in the PagerDuty documentation.

{% hint style="info" %}
**HARNESS IP ADDRESSES**

If your PagerDuty account uses IP allowlisting, add the required Harness IP addresses to the allowlist. If the necessary IPs are not allowlisted, the integration may fail to authenticate or sync data.

Go to [Harness Platform IPs](/harness-platform/use-harness-platform/references/allowlist-harness-domains-and-ips.md) to identify the addresses to add to your firewall.
{% endhint %}

### Setup <a href="#setup" id="setup"></a>

To configure the PagerDuty integration:

1. From the left-hand navigation pane, click **Integrations**.
2. Navigate to the **Available Integrations** tab.
3. Locate the **PagerDuty** tile and click **Add Integration**.
4. On the **Integration Details** step, enter a name for the integration in the **Overview** section. Optionally, add tags. Click **Continue**.
5. On the **Configure Authentication** step, enter your PagerDuty account URL and API key:
   * **PagerDuty URL**: Enter `https://api.pagerduty.com`, unless your use case requires a different URL.
   * **API Key**: Enter your read-only PagerDuty API key.
6. Click **Validate & Continue**.
7. On the **Validate Connection** step, confirm that the connection succeeds, then click **Create Integration**.

Once the integration is configured, Harness AIDI begins ingesting incident data from PagerDuty.

### Data ingestion <a href="#data-ingestion" id="data-ingestion"></a>

AI DLC Insights ingests all incident-related data from your PagerDuty account.

#### Ingestion frequency <a href="#ingestion-frequency" id="ingestion-frequency"></a>

PagerDuty data is ingested every **60 minutes** by default. Each ingestion run retrieves incidents created or updated since the previous successful run, so MTTR reflects incident activity from the last completed ingestion cycle.

To review ingestion history, go to the **Monitoring** tab of the integration. Go to [Integration monitoring](#integration-monitoring) for details.

#### Field coverage <a href="#field-coverage" id="field-coverage"></a>

AI DLC Insights ingests **all fields available in PagerDuty**, including both standard and custom fields. You do not need to select or map individual fields.

Commonly used fields include the following:

| Field                 | Description                                                      |
| --------------------- | ---------------------------------------------------------------- |
| **PD Service**        | The PagerDuty service the incident was triggered against.        |
| **Incident Priority** | The priority assigned to the incident (for example, `P1`, `P2`). |
| **Incident Urgency**  | The urgency of the incident (`high` or `low`).                   |
| **Alert Severity**    | The severity of the alert that triggered the incident.           |
| **User ID**           | The PagerDuty user associated with the incident.                 |
| **Escalation Policy** | The escalation policy that routed the incident.                  |
| **Custom fields**     | Any custom fields defined in your PagerDuty account.             |

Every ingested field, standard or custom, is available as a filter in [Team Definitions](/ai-dlc-insights/use-ai-dlc-insights/setup/teams.md#configure-team-tool-settings). This lets each team define how it identifies the incidents that belong to it, rather than relying on a single account-wide definition.

{% hint style="info" %}
Correct incident identification in Team Definitions ensures AI DLC Insights accurately calculates **MTTR**.
{% endhint %}

### Build custom dashboards in Studio <a href="#build-custom-dashboards-in-studio" id="build-custom-dashboards-in-studio"></a>

Beyond the out-of-the-box MTTR widget on the Efficiency Insights dashboard, you can use ingested PagerDuty data to build custom dashboards in [Studio](/ai-dlc-insights/use-ai-dlc-insights/studio.md).

Because AI DLC Insights ingests all PagerDuty fields, you can query standard and custom fields to create views such as incident volume by service, responder load across escalation policies, or recovery time segmented by priority. Studio dashboards support team-scoped filters and query-level variables, so a single PagerDuty dashboard can adapt to each team's incident definition.

### Integration monitoring <a href="#integration-monitoring" id="integration-monitoring"></a>

To monitor the status of the PagerDuty integration, navigate to the **Monitoring** tab. This page displays ingestion logs that provide visibility into data synchronization.

Click the **Filters** icon to filter logs by **Status** (`Success`, `Failed`, `Pending`, or `Scheduled`).

Each ingestion log includes the following fields:

| Field                      | Description                                                                                    |
| -------------------------- | ---------------------------------------------------------------------------------------------- |
| **Scan Range Time**        | The time window of data retrieved from PagerDuty during the ingestion task.                    |
| **Data Retrieval Process** | The ingestion job responsible for fetching data from PagerDuty.                                |
| **Task Start Time**        | The timestamp when the ingestion task began running.                                           |
| **Status**                 | The current state of the ingestion task (for example, Success, Failed, Pending, or Scheduled). |
| **Time to Complete**       | The total duration required for the ingestion task to complete.                                |
| **Retries**                | The number of times the ingestion task was retried after a failure.                            |

{% @harness-feedback/feedback %}

[^1]: Beta features are feature-complete but still being validated. Available on request.
