Skip to main content
Data Infrastructure Insights

Webhook Example for PagerDuty

Contributors netapp-alavoie

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.

Note 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:

  1. In PagerDuty, navigate to Services > Service Directory and click on the +New Service button​

  2. Enter in a Name and a meaningful description. Click Next.

    PagerDuty screen

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

    Assigning an Escalation Policy

  4. Select AIOps features as desired. Click Next.

    aiops service selection screen

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

    PagerDuty integrations selection screen

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.

+
Copying the Integration Key

Create Data Infrastructure Insights Webhook:

  1. In Data Infrastructure Insights, navigate to Admin > Notifications and select the Webhooks tab. Click +Webhook to create a new webhook.

  2. Give the webhook a meaningful Name, such as "PagerDuty Trigger". You will use this webhook for critical- and warning-level events.

  3. In the Template Type drop-down, select PagerDuty.

  4. Create a custom parameter secret named routingKey and set the value to the PagerDuty Integration Key value from above.

    Setting the Routing Key

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

PagerDuty Fields in CI

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.

    Webhook Notifications

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