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

# PagerDuty

> Trigger, update, and resolve a PagerDuty incident from Observer.

Observer integrates with PagerDuty through the Events API V2. One Observer
incident maps to one PagerDuty incident across its whole lifecycle. Agent,
metric, and SLO alerts also open and resolve their own on-call incident.

## Set up

<Steps>
  <Step title="Create an Events API V2 integration">
    In PagerDuty, open the service that should receive alerts, go to
    **Integrations**, and add an **Events API V2** integration. Copy the
    **Integration Key** (also called the routing key).
  </Step>

  <Step title="Add the integration in Observer">
    In the console, open **Alerts**, choose **Add alert**, pick
    **PagerDuty**, and paste it into **Integration (routing) key**. Choose org-wide or a single page,
    then save.
  </Step>

  <Step title="Test it">
    Use **Send test** from the row's actions menu. A test trigger should open an incident on the
    PagerDuty service. Resolve it in PagerDuty when you are done.
  </Step>
</Steps>

## Lifecycle mapping

| Observer event | PagerDuty action |
| - | - |
| Incident published | `trigger` |
| Incident update posted | `trigger` (updates the open incident) |
| Incident resolved | `resolve` |

Every action carries a dedup key derived from the Observer incident id
(`observer-incident-<id>`). PagerDuty uses that key to attach updates to the
existing incident and to resolve the right one, so a published, updated, and
resolved sequence produces one PagerDuty incident, not three.

<Info>
  **Severity mapping**

  Observer severities map to PagerDuty severities: critical to `critical`, major
  to `error`, minor to `warning`. Scheduled maintenance does not page.
</Info>

## Troubleshooting

* **No incident appears**: confirm the Integration Key is from an Events API V2
  integration (not a different integration type), and that the integration is
  enabled in Observer.
* **A bad key**: PagerDuty returns a 4xx, which Observer treats as a
  configuration error and does not retry. Fix the key and test again.


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