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 select Use our API directly. Click on Add Service.

    Pagerduty screen

  3. Click on the Integrations tab to see the Integration Key. You will need this key when you create the Data Infrastructure Insights webhook below.

  1. Go to Incidents or Services to view Alerts.

    Pagerduty Screen

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.

  1. 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.