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.
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.
To set up the StackState ServiceNow integration, you need to have:
StackState Agent V2 installed on a machine that can connect to both ServiceNow (via HTTPS) and StackState.
A running ServiceNow instance.
A ServiceNow user with access to the required ServiceNow API endopints.
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
To enable the ServiceNow check and begin collecting data from ServiceNow, add the following configuration to StackState Agent V2:
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.
init_config:# Any global configurable parameters should be added heredefault_timeout: 10min_collection_interval: 5instances:- url: "https://<instance_ID>.service-now.com"basic_auth:user: <instance_username>password: <instance_password>batch_size: 100 # the maximum number of records to be returned
Optional: Specify the CI types that should be retrieved (default all).
Once the Agent has restarted, wait for the Agent to collect data from ServiceNow and send it to StackState.
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:
Edit the Agent integration configuration file
A subset of the available CI types is listed and commented out.
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.
instances:- url: "https://<instance_ID>.service-now.com"user: <instance_username>password: <instance_password>batch_size: 100# include_resource_types: # optional and by default includes all resource types(sys Class Names)# - cmdb_ci_netgear# - cmdb_ci_ip_router# - cmdb_ci_aix_server# - cmdb_ci_storage_switch# - cmdb_ci_win_cluster# - cmdb_ci_email_server# - cmdb_ci_web_server# - cmdb_ci_app_server# - cmdb_ci_printer# - cmdb_ci_cluster# - cmdb_ci_cluster_node# - cmdb_ci_computer# - cmdb_ci_msd# - cmdb_ci# - cmdb_ci_unix_server# - cmdb_ci_win_cluster_node# - cmdb_ci_datacenter# - cmdb_ci_linux_server# - cmdb_ci_db_ora_catalog# - cmdb_ci_win_server# - cmdb_ci_zone# - cmdb_ci_appl# - cmdb_ci_computer_room# - cmdb_ci_ip_switch# - service_offering# - cmdb_ci_disk# - cmdb_ci_peripheral# - cmdb_ci_service_group# - cmdb_ci_db_mysql_catalog# - cmdb_ci_ups# - cmdb_ci_service# - cmdb_ci_app_server_java# - cmdb_ci_spkg# - cmdb_ci_database# - cmdb_ci_rack# - cmdb_ci_server# - cmdb_ci_network_adapter
To check the status of the ServiceNow integration, run the status subcommand and look for ServiceNow under
sudo stackstate-agent status
The ServiceNow check does not retrieve any events data.
The ServiceNow check does not retrieve any metrics data.
The ServiceNow check retrieves the following topology data from the ServiceNow CMDB:
CI types retrieved from the ServiceNow CMDB, see filter retrieved CI types.
The ServiceNow check does not retrieve any traces data.
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.
REST API Endpoint
When the ServiceNow integration is enabled, the following ServiceNow specific views are available in StackState:
ServiceNow Business Processes
ServiceNow Infrastructure & Network
ServiceNow Machines & Load balancers
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 steps for any known issues can be found in the StackState support Knowledge base.
To uninstall the ServiceNow StackPack and disable the ServiceNow check:
Go to the StackState UI StackPacks > Integrations > ServiceNow screen and click UNINSTALL.
All ServiceNow specific configuration will be removed from StackState.
Remove or rename the Agent integration configuration file, for example:
mv servicenow.d/conf.yaml servicenow.d/conf.yaml.bak