Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Fnotification-center%2Fuser-scenarios%2Falerts-to-pagerduty.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Fnotification-center%2Fuser-scenarios%2Falerts-to-pagerduty.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# Route p1 alerts to PagerDuty

This example shows how to send P1 alerts to a PagerDuty service using Notification Center.<br /><!-- -->You configure a PagerDuty connector, create a preset, define a router and routing rule, and label alerts for correct delivery.

## Workflow overview[​](#workflow-overview "Direct link to Workflow overview")

1. Create a PagerDuty connector: connects Coralogix to a PagerDuty service
2. Create a preset: defines the PagerDuty event payload
3. Create a router and routing rule: sends only P1 alerts to PagerDuty
4. Label alerts: ensures alerts match the router

## Create a PagerDuty connector[​](#create-a-pagerduty-connector "Direct link to Create a PagerDuty connector")

1. Go to **Integrations**, then **Notification Center**, then **Connectors**.

2. Select **+ New connector**.

3. Choose **PagerDuty** as the destination type.

4. In **Details**, enter a name and optional description.<br /><!-- -->Example: `PagerDuty-Prod`.

5. In **Configuration**:

   * **Service key:** Enter your PagerDuty integration key.
     <br />
     <!-- -->
     See PagerDuty guide for instructions.

6. (Optional) Select **Advanced**, then **Dynamic fields**, define a dynamic service key to route alerts to different PagerDuty services.

   **Example:**

   ```
   {% if alert.highestPriority == "P1" %}

   930aaaaaaaaaaaaaaaaaaaaaaaaaa0d1

   {% elif alert.highestPriority == "P2" %}

   930bbbbbbbbbbbbbbbbbbbbbbbbbb0d1

   {% else %}

   930xxxxxxxxxxxxxxxxxxxxxxxxxx0d1

   {% endif %}
   ```

7. Select **Send test notification**.

8. Select **Create connector**.

## Create a preset (optional)[​](#create-a-preset-optional "Direct link to Create a preset (optional)")

If you do not need a custom message format, skip this section and use the system preset.

1. Go to **Integrations**, then **Notification Center**, then **Presets**.

2. Open the **Alerts** tab and select **PagerDuty**.

3. Select **+ New alert preset**.

4. Customize the **Triggered** template fields:

   | Field              | Example template                                               |
   | ------------------ | -------------------------------------------------------------- |
   | **Summary**        | `{{ alertDef.name }} - Triggered`                              |
   | **Severity**       | `"critical"`                                                   |
   | **Source**         | `{{ _context.system.name }}`                                   |
   | **Timestamp**      | `{{ alert.timestamp }}`                                        |
   | **Custom details** | `{ "description": {{ alertDef.description \| json_encode }} }` |

5. Use the **Preview** panel to review output.

6. (Optional) Use **Send test notification** to validate with your PagerDuty connector.

7. Select **Create preset**.

## Create a router and routing rule[​](#create-a-router-and-routing-rule "Direct link to Create a router and routing rule")

1. Go to **Integrations**, then **Notification Center**, then **Routers**.

2. Select **+ New router**.

3. In **Details**, enter a router name such as `Critical Alerts`.

4. In **Routing labels**, add labels that this router matches:

   ```
   group:sre

   environment:prod
   ```

5. Add a routing rule:

   * **Condition**

     ```
     alert.highestPriority == "P1"
     ```

   * **Destination**

     * Connector: `PagerDuty-Prod`
     * Preset: `PagerDuty Critical Alert`

6. (Optional) In **Fallback**, select a connector to receive unmatched alerts.

7. Select **Create router**.

## Label alerts[​](#label-alerts "Direct link to Label alerts")

1. Go to **Alerts**, then **Create alert**.

2. In **Labels**, add routing labels matching your router:

   ```
   routing.team:sre

   routing.environment:prod
   ```

3. Set the alert **priority** to `P1`.

4. Save the alert.

When triggered, the alert is routed through the **Critical Alerts** router and sent to PagerDuty.

## Example result[​](#example-result "Direct link to Example result")

A triggered alert produces a PagerDuty event like:

**Summary:** `CPU Usage High - Triggered`

**Severity:** `critical`

**Source:** `prod-cluster-01`

**Custom details:** `CPU utilization exceeded 95% on host server-1.`

## Next steps[​](#next-steps "Direct link to Next steps")

Review the permissions required for managing Notification Center in [Permissions](https://coralogix.com/docs/docs/user-guides/notification-center/permissions/.md).
