LogoLogo
StackState.comDownloadSupportExplore playground
StackState v5.1
StackState v5.1
  • Welcome to the StackState docs!
  • StackState self-hosted v5.1 docs
  • Getting Started
  • 🚀Setup
    • Install StackState
      • Requirements
      • Kubernetes / OpenShift
        • Kubernetes install
        • OpenShift install
        • Required Permissions
        • Non-high availability setup
        • Override default configuration
        • Configure storage
        • Configure Ingress
        • Install from custom image registry
        • Migrate from Linux install
      • Linux
        • Before you install
        • Download
        • Install StackState
        • Install with production configuration
        • Install with development configuration
        • Install with POC configuration
        • Set up a reverse proxy
        • Set up TLS without reverse proxy
      • Initial run guide
      • Troubleshooting
    • Upgrade StackState
      • Steps to upgrade
      • Version specific upgrade instructions
      • StackPack versions
      • StackState release notes
    • StackState Agent
      • About StackState Agent V3
      • Docker
      • Kubernetes / OpenShift
      • Linux
      • Windows
      • Advanced Agent configuration
      • Use an HTTP/HTTPS proxy
      • Agent V1 (legacy)
      • Migrate Agent V1 to Agent V2
        • Linux
        • Docker
    • StackState CLI
      • CLI: sts
      • CLI: stac (deprecated)
      • Comparison between CLIs
    • Data management
      • Backup and Restore
        • Kubernetes backup
        • Linux backup
        • Configuration backup
      • Data retention
      • Clear stored data
  • 👤Use
    • Concepts
      • The 4T data model
      • Components
      • Relations
      • Health state
      • Layers, Domains and Environments
      • Perspectives
      • Anomaly detection
      • StackState architecture
    • StackState UI
      • Explore mode
      • Filters
      • Views
        • About views
        • Configure the view health
        • Create and edit views
        • Visualization settings
      • Perspectives
        • Topology Perspective
        • Events Perspective
        • Traces Perspective
        • Metrics Perspective
      • Timeline and time travel
      • Analytics
      • Keyboard shortcuts
    • Checks and monitors
      • Checks
      • Add a health check
      • Anomaly health checks
      • Monitors
      • Manage monitors
    • Problem analysis
      • About problems
      • Problem lifecycle
      • Investigate a problem
      • Problem notifications
    • Metrics
      • Telemetry streams
      • Golden signals
      • Top metrics
      • Add a telemetry stream
      • Browse telemetry
      • Set telemetry stream priority
    • Events
      • About events
      • Event notifications
      • Manage event handlers
    • Glossary
  • 🧩StackPacks
    • About StackPacks
    • Add-ons
      • Autonomous Anomaly Detector
      • Health Forecast
    • Integrations
      • About integrations
      • 💠StackState Agent V2
      • 💠AWS
        • AWS
        • AWS ECS
        • AWS X-ray
        • StackState/Agent IAM role: EC2
        • StackState/Agent IAM role: EKS
        • Policies for AWS
        • AWS (legacy)
        • Migrate AWS (legacy) to AWS
      • 💠Dynatrace
      • 💠Kubernetes
      • 💠OpenShift
      • 💠OpenTelemetry
        • About instrumentations
        • AWS NodeJS Instrumentation
        • Manual Instrumentation
          • Prerequisites
          • Tracer and span mappings
          • Relations between components
          • Span health state
          • Merging components
          • Code examples
      • 💠ServiceNow
      • 💠Slack
      • 💠Splunk
        • Splunk
        • Splunk Events
        • Splunk Health
        • Splunk Metrics
        • Splunk Topology
      • 💠VMWare vSphere
      • Apache Tomcat
      • Azure
      • Cloudera
      • Custom Synchronization
      • DotNet APM
      • Elasticsearch
      • Humio
      • Java APM
      • JMX
      • Logz.io
      • MySQL
      • Nagios
      • OpenMetrics
      • PostgreSQL
      • Prometheus
      • SAP
      • SCOM
      • SolarWinds
      • Static Health
      • Static Topology
      • Traefik
      • WMI
      • Zabbix
    • Develop your own StackPacks
  • 🔧Configure
    • Topology
      • Component actions
      • Identifiers
      • Topology naming guide
      • Topology sources
      • Create a topology manually
      • Configure topology synchronizations
      • Enable email event notifications
      • Send topology data over HTTP
      • Set the topology filtering limit
      • Use a proxy for event handlers
      • Use tags
      • Tune topology synchronization
      • Debug topology synchronization
    • Telemetry
      • Add telemetry during topology synchronization
      • Data sources
        • Elasticsearch
        • Prometheus mirror
      • Send events over HTTP
      • Send metrics data over HTTP
      • Set the default telemetry interval
      • Debug telemetry synchronization
    • Traces
      • Set up traces
      • Advanced configuration for traces
    • Health
      • Health synchronization
      • Send health data over HTTP
        • Send health data
        • Repeat Snapshots JSON
        • Repeat States JSON
        • Transactional Increments JSON
      • Debug health synchronization
    • Anomaly Detection
      • Export anomaly feedback
      • Scale the AAD up and down
      • The AAD status UI
    • Security
      • Authentication
        • Authentication options
        • File based
        • LDAP
        • Open ID Connect (OIDC)
        • KeyCloak
        • Service tokens
      • RBAC
        • Role-based Access Control
        • Permissions
        • Roles
        • Scopes
        • Subjects
      • Secrets management
      • Self-signed certificates
      • Set up a security backend for Linux
      • Set up a security backend for Windows
    • Logging
      • Kubernetes logs
      • Linux logs
      • Enable logging for functions
  • 📖Develop
    • Developer guides
      • Agent checks
        • About Agent checks
        • Agent check API
        • Agent check state
        • How to develop Agent checks
        • Connect an Agent check to StackState
      • Custom functions and scripts
        • StackState functions
        • Check functions
        • Component actions
        • Event handler functions
        • ID extractor functions
        • Mapping functions
        • Monitor functions
        • Propagation functions
        • Template functions
        • View health state configuration functions
      • Custom Synchronization StackPack
        • About the Custom Synchronization StackPack
        • How to customize elements created by the Custom Synchronization StackPack
        • How to configure a custom synchronization
      • Integrate external services
      • Mirroring Telemetry
      • Monitors
        • Create monitors
        • Monitor STJ file format
      • StackPack development
        • How to create a StackPack
        • Packaging
        • How to get a template file
        • How to make a multi-instance StackPack
        • Prepare a multi-instance provisioning script
        • Upload a StackPack file
        • Prepare a shared template
        • Customize a StackPack
        • Prepare instance template files
        • Prepare a StackPack provisioning script
        • Resources in a StackPack
        • StackState Common Layer
      • Synchronizations and templated files
    • Reference
      • StackState OpenAPI docs
      • StackState Template JSON (STJ)
        • Using STJ
        • Template functions
      • StackState Markup Language (STML)
        • Using STML
        • STML Tags
      • StackState Query Language (STQL)
      • StackState Scripting Language (STSL)
        • Scripting in StackState
        • Script result: Async
        • Script result: Streaming
        • Time in scripts
        • Script APIs
          • Async - script API
          • Component - script API
          • HTTP - script API
          • Prediction - script API
          • StackPack - script API
          • Telemetry - script API
          • Time - script API
          • Topology - script API
          • UI - script API
          • View - script API
    • Tutorials
      • Create a simple StackPack
      • Push data to StackState from an external system
      • Send events to StackState from an external system
      • Set up a mirror to pull telemetry data from an external system
