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 Mode | Web | Mobile | Server |
---|---|---|---|
Device mode | - | - | - |
Cloud mode | Supported | Supported | Supported |
Once you have confirmed that the source platform supports sending events to PagerDuty, follow these steps:
- From your RudderStack dashboard, add a source. Then, from the list of destinations, select PagerDuty.
- 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 adedup_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, as shown:
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 property | PagerDuty property |
---|---|
event Required | payload.summary |
properties.severity Required | payload.severity |
properties.source Required | payload.source |
properties.action Required | event_action |
properties.linkURLs | links |
properties.imageURLs | images |
originalTimeStamp | payload.timestamp |
properties.group | payload.group |
properties.class | payload.class |
properties.component | payload.component |
properties.client | client |
properties.clientUrl | client_url |
properties.customDetails | payload.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 property | PagerDuty property |
---|---|
event Required | payload.summary |
properties.severity | payload.severity |
properties.linkURLs | links |
properties.imageURLs | images |
originalTimeStamp | payload.timestamp |
properties.customDetails | payload.custom_details |
FAQ
Where can I find the PagerDuty Routing Key?
- Log in to the PagerDuty dashboard.
- Go to Services > Service Directory.
- Select your desired service and click the Integrations tab.
- Click Add integration and select the integration platform. Here, you can find the integration/routing key as shown:
Contact us
For more information on the topics covered on this page, email us or start a conversation in our Slack community.