ServiceNow

  • Latest Dynatrace
  • 7-min read

Your Dynatrace environment can integrate with a ServiceNow environment using ServiceNow Connector ServiceNow for Workflows, enabling you to create incidents based on your monitoring data and events automatically. Furthermore, you can retrieve groups from ServiceNow and import them as Ownership teams.

Configure the integration

Step 1 Grant permissions to Workflows

Some permissions are required by Workflows to run actions on your behalf. Other permissions are required by actions that come bundled with ServiceNow Connector itself.

To fine-tune permissions granted to Workflows

  1. Go to Workflows and select Settings > Authorization settings.
  2. Select the following permissions besides the general Workflows permission.
    • Permissions needed for ServiceNow workflow actions:
      • app-settings:objects:read

For more on general Workflows user permissions, see User permissions for workflows.

Step 2 Create ServiceNow authentication credentials

Sign in to your ServiceNow instance and create basic authentication credentials with the following permissions. You will need these credentials in the next step.

ServiceNow user permissions:

  • Search, create and update incidents (table incident)
  • Read categories (table sys_choice, element category)
  • Read subcategories (table sys_choice, element subcategory)
  • Read assignment groups (table sys_user_group)
  • Read resolution codes (table sys_choice, element close_code)

Step 3 Configure ServiceNow connection

You need a configured connection for each of your ServiceNow environments.

To configure a connection

  1. Go to Settings and select Connections > Connectors > ServiceNow.
  2. Select Add Connection
  3. Describe your ServiceNow connection.
    • Connection name: Provide a meaningful name for your connection.
    • ServiceNow Instance URL: Add the URL of your ServiceNow environment.
    • Type Either use basic authentication or client credentials.
      • For Basic Authentication, provide your username and password.
      • For Client Credentials, provide your client id and client secret.
  4. Select Create.

Available actions

The following workflow actions are available for the ServiceNow integration. Each action corresponds to an endpoint of the ServiceNow API.

Action

Description

ServiceNow API endpoint

Create Incident

Creates an incident in your ServiceNow environment. An incident represents a problem or an issue that needs to be addressed and resolved.

POST /api/now/v2/table/incident

Create a vulnerability item

Creates a vulnerability item in your ServiceNow environment.

POST /api/now/v2/table/sn_vul_vulnerable_item

Get Groups

Get groups from your ServiceNow environment.

GET /api/now/v2/table/sys_user_group

Comment

Create a comment on an entry in your ServiceNow environment

PUT /api/now/v2/table/${tableName}/${sysId}

Search

Generic search action that allows searching your ServiceNow environment

GET /api/now/v2/table/${tableName}

Create a ServiceNow incident

To raise a ServiceNow incident in your workflow Workflows

  1. In the Choose action pane, search for ServiceNow and select Create Incident.

  2. In the Create Incident action, select the Connection to your ServiceNow environment.

  3. Configure the input fields as needed.

    FieldDescriptionRequired
    Correlation IDUnique identifier (in most cases, this is the Dynatrace event ID).optional
    CallerThe user who reports the incident.optional
    CategoryThe category of the incident. Category options are derived by querying the sys_choice table with sysparm_query: 'name=incident^element=category^inactive=false'.required
    SubcategoryThe subcategory of the incident. Subcategory options are derived by querying the sys_choice table with sysparm_query: 'name=incident^element=subcategory^inactive=false^dependent_value=${category}'.required
    ImpactThe impact of the incident.required
    UrgencyThe urgency of the incident.required
    Assignment GroupThe group that will work on the incident. Assignment groups options are derived by querying the sys_user_group table with sysparm_display_value: 'all'.required
    Configuration itemThe affected entity.optional
    Short descriptionA brief description of the incident.optional
    DescriptionA detailed description of the incident.optional

    For more details, see the official ServiceNow documentation.

Create a vulnerability item in ServiceNow

To create a ServiceNow vulnerability item in your workflow Workflows

  1. In the Choose action pane, search for ServiceNow and select Create a vulnerability item.

  2. In the Create a vulnerability item action, select the Connection to your ServiceNow environment.

  3. Configure the input fields as needed.

    FieldDescriptionRequired
    External IDID which is associated with the vulnerable itemoptional
    DescriptionA detailed description of the vulnerability itemoptional
    Short descriptionA brief description of the vulnerability itemoptional
    Risk scoreThe risk score of the vulnerability itemoptional
    Risk ratingThe risk rating of the vulnerability itemoptional
    SourceThe source which detected the vulnerable itemoptional
    Source risk scoreThe risk score in the source system of the vulnerability itemoptional
    Configuration itemThe affected entityoptional
    First foundThe date of the detectionoptional
    PriorityThe priority of the vulnerability itemoptional

    For more details, see the official ServiceNow documentation.

Get Groups from ServiceNow

To fetch groups from ServiceNow in your workflow Workflows

  1. In the Choose action pane, search for ServiceNow and select Get Groups.

  2. In the Get Group action, select the Connection to your ServiceNow environment.

  3. Configure the input fields as needed.

    FieldDescriptionRequired
    SysParm QueryAn encoded query used to filter the result setoptional
    LimitMaximum number of results to return (Default: 100)optional

    For more details, see the official ServiceNow documentation.

Create comment in ServiceNow

To create a comment on an entry in a ServiceNow table in your workflow Workflows

  1. In the Choose action pane, search for ServiceNow and select Create Comment.

  2. In the Create Comment action, select the Connection to your ServiceNow environment.

  3. Configure the input fields as needed.

    FieldDescriptionRequired
    TableThe table name of the entry to comment onrequired
    Unique record identifier (sys_id)The sys_id of the entry to comment onrequired
    CommentThe comment that will be createdrequired

    For more details, see the official ServiceNow documentation.

To search ServiceNow in your workflow Workflows

  1. In the Choose action pane, search for ServiceNow and select Search.

  2. In the Search action, select the Connection to your ServiceNow environment.

  3. Configure the input fields as needed.

    FieldDescriptionRequired
    TableThe name of the table in which to searchrequired
    SysParm QueryAn encoded query used to filter the result setoptional
    SysParm FieldsComma-separated list of fields that limit the resultoptional
    LimitMaximum number of results to return (Default: 100)optional

    For more details, see the official ServiceNow documentation.

Troubleshooting

The following is a solution to a problem some people have.

Related tags
Software Delivery