Webhook Example for PagerDuty
Webhooks allow users to send alert notifications to various applications using a customized webhook channel. This page provides an example for setting up webhooks for PagerDuty.
|
|
This page refers to third-party instructions, which could be subject to change. Refer to the PagerDuty documentation for the most up-to-date information. |
PagerDuty Setup:
-
In PagerDuty, navigate to Services > Service Directory and click on the +New Service button
-
Enter in a Name and a meaningful description. Click Next.

-
On the next screen, select an existing escalation policy, or generate a new one. Click Next.

-
Select AIOps features as desired. Click Next.

-
Select the Integration(s) you wish to use to feed alerts to PagerDuty. For DII, use the Events API V2 Integration.

On the Integration configuration screen, make note of the Integration Key. You will need this key when you create the Data Infrastructure Insights webhook below.
+

Create Data Infrastructure Insights Webhook:
-
In Data Infrastructure Insights, navigate to Admin > Notifications and select the Webhooks tab. Click +Webhook to create a new webhook.
-
Give the webhook a meaningful Name, such as "PagerDuty Trigger". You will use this webhook for critical- and warning-level events.
-
In the Template Type drop-down, select PagerDuty.
-
Create a custom parameter secret named routingKey and set the value to the PagerDuty Integration Key value from above.

Repeat these steps to create a "PagerDuty Resolve" webhook for resolved events.
PagerDuty to Data Infrastructure Insights Field Mapping
The following table and image show the mapping of fields between PagerDuty and Data Infrastructure Insights:
| PagerDuty | Data Infrastructure Insights |
|---|---|
Alert Key |
Alert ID |
Source |
Triggered On |
Component |
Metric Name |
Group |
Object Type |
Class |
Monitor Name |

Notifications via Webhook
To notify on events via webhook, in Data Infrastructure Insights navigate to Alerts > Monitors and click +Monitor to create a new monitor.
-
Select a metric and define the monitor's conditions.
-
Under _Set up team notification(s), choose the Webhook Delivery Method.
-
Choose the "PagerDuty Trigger" webhook for Critical- and Warning-level events.
-
Choose the "PagerDuty Resolve" for resolved events.

|
|
Setting separate notifications for trigger events versus resolved events is a best practice, since PagerDuty handles trigger events differently than resolved events. |