ServiceNow
StackState Self-hosted v5.1.x
Last updated
StackState Self-hosted v5.1.x
Last updated
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.
ServiceNow is a .
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.
To set up the StackState ServiceNow integration, you need to have:
A running ServiceNow instance.
Install the ServiceNow StackPack from the StackState UI StackPacks > Integrations screen. You will need to enter the following details:
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 V3:
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.
You can also add optional configuration and filters:
batch_size - The maximum number of records to be returned (default 2500
, max 10000
).
change_request_bootstrap_days - On first start, all change requests that have been updated in last N days will be retrieved (default 100
).
change_request_process_limit - The maximum number of change requests that should be processed (default 1000
).
timeout - Timeout for requests to the ServiceNow API in seconds (default 20
).
verify_https - Verify the certificate when using https (default true
).
cert - Path to the certificate file for https verification.
keyfile - Path to the public key of certificate for https verification.
Once the Agent has restarted, wait for the Agent to collect data from ServiceNow and send it to StackState.
Edit the Agent integration configuration file /etc/stackstate-agent/conf.d/servicenow.d/conf.yaml
.
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
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 /etc/stackstate-agent/conf.d/servicenow.d/conf.yaml
.
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.
To check the status of the ServiceNow integration, run the status subcommand and look for ServiceNow under Running Checks
:
The ServiceNow check retrieves the following events data from ServiceNow:
Change requests
The ServiceNow check doesn't retrieve any metrics data.
All tags defined in ServiceNow will be retrieved and added to the associated components and relations in StackState.
The ServiceNow check retrieves the following topology data from the ServiceNow CMDB:
Components
Relations
Relations retrieved from the cmdb_rel_ci
table.
The ServiceNow check doesn't retrieve any traces data.
The ServiceNow user configured in StackState 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.
change_request
/api/now/table/change_request
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
When the ServiceNow integration is enabled, the following ServiceNow specific views are available in StackState:
ServiceNow Applications
ServiceNow Business Processes
ServiceNow Discovered
ServiceNow Infrastructure and Network
ServiceNow Machines and Load balancers
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:
ServiceNow StackPack v5.3.3 (2022-06-13)
Improvement: Updated documentation
ServiceNow StackPack v5.3.2 (2022-06-03)
Improvement: Updated documentation
ServiceNow StackPack v5.3.1 (2021-04-12)
Improvement: Common bumped from 2.5.0 to 2.5.1
Agent V3 connects to the configured .
Agent V3 pushes to StackState:
CIs and dependencies are translated into .
defined in ServiceNow are added to components and relations in StackState. Any defined StackState tags are used by StackState when the topology is retrieved.
Change requests are attached to the associated elements as and listed in the StackState Events Perspective.
installed on a machine that can connect to both ServiceNow (via HTTPS) and StackState.
A ServiceNow user with access to the required .
user - A ServiceNow user with access to the required
password - Use to store passwords outside of the configuration file.
Use queries to from ServiceNow (default all).
Use queries to (default all).
that should be retrieved (default all).
to apply the configuration changes.
In ServiceNow, create and copy a filter for CI types or change requests. See the ServiceNow documentation for details on
to apply the configuration changes.
to apply the configuration changes.
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 shipped with each StackState release.
For considerations and instructions on upgrading a StackPack, see .
The change requests retrieved can be and will be visible in the StackState .
The ServiceNow integration also understands StackState . These StackState tags can be assigned to elements in ServiceNow to influence the way that the resulting topology is built in StackState. For example, by placing a component in a specific layer or domain.
CI types retrieved from the ServiceNow CMDB, see .
The ServiceNow integration understands StackState . These StackState tags can be assigned to elements in ServiceNow to influence the way that the resulting topology is built in StackState. For example, by placing a component in a specific layer or domain.
Refer to the ServiceNow product documentation for details on .
The code for the StackState ServiceNow check is open source and available on GitHub at:
Troubleshooting steps for any known issues can be found in the .
to apply the configuration changes.