Incident communication between ServiceNow and PagerDuty is bi-directional. This allows you to trigger, reassign, resolve, use Incident Workflows, post status updates and set impacted Business Services in either system. The following behavior is supported:
Third party monitoring tool integrations detect an issue and trigger an incident in PagerDuty. Responders receive PagerDuty incident notifications and they can acknowledge/resolve via PagerDuty. PagerDuty incidents can automatically create a ServiceNow incident when triggered or manually through the incident details page. After a ServiceNow incident and PagerDuty incident are linked, the above actions are kept in sync for the lifecycle of the incident.
When a ServiceNow ticket is created, it automatically triggers a PagerDuty incident and notifies responders. A responder acknowledges the PagerDuty incident, and above actions from PagerDuty are kept in sync with the ServiceNow ticket.
Requirements
In ServiceNow:
A ServiceNow Administrator role is required for configuration.
The following video captures the integration walkthrough process, which you can use as a reference while configuring the integration in your environment.
In order for the integration to function, a ServiceNow Administrator must allow configuration access in the following ServiceNow tables. In the application navigator, search System Definition and select the Tables module. Search for and open the following records and perform the specified actions:
Tables
Instructions
sys_user sys_user_group sys_user_grmember
Select the Application Access tab and ensure the following are checked:
- Can read
- Can create
- Can Update
- Allow configuration
Click Update in the upper right of each to save.
Sysauto_script
Note: The permissions granted on the Scheduled Script Executions (sysauto_script) table are required to provision scheduled scripts to process PagerDuty webhooks.
Select the Application Access tab and ensure the following are checked:
If you wish to view PagerDuty ID fields within ServiceNow, you will need to manually add them to the Groups, Configuration Items, Users, and Incidents views. This will make it easier to see which ServiceNow objects are mapped to PagerDuty. For example, you can navigate to an object's view by selecting All enter a search term (e.g., "users") select your desired table. Instructions are detailed in Show or hide fields on a form in ServiceNow’s documentation.
Search for the Users view
📘
Navigate to Configuration Items
You can quickly navigate to a list of all Configuration Items by entering cmdb_ci_list.do in the All menu and pressing enter.
Search Configuration Items
We recommend that you add the PagerDuty fields to the Groups, Configuration Items, Users and Incidents views by clicking the in the upper right to customize the column display. This will make them visible in your list views only.
Click gear icon
The following are the available PagerDuty fields that you can add to the various list views or forms in ServiceNow:
List Views and Forms
PagerDuty Fields
User list view and User form
- PagerDuty ID
Groups list view and individual Group form
- PagerDuty default escalation - PagerDuty error message - PagerDuty schedule - PagerDuty service - PagerDuty team - PagerDuty webhook
Select your preferred PagerDuty field(s) in the left-hand Available slush bucket, and then click to move it to the Selected slush bucket. Repeat as desired. Reorder select fields using and . Click OK when you are finished.
Add PagerDuty fields to views
Step 2: Configuration In PagerDuty
2.1 Create a PagerDuty API Access Key
Log in to your PagerDuty account in the web app. Navigate to IntegrationsAPI Access Keys.
On the API Access Keys page, click Create New API Key.
In the dialog that appears, enter a Description for your key. You will also have the option to create the key as Read-only; leave this box unchecked as a full API key is required. Click Create key to save.
Next you will see a dialog displaying your API key. Copy this key and save it in a secure place, as you will not have access to the key after this step. If you lose a key that you created previously and need access to it again, you should remove the key and create a new one. Click Close once you have successfully copied and saved your key.
2.2 Create a Default PagerDuty User Account for ServiceNow
This integration requires ServiceNow to have access to your PagerDuty account both by an API token and a PagerDuty user account. The PagerDuty user account is required so that non-PagerDuty users can take action in ServiceNow and the actions will be reflected in PagerDuty.
🚧
Provision a Default User: Behavior
The integration now has the option to provision a Default User from the ServiceNow UI, however this function has stipulations to consider:
When provisioning the Default User, it will create a PagerDuty user based on the user who is logged in to ServiceNow and configuring this setting. If you are okay with being provisioned as the Default ServiceNow user, please follow directions in this section and then move on to Step 3: Configuration in Your ServiceNow Instance.
If you do not want to be provisioned as the Default ServiceNow user in PagerDuty, please proceed with the steps below.
In your PagerDuty account, navigate to PeopleUsers and click Add Users.
Enter ServiceNow User in the Name field and enter any valid email address in the Email field. Copy this email and save it in a safe place for later steps when you will be entering it into ServiceNow. Once you have saved this email, select Global Admin as the Base Role, click Add and then Send Invitations to save.
You will now see the ServiceNow User in your PagerDuty Users list. Click the user name and take note of the 7-character alphanumeric user ID in the URL of this page. E.g., If your URL reads https://your-subdomain.pagerduty.com/users/PXXXXXX the user ID would be PXXXXXX. Copy this user ID and keep it, along with this users’ email, in a safe place. In later steps, you will also be entering this user ID into ServiceNow.
Step 3: Configuration in Your ServiceNow Instance
3.1 Create a ServiceNow User Account For Webhook Authentication
The PagerDuty integration also requires a ServiceNow user account to operate under. The ServiceNow user account allows PagerDuty to sync actions back to ServiceNow via webhooks. This design serves as a security feature, and allows you to control the integration’s permissions and roles within ServiceNow.
Log in to your ServiceNow instance. In the application navigator, search OrganizationUsers and click New to create a new user account for PagerDuty application use.
Perform the following:
User ID: Enter any desired username for the User ID. This username must be all lower case, e.g., pagerduty.
First/Last name: Enter any desired First and Last name for the user.
Email: Enter the same email that you entered for the new user in PagerDuty (step 2 of the Create a Default User Account for ServiceNow section, above). This will result in requests being properly formatted with a PagerDuty-From header.
Checkboxes: Ensure that the Password needs reset and Locked out checkboxes are unchecked. Ensure that Active is checked. If the Web service access only and Internal Integration User options are available, you can optionally select these checkboxes.
🚧
Checkboxes
Ensure that the Password needs reset and Locked out checkboxes are unchecked.
Ensure that Active is checked.
If the Web service access only and Internal Integration User options are available, you can optionally select these checkboxes.
Create a ServiceNow user account for webhook authentication
Click Submit and then search and select the user’s profile.
Click Set Password. In the modal that appears, click Generate and then click Save Password. Once the password has been saved, copy the username and password and keep them in a safe place, as you will need to provide them in PagerDuty Settings (within the ServiceNow UI) in a later step. Click Close to proceed.
In the bottom section of the User form, select the Roles tab in the User form and click Edit. In the Collection column, search and assign the following roles using :
itil
x_pd_integration.admin
Edit Roles
Assign "itil" role
Click Save to return to the User form.
The new user account that you created requires the ability to make API requests. This allows PagerDuty to create and action upon Incidents in ServiceNow. If your ServiceNow instance allows all users to perform REST API calls, providing the itil and the x_pd_integration.admin role should be sufficient.
A default PagerDuty user account has been created for ServiceNow to use.
An API Key has been created in PagerDuty.
A ServiceNow user account has been created for the PagerDuty integration to use.
The above user accounts have been mapped to each other via their shared email address and the PagerDuty User ID.
If all of these prerequisites have been fulfilled, you may now begin configuring the API and Webhook Connection in ServiceNow.
3.2: Configure the API and Webhook Connection in ServiceNow
🚧
Application Scope Warning
You may see a warning at the top of the page indicating that you need to switch into the PagerDuty application scope. Proceed with this step, if you are prompted, by providing your instance’s login credentials. Once done, the PagerDuty Settings page should become editable.
3.2.1: Choose your preferred ServiceNow to PagerDuty mapping
Review the diagram below, and choose your preferred ServiceNow to PagerDuty mapping.
Choose ServiceNow to PagerDuty Mapping
3.2.2: Manage Integration Settings
In your ServiceNow instance, navigate to PagerDutyConfigurationPagerDuty Settings. Configure the integration settings according to your company’s preferences and workflows, by following steps outlined in our ServiceNow Integration Details article.
3.2.3: Run the Integration Health Check and Webhooks Health Check
In this step you will provision a PagerDuty service, and attach an escalation policy to the newly provisioned service. Please see our ServiceNow Provisioning article for more information.
3.4 Priority Synchronization
The priority level on a newly triggered PagerDuty incident can automatically set the priority level on a linked ServiceNow incident, and vice versa. Priority is also synced when you edit the priority of an incident in either direction. To enable this functionality, you must import PagerDuty priorities and define priority mapping in ServiceNow.
👍
Leave a Note When Changing Priority
If you need to change an incident’s priority, we recommend leaving a text note to keep relevant stakeholders informed.
3.4.1 Import PagerDuty Priorities
First, define incident priorities in your PagerDuty account by going to User IconAccount SettingsIncident Priorities. For more information, please see our Incident Priority article.
Next, in ServiceNow, navigate to PagerDutyActionsRefresh PagerDuty Priorities and click OK when prompted. After this, priorities will populate in the table x_pd_integration_pagerduty_priority, whose contents are displayed under PagerDuty priority.
3.4.2 Define the Priority Mapping
Once you have imported PagerDuty priorities, you may define priority mapping in the same table (x_pd_integration_pagerduty_priority). To map your PagerDuty incident priorities to your ServiceNow priorities:
In the PagerDuty Priority table, select the PagerDuty priority that you want to map.
Set a value for its corresponding ServiceNow Impact and Urgency.
Select ServiceNow Impact and Urgency value pairs to map to the PagerDuty Priority record
Optional: You can choose to associate your priority mapping to a specific PagerDuty urgency.
Click Update to save the mapping.
After you create the mapping, the ServiceNow priority automatically calculates according to your Priority Lookup Rules (AllSystem PolicyRulesPriority Lookup Rules).
PagerDuty Priorities table in ServiceNow with mapped priorities
3.5 Create a Clone Data Preserver
If you plan to configure the PagerDuty-ServiceNow integration in more than one environment (e.g., in both production and a development environment) and there's a chance you might at some point clone data from one ServiceNow instance to another (e.g., from prod to a sub-prod instance), you can set up a Clone Data Preserver according to these instructions. This will prevent the critical integration data from being overwritten in the target instance whenever data is cloned from one environment to another.
Step 4: Test the Integration
To verify that PagerDuty and ServiceNow are communicating, trigger a PagerDuty incident on the provisioned service and check to see that a ServiceNow Incident has been triggered. Once you resolve the PagerDuty incident, the ServiceNow incident will also be resolved, and vice versa. ServiceNow also maintains a log of the incident activities that have taken place within PagerDuty.
👍
Index Service Columns
Once you have successfully installed and configured the PagerDuty application in your ServiceNow instance, it is highly recommended that you index the following columns in ServiceNow:
For more information on provisioning Configuration Items, Assignment Groups and Users from ServiceNow to PagerDuty, please see our ServiceNow Provisioning article.
Upgrade the ServiceNow Integration
To upgrade your ServiceNow integration to the latest version, please see our Upgrade to ServiceNow v8 article.