PagerDuty destination

Send your event data from RudderStack to PagerDuty.

PagerDuty is a SaaS platform that helps you prevent and resolve business-impacting incidents, thereby improving the customer experience.

Find the open source code for this destination in the GitHub repository.

Getting started

RudderStack supports sending events to PagerDuty via the following connection modes:

Connection ModeWebMobileServer
Device mode---
Cloud modeSupportedSupportedSupported

Once you have confirmed that the source platform supports sending events to PagerDuty, follow these steps:

  1. From your RudderStack dashboard, add a source. Then, from the list of destinations, select PagerDuty.
  2. Assign a name to the destination and click Continue.

Connection settings

To successfully configure PagerDuty as a destination, you will need to configure the following settings:

  • PagerDuty Routing Key: Enter the integration key associated with your PagerDuty service. Refer to the FAQ section for more information on how to obtain it.
  • dedup_key Field Identifier: Enter a dedup_key which acts as the event identifier and is used while updating, resolving, or acknowledging an event. You can provide any value in this field. If not provided, PagerDuty automatically generates and assigns a dedup_key to the event.

Track

You can send a track call to PagerDuty to ingest the Alert events or Change events.

By default, the track call sends an alert event. However, you can specify the event type in the integrations object:

integrations: {
  pagerduty: {
    type: changeEvent / alertEvent
  }
}

Alert events

You can send an alert event to report a new problem, or update an ongoing problem, depending on the event type.

A sample track call for sending an alert event is shown below:

rudderanalytics.track("apiSecret is not present", {
  action: "trigger",
  dedupKey: "9116b734-7e6b-4497-ab51-c16744d4487e",
  severity: "critical",
  component: "ui",
  source: "rudder-webapp",
  group: "destination",
  class: "connection settings",
  customDetails: {
    "ping time": "1500ms",
    "load avg": 0.75,
  },
  imageURLs: [{
      src: "https://static.s4be.cochrane.org/app/uploads/2017/04/shutterstock_531145954.jpg",
      alt: "first image",
    },
    {
      src: "https://chart.googleapis.com/chart?chs=600x400&chd=t:6,2,9,5,2,5,7,4,8,2,1&cht=lc&chds=a&chxt=y&chm=D,0033FF,0,0,5,1",
      alt: "second image",
    },
  ],
  linkURLs: [{
      href: "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error",
      text: "Js Object Error",
    },
    {
      href: "https://www.techtarget.com/whatis/definition/stack-overflow#:~:text=A%20stack%20overflow%20is%20a,been%20allocated%20to%20that%20stack",
      text: "Stack Overflow Error",
    },
  ],
});

Property mappings

The following table lists the mappings between RudderStack and PagerDuty properties for alert events:

RudderStack propertyPagerDuty property
event
Required
payload.summary
properties.severity
Required
payload.severity
properties.source
Required
payload.source
properties.action
Required
event_action
properties.linkURLslinks
properties.imageURLsimages
originalTimeStamppayload.timestamp
properties.grouppayload.group
properties.classpayload.class
properties.componentpayload.component
properties.clientclient
properties.clientUrlclient_url
properties.customDetailspayload.custom_details

Change events

You can send a change event to send information about the recent changes, such as code deployment, and system configuration changes from any system that can make an outbound HTTP connection.

A sample track call for sending a change event is shown below:

rudderanalytics.track(
  "Github CI/CD Triggered", {
    source: "rudder-webapp",
    customDetails: {
      "ping time": "1500ms",
      "load avg": 0.75,
    },
    imageURLs: [{
        src: "https://static.s4be.cochrane.org/app/uploads/2017/04/shutterstock_531145954.jpg",
        alt: "first image",
      },
      {
        src: "https://chart.googleapis.com/chart?chs=600x400&chd=t:6,2,9,5,2,5,7,4,8,2,1&cht=lc&chds=a&chxt=y&chm=D,0033FF,0,0,5,1",
        alt: "second image",
      },
    ],
    linkURLs: [{
        href: "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error",
        text: "Js Object Error",
      },
      {
        href: "https://www.techtarget.com/whatis/definition/stack-overflow#:~:text=A%20stack%20overflow%20is%20a,been%20allocated%20to%20that%20stack",
        text: "Stack Overflow Error",
      },
    ],
  }, {
    integrations: {
      pagerduty: {
        type: "changeEvent",
      },
    },
  }
);

Property mappings

The following table lists the mappings between RudderStack and PagerDuty properties for change events:

RudderStack propertyPagerDuty property
event
Required
payload.summary
properties.severitypayload.severity
properties.linkURLslinks
properties.imageURLsimages
originalTimeStamppayload.timestamp
properties.customDetailspayload.custom_details

FAQ

Where can I find the PagerDuty Routing Key?

  1. Log in to the PagerDuty dashboard.
  2. Go to Services > Service Directory.
  3. Select your desired service and click the Integrations tab.
  4. Click Add integration and select the integration platform. Here, you can find the integration/routing key as shown:
PagerDuty integration key

Questions? Contact us by email or on Slack