Powered by GitBook
LogoLogo

Legal notices

  • Privacy
  • Cookies
  • Responsible disclosure
  • SOC 2/SOC 3
On this page
  • Overview
  • Setup
  • Prerequisites
  • Install
  • Configure
  • Status
  • Upgrade
  • Integration details
  • Data retrieved
  • REST API endpoints
  • ServiceNow views in StackState
  • Open source
  • Troubleshooting
  • Uninstall
  • Release notes
  • See also
  1. StackPacks
  2. Integrations

ServiceNow

StackState Self-hosted v5.1.x

PreviousCode examplesNextSlack

Last updated 1 year ago

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. 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.

Setup

Prerequisites

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

  • A running ServiceNow instance.

Install

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.

Configure

To enable the ServiceNow check and begin collecting data from ServiceNow, add the following configuration to StackState Agent V3:

  1. 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.

    • init_config:
      # Any global configurable parameters should be added here
      default_timeout: 10
      
      instances:
      - url: "https://<instance_ID>.service-now.com"
        user: <instance_username>
        password: <instance_password>
        # min_collection_interval: 5 # use in place of collection_interval for Agent V2.14.x or earlier 
        collection_interval: 5
        # batch_size: 1000  
        # change_request_bootstrap_days: 10
        # change_request_process_limit: 1000 
        # timeout: 20
        # verify_https: true
        # cert: /path/to/cert.pem
        # keyfile: /path/to/key.pem
  2. 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.

  3. Once the Agent has restarted, wait for the Agent to collect data from ServiceNow and send it to StackState.

