Integrate ServiceNow with Datadog On-Call

This product is not supported for your selected Datadog site. ().
Join the Preview

The ServiceNow integration for Datadog On-Call is in Preview.

Request Access

Overview

The ServiceNow integration for Datadog On-Call connects On-Call Pages with ServiceNow incidents. It supports two flows:

  • Sync Pages to ServiceNow: When a routing rule creates a Page, Datadog creates a ServiceNow incident and keeps it in sync with the Page. Status, urgency, and comments sync based on the mappings you configure.
  • Trigger Pages from ServiceNow: When a ServiceNow record matches a business rule, the rule triggers a Page for a Datadog On-Call team or user.

Prerequisites

Sync Pages to ServiceNow incidents

Create a ServiceNow connection

A connection defines which ServiceNow instance receives incidents and how Pages and incidents stay in sync. You can create more than one connection, for example, one for each assignment group.

  1. In Datadog, go to On-Call > Settings > Integrations.
  2. Select ServiceNow and click Add Connection.
  3. Configure the connection:
    • ServiceNow instance: Select the ServiceNow instance configured in the ServiceNow tile. To add an instance, click Manage accounts.
    • Assignment group (optional): Select the ServiceNow assignment group for incidents created from Pages.
    • Automatically create ServiceNow incidents from Pages: Enable this toggle to create a ServiceNow incident each time a routing rule that uses this connection creates a Page.
    • Sync methods and mappings: Choose how each field syncs between the Page and the ServiceNow incident, and map its values. You can sync the Page’s status to the incident’s State, its urgency to the incident’s Impact and Urgency, and its comments to the incident’s Work Notes.
  4. Save the connection.

Sync Pages from a routing rule

After you create a connection, add ServiceNow sync to a team’s routing rules:

  1. Go to On-Call > Teams and select a team.
  2. Find the Page Routing section and click Edit.
  3. Add or edit a routing rule.
  4. Under Set targets, click Add, select Sync with a ServiceNow Incident, then select the connection to use.
  5. Save the routing rule.

When the rule matches an alert, Datadog creates the Page and a ServiceNow incident at the same time. The incident stays in sync with the Page based on the connection’s settings.

Trigger Pages from ServiceNow incidents

The ITOM/ITSM Integration for Datadog includes a PublishOnCallPage script. Call it from a ServiceNow business rule to trigger an On-Call Page, for example, when an incident is created.

  1. In ServiceNow, go to System Definition > Business Rules and click New.

  2. Configure the business rule’s table, when it runs, and its filter conditions to define which records trigger a Page. Select the Advanced checkbox to enable scripting.

  3. On the Advanced tab, call PublishOnCallPage in the script. For example, to page the database team at high urgency:

    (function executeRule(current, previous /* null when async */) {
        new PublishOnCallPage("team_handle", "database", "high").execute(current);
    })(current, previous);
    

    For the supported target types, the urgency argument, and the application key scopes the script requires, see Create a Datadog On-Call Page from ServiceNow.

  4. Click Submit.

When the business rule runs, Datadog triggers a Page for the target team or user.

Further reading