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. ServiceNow change request events are also retrieved.
Agent V2 connects to the configured ServiceNow API.
CIs and dependencies for the configured CI types are retrieved from the ServiceNow CMDB (default all). Change request events are retrieved in the same run.
Agent V2 pushes retrieved data to StackState.
StackState translates incoming CIs and dependencies into topology components and relations.
Retrieved change requests are attached to the associated elements and listed in the StackState Events Perspective.
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 URL: The ServiceNow instance URL from which topology data will be collected.
ServiceNow Instance Name: the user-defined name of the ServiceNow account shown in configurations such as views.
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/stackstate-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"user: <instance_username>password: <instance_password># batch_size: 1000# change_request_bootstrap_days: 10# change_request_process_limit: 1000# timeout: 20# verify_https: true
You can also add optional configuration and filters:
batch_size - the maximum number of records to be returned (default
change_request_bootstrap_days - On first start, all change requests that have been updated in last N days will be retrieved (default
change_request_process_limit - The maximum number of change requests that should be processed (default
timeout - Timeout for requests to the ServiceNow API in seconds (default
verify_https - Verify certificate when using https (default
Use queries to filter change requests retrieved from ServiceNow (default all).
Use queries to filter the CI types retrieved (default all).
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.
In ServiceNow, create and copy a filter for CI types or change requests. See the ServiceNow documentation for details on filtering with sysparm_query parameters (servicenow.com)
Edit the Agent integration configuration file
Uncomment the CI type or event that you would like to add a filter to:
cmdb_ci_sysparm_query - ServiceNow CMDB Configuration Items query.
cmdb_rel_ci_sysparm_query - ServiceNow CMDB Configuration Items Relations query.
change_request_sysparm_query - ServiceNow Change Request query.
custom_cmdb_ci_field - ServiceNow CMDB Configuration Item custom field mapping.
Add the filter you copied from ServiceNow. For example
...instances:- url: "https://<instance_ID>.service-now.com"user: <instance_username>password: <instance_password># ServiceNow CMDB Configuration Items query. There is no default value.# cmdb_ci_sysparm_query: company.nameSTARTSWITHstackstate# ServiceNow CMDB Configuration Items Relations query. There is no default value.# cmdb_rel_ci_sysparm_query: parent.company.nameSTARTSWITHstackstate^ORchild.company.nameSTARTSWITHstackstate# ServiceNow Change Request query. There is no default value.# change_request_sysparm_query: company.nameSTARTSWITHstackstate# ServiceNow CMDB Configuration Item custom field mapping. The default value is cmdb_ci.# custom_cmdb_ci_field: u_configuration_item...
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
When a new version of the ServiceNow StackPack is available in your instance of StackState, you will be prompted to upgrade in the StackState UI on the page StackPacks > Integrations > ServiceNow. For a quick overview of recent StackPack updates, check the StackPack versions shipped with each StackState release.
For considerations and instructions on upgrading a StackPack, see how to upgrade a StackPack.
The ServiceNow check retrieves the following events data from ServiceNow:
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.
Relations retrieved from the
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
ServiceNow StackPack 5.1.0 (2020-12-16)
Feature: Documentation update for new features of Change Requests and different filters added.
ServiceNow StackPack v5.0.0 (17-11-2020)
Feature: Introduce the Instance Name for easy filtering and use.
ServiceNow StackPack v4.0.1 (18-08-2020)
Feature: Introduced the Release notes pop up for customer.
ServiceNow StackPack v4.0.0 (04-08-2020)
Bugfix: Fix and make Component mapping function per instance to support multi-instance.
ServiceNow StackPack v3.1.0 (04-08-2020)
Improvement: Deprecated stackpack specific layers and introduced a new common layer structure.
Improvement: Addition of new views.
ServiceNow StackPack v3.0.0 (30-04-2020)
Feature: Updated the requirement docs to use AgentV2 now.
Feature: Updated the installation details to use the new configuration parameters.
Feature: Replace resolveOrCreate with getOrCreate.
Feature: Multi-instance support is available now.
ServiceNow StackPack v2.1.0 (10-04-2020)
Improvement: Updated StackPacks integration page, categories, and icons for the SaaS trial.