# Rundeck PagerDuty Notification Plugin
Rundeck integrates with PagerDuty’s incident management platform, which provides notifications, automatic escalations, on-call scheduling, and other functionality to help teams detect and fix problems quickly.
In this guide we will show you how to trigger an event in PagerDuty after executing a job in Rundeck. This functionality is available in both Rundeck Community and Enterprise.
Note, there are many more PagerDuty plugins (opens new window) available for Process Automation users
Rundeck Notifications are actions triggered based on the result of a Job that was executed. There are five conditions that can trigger Rundeck notifications, those conditions are:
onstart- Triggers an action when the Job started
onsuccess- Triggers an action when the Job completed without any errors
onfailure- Triggers an action when the Job failed or was aborted
onavgduration- Triggers an action when the execution exceeds the average duration of the Job.
onretryablefailure- Triggers an action when the Job failed after a retry.
The Rundeck PagerDuty Notification Plugin (opens new window) lets you send trigger events to your PagerDuty service. This plugin is available for the Community version and bundled with the Enterprise version of Rundeck.
# Installing the plugin
# Configuring PagerDuty
(Same Steps for Community and Enterprise)
A fundamental requirement is the PagerDuty integration key, which connects the Rundeck integration with a PagerDuty Service. To locate and copy it follow these steps:
- Log in to PagerDuty.
- Go to the Services menu click the button to create a New Service.
- Give the Service a name and assign it to an escalation policy. Add an integration by selecting the Events API V2, as seen below:
- When the Service is created you’ll be shown the Integrations tab. Inside that tab copy the value for the Integration Key and save it for later on in your setup.
# Configuring the Rundeck PagerDuty Notification
These steps will configure the Notification plugin globally (across all Rundeck projects). There are options to configure the plugin per project covered in the main documentation (opens new window).
# Sending Notifications to a PagerDuty Service.
- Create or edit a job.
- Go to the Workflow tab and add a step. For this example, use a Command step with an
echo "hello world!"command.
- Go to the Notifications tab.
- On the “On Success” event, click the "+ Add Notification" Button.
- In the Notification Type list select "PagerDuty".
- The Incident subject is editable, by default the plugins include job context variables. Click on the Save button for the Notification and Save button for the job.
- Run the job.
When you check the PagerDuty service incidents, you should see a new triggered incident is created.