ServiceNow
Collect topology data from ServiceNow
This page describes StackState version 4.1.
The StackState 4.1 version range is End of Life (EOL) and no longer supported. We encourage customers still running the 4.1 version range to upgrade to a more recent release.

Overview

The ServiceNow StackPack allows near real time synchronization between ServiceNow and StackState. When the ServiceNow Agent integration is enabled, configuration items (CIs) and their dependencies from the ServiceNow CMDB will be added to the StackState topology as components and relations.
Data flow
  • Agent V2 connects to the configured ServiceNow API.
  • CIs and dependencies for the configured CI types are retrieved from the ServiceNow CMDB (default all).
  • Agent V2 pushes retrieved data to StackState.
  • StackState translates incoming CIs and dependencies into topology components and relations.

Setup

Prerequisites

To set up the StackState ServiceNow integration, you need to have:

Install

Install the ServiceNow StackPack from the StackState UI StackPacks > Integrations screen. You will need to provide the following parameters:
  • ServiceNow Instance ID: the ServiceNow instance ID from which topology will be collected. For example, if the ServiceNow Instance URL is https://dev102222.service-now.com, then the ServiceNow Instance ID will be dev102222.

Configure

To enable the ServiceNow check and begin collecting data from ServiceNow, add the following configuration to StackState Agent V2:
  1. 1.
    Edit the Agent integration configuration file /etc/sts-agent/conf.d/servicenow.d/conf.yaml to include details of your ServiceNow instance:
    • url - the REST API url, uses HTTPS protocol for communication.
    • user - a ServiceNow user with access to the required ServiceNow API endopints
    • password - use secrets management to store passwords outside of the configuration file.
      1
      init_config:
      2
      # Any global configurable parameters should be added here
      3
      default_timeout: 10
      4
      min_collection_interval: 5
      5
      6
      instances:
      7
      - url: "https://<instance_ID>.service-now.com"
      8
      basic_auth:
      9
      user: <instance_username>
      10
      password: <instance_password>
      11
      batch_size: 100 # the maximum number of records to be returned
      Copied!
  2. 2.
    Optional: Specify the CI types that should be retrieved (default all).
  3. 3.
    Restart the StackState Agent(s) to apply the configuration changes.
  4. 4.
    Once the Agent has restarted, wait for the Agent to collect data from ServiceNow and send it to StackState.

Filter retrieved CI types

By default, all available ServiceNow CI types will be sent to StackState. If you prefer to work with a specific set of resource types, you can configure the Agent integration to filter the CI types it retrieves:
  1. 1.
    Edit the Agent integration configuration file /etc/sts-agent/conf.d/servicenow.d/conf.yaml.
    • A subset of the available CI types is listed and commented out.
  2. 2.
    Uncomment the line include_resource_types and the CI types you would like to send to StackState. You can add any valid ServiceNow CI type to the include_resource_types list, however, components from resource types that you have added will appear on the Uncategorized layer of a StackState view.
    1
    instances:
    2
    - url: "https://<instance_ID>.service-now.com"
    3
    user: <instance_username>
    4
    password: <instance_password>
    5
    batch_size: 100
    6
    # include_resource_types: # optional and by default includes all resource types(sys Class Names)
    7
    # - cmdb_ci_netgear
    8
    # - cmdb_ci_ip_router
    9
    # - cmdb_ci_aix_server
    10
    # - cmdb_ci_storage_switch
    11
    # - cmdb_ci_win_cluster
    12
    # - cmdb_ci_email_server
    13
    # - cmdb_ci_web_server
    14
    # - cmdb_ci_app_server
    15
    # - cmdb_ci_printer
    16
    # - cmdb_ci_cluster
    17
    # - cmdb_ci_cluster_node
    18
    # - cmdb_ci_computer
    19
    # - cmdb_ci_msd
    20
    # - cmdb_ci
    21
    # - cmdb_ci_unix_server
    22
    # - cmdb_ci_win_cluster_node
    23
    # - cmdb_ci_datacenter
    24
    # - cmdb_ci_linux_server
    25
    # - cmdb_ci_db_ora_catalog
    26
    # - cmdb_ci_win_server
    27
    # - cmdb_ci_zone
    28
    # - cmdb_ci_appl
    29
    # - cmdb_ci_computer_room
    30
    # - cmdb_ci_ip_switch
    31
    # - service_offering
    32
    # - cmdb_ci_disk
    33
    # - cmdb_ci_peripheral
    34
    # - cmdb_ci_service_group
    35
    # - cmdb_ci_db_mysql_catalog
    36
    # - cmdb_ci_ups
    37
    # - cmdb_ci_service
    38
    # - cmdb_ci_app_server_java
    39
    # - cmdb_ci_spkg
    40
    # - cmdb_ci_database
    41
    # - cmdb_ci_rack
    42
    # - cmdb_ci_server
    43
    # - cmdb_ci_network_adapter
    Copied!
  3. 3.
    Restart the StackState Agent(s) to apply the configuration changes.

Status

To check the status of the ServiceNow integration, run the status subcommand and look for ServiceNow under Running Checks:
1
sudo stackstate-agent status
Copied!

Integration details

Data retrieved

Events

The ServiceNow check does not retrieve any events data.

Metrics

The ServiceNow check does not retrieve any metrics data.

Topology

The ServiceNow check retrieves the following topology data from the ServiceNow CMDB:
Data
Description
Components
CI types retrieved from the ServiceNow CMDB, see filter retrieved CI types.
Relations

Traces

The ServiceNow check does not retrieve any traces data.

REST API endpoints

The ServiceNow user configured in StackState Agent V2 must have access to read the ServiceNow TABLE API. The specific table names and endpoints used in the StackState integration are described below. All named REST API endpoints use the HTTPS protocol for communication.
Table Name
REST API Endpoint
cmdb_ci
/api/now/table/cmdb_ci
cmdb_rel_type
/api/now/table/cmdb_rel_type
cmdb_rel_ci
/api/now/table/cmdb_rel_ci
Refer to the ServiceNow product documentation for details on how to configure a ServiceNow user and assign roles.

ServiceNow views in StackState

When the ServiceNow integration is enabled, the following ServiceNow specific views are available in StackState:
  • ServiceNow Applications
  • ServiceNow Business Processes
  • ServiceNow Discovered
  • ServiceNow Infrastructure & Network
  • ServiceNow Machines & Load balancers

Open source

The code for the StackState ServiceNow check is open source and available on GitHub at: https://github.com/StackVista/stackstate-agent-integrations/tree/master/servicenow

Troubleshooting

Troubleshooting steps for any known issues can be found in the StackState support Knowledge base.

Uninstall

To uninstall the ServiceNow StackPack and disable the ServiceNow check:
  1. 1.
    Go to the StackState UI StackPacks > Integrations > ServiceNow screen and click UNINSTALL.
    • All ServiceNow specific configuration will be removed from StackState.
  2. 2.
    Remove or rename the Agent integration configuration file, for example:
    1
    mv servicenow.d/conf.yaml servicenow.d/conf.yaml.bak
    Copied!
  3. 3.
    Restart the StackState Agent(s) to apply the configuration changes.

See also

Last modified 5mo ago