PagerDuty Webhooks (Commercial)
PagerDuty Webhooks (Commercial)
Available in PagerDuty Runbook Automation Commercial products.
Rundeck has two PagerDuty webhooks - one handles PagerDuty's V2 webhooks and one handles PagerDuty's V3 webhooks. The webhooks both function the same.
Jobs can be executed in response to PagerDuty events when incidents are triggered
or updated
, or even in response to custom actions. PagerDuty does this by executing a webhook call into Rundeck. This guide will show and example PagerDuty integration that calls a Rundeck jobs for incidents when they are triggered.
Getting Started
This section will walk through configuring a Webhook in Rundeck using a PagerDuty Webhook plugin.
The plugin configuration will run a Job when PagerDuty sends Rundeck an incidenttrigger
event.
Create Rundeck Webhook
- Navigate to Webhooks
- Click Add
- Give the new webhook a name. (e.g. PagerDuty)
- Select PagerDuty: Generic V2 Webhook or PagerDuty: Generic V3 Webhook
Customize Sample Action
A sample action will be created in the Actions section called PagerDuty Example Action
. To configure action details click the Edit > link.
- Click Choose A Job to select a job to run when the rule matches.
- Customize the Job Options:
The sample will set the job'spd_incident_id
option to the PagerDuty incident ID extracted from the event - Customize Conditions:
The sample condition will match fortrigger
event types. See Webhook Types for a list of PagerDuty event types. - Save the Webhook
Tips
Use the suggestion drop-downs to chose from common PagerDuty event fields
Add Webhook to PagerDuty
- In Rundeck select the Webhook by name in Webhook Management and copy the Post URL :
- In PagerDuty navigate to Services in the top menu and select the service where the integration would be called from.
- Select the Integrations tab and click Add or Manage extensions
- Click New Extension
- For the Extension Type select Generic V2 Webhook
- Enter the Post URL into the URL field from step 1
(For the Name we recommend using the same name as the webhook name in Rundeck.)
V3 Webhook Signature Verification
In Rundeck 3.4.0 and later, enterprise customers have the ability to verify that incoming webhooks are actually coming from PagerDuty.
To begin, users must have a shared secret key from PagerDuty. In order to get the shared secret key, make an API call to create a webhook subscription, as described here: Webhook Subscriptions
In the response body of the call above, there will be a "secret" key. The value for secret is the shared secret used to verify webhooks. Once that value has been returned, create a new password type key in Rundeck Key Storage.
Now, when returning to the Webhook V3 definition as described above, select "Shared Secret" and then select the shared secret key from key storage. If the key doesn't match what was returned from PagerDuty, the webhook will not trigger the job successfully.