Use ServiceNow queries to filter retrieved events and CI types

  1. Edit the Agent integration configuration file /etc/stackstate-agent/conf.d/servicenow.d/conf.yaml.

  2. 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.

  3. 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
    ...

Specify CI types to retrieve

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. 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.

  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.

     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

Status

To check the status of the ServiceNow integration, run the status subcommand and look for ServiceNow under Running Checks:

sudo stackstate-agent status

Upgrade

Integration details

Data retrieved

Events

The ServiceNow check retrieves the following events data from ServiceNow:

Data
Description

Change requests

Metrics

The ServiceNow check doesn't retrieve any metrics data.

Tags

All tags defined in ServiceNow will be retrieved and added to the associated components and relations in StackState.

Topology

The ServiceNow check retrieves the following topology data from the ServiceNow CMDB:

Data
Description

Components

Relations

Relations retrieved from the cmdb_rel_ci table.

Traces

The ServiceNow check doesn't retrieve any traces data.

REST API endpoints

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.

Table Name
REST API Endpoint

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

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 and Network

  • ServiceNow Machines and Load balancers

Open source

Troubleshooting

Uninstall

To uninstall the ServiceNow StackPack and disable the ServiceNow check:

  1. Go to the StackState UI StackPacks > Integrations > ServiceNow screen and click UNINSTALL.

    • All ServiceNow specific configuration will be removed from StackState.

  2. Remove or rename the Agent integration configuration file, for example:

     mv servicenow.d/conf.yaml servicenow.d/conf.yaml.bak

Release notes

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

See also

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.

🧩
💠
StackState Agent V3
secrets management
filtering with sysparm_query parameters (servicenow.com)
StackPack versions
how to configure a ServiceNow user and assign roles
https://github.com/StackVista/stackstate-agent-integrations/tree/master/servicenow
StackState support knowledge base
StackState
Secrets management
StackState Agent integrations - ServiceNow (github.com)
How to configure a ServiceNow user and assign roles (servicenow.com)
Filtering with sysparm_query parameters (servicenow.com)
ServiceNow API
retrieved data
topology components and relations
Tags
events
ServiceNow API endpoints
ServiceNow API endpoints
filter change requests retrieved
filter the CI types retrieved
Specify the CI types
Events Perspective
filtered using ServiceNow queries
filter retrieved CI types
common tags
common tags
StackState core integration
how to upgrade a StackPack
Restart StackState Agent V3
Restart StackState Agent V3
Restart StackState
Restart StackState
Data flow