ServiceNow Integration Guide | PagerDuty
Configure the ServiceNow v8 Integration
ServiceNow + PagerDuty Integration Benefits
- Conduct PagerDuty incident response inside the ServiceNow interface, such as running Incident Workflows, posting status updates and setting the impacted Business Service.
- Sync PagerDuty Custom Fields bi-directionally with ServiceNow Incident record fields. This allows for a more accurate system of record and provides responders with relevant, updated incident context.
- Reduce manual toil by automating ServiceNow Incident creation through Incident Workflows.
- Perform Assignment Group and priority mapping to PagerDuty escalation policies.
- Reduce configuration time by provisioning Business and technical services from ServiceNow to PagerDuty, along with their dependency relationships.
- Send ServiceNow change requests to PagerDuty as change events.
- MID server support.
How it Works
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.
In PagerDuty:
- The ServiceNow Integration is only available to accounts on Business plans or higher. PagerDuty Custom Field synchronization and the Create a ServiceNow Incident Workflow Action are two premium features only available on the Enterprise plan for Incident Management. Please contact our Sales Team if you would like to upgrade to a plan featuring the ServiceNow integration.
- A Global Admin or Account Owner base role is required for configuration.
Quick Links
- ServiceNow Integration Details: How the integration works.
- ServiceNow User Guide: Using the integration after configuration.
- ServiceNow Provisioning: Provision Users, Assignment Groups and Configuration Items to PagerDuty.
- Advanced Configuration: Leverage the full power and versatility of the ServiceNow integration.
- ServiceNow Troubleshooting Guide: Identify and resolve common issues with the ServiceNow integration.
Version
This guide details configuration for the latest ServiceNow v8 integration.
Upgrade to ServiceNow v8
Please see our Upgrade to ServiceNow v8 article for instructions to upgrade from another version.
Looking for a Different Version?
The ServiceNow v7 integration is also available.
Integration Walkthrough
Step 1: Complete ServiceNow Pre-Install Requirements
1.1 ServiceNow Application Access Controls
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: - Can read - Can create - Can Update Click Update in the upper right to save. |
1.2 Integration Installation
Install the PagerDuty integration from the ServiceNow Store.
1.3 Add PagerDuty Fields to Views (Optional)
If you wish to view the PagerDuty ID fields within ServiceNow, they will need to be manually added to the Group, Configuration Item, User and Incident views. This will make it easier to see which ServiceNow objects are mapped to PagerDuty. Instructions are detailed in Show or hide fields on a form in ServiceNow’s documentation.
- We recommend that you add the PagerDuty fields to the Group, Configuration Item, User and Incident views by clicking the in the upper right to customize the display of columns. This will make them visible in your list views only.
- 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 |
Group list view and individual Group form | - PagerDuty default escalation - PagerDuty error message - PagerDuty schedule - PagerDuty service - PagerDuty team - PagerDuty webhook |
Applications list view and individual CI form | - PagerDuty Change Event Token - PagerDuty service - PagerDuty webhook |
Incident list view and Incident form | - PagerDuty incident |
- 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. If you would like to reposition their order, you can also use the or buttons. Click OK to save.
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 Integrations API 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 People Users 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 bePXXXXXX
. 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 Organization Users 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.
- 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.
- 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.
- Navigate to the Roles tab in the User form and click Edit. Assign the following roles:
itil
x_pd_integration.admin
- Click Save to be returned 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.
- In the PagerDuty ID field, enter the 7-character user ID of the default PagerDuty user account (generated in step 3 of Create a Default PagerDuty User Account for ServiceNow, above). Click Update.
To summarize what should be completed thus far:
- 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.
3.2.2: Manage Integration Settings
In your ServiceNow instance, navigate to PagerDuty Configuration PagerDuty 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
- Run the Integration Health Check
- Run the Webhooks Health Check
- Migrate your v2 webhooks to webhooks v3
3.3 Provision a PagerDuty Service
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 Icon Account Settings Incident Priorities. For more information, please see our Incident Priority article.
- Next, in ServiceNow, navigate to PagerDuty Actions Refresh 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.
- 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 (All System Policy Rules Priority Lookup Rules).
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:
incident.x_pd_integration_incident
sys_user_group.x_pd_integration_pagerduty_escalation
sys_user.x_pd_integration_pagerduty_id
cmdb_ci.x_pd_integration_pagerduty_service
task.x_pd_integration_incident_id
This will ensure optimal performance when the PagerDuty application is querying the incidents, group, user and CMDB tables.
ServiceNow User Guide
Once initial configuration is complete, please read our ServiceNow User Guide for instructions on how to use the integration.
Manage Integration Settings
For more information on managing the integration’s settings, please see our ServiceNow Integration Details article.
ServiceNow Provisioning
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.
Updated 4 days ago