ServiceNow

ENTERPRISE: Built-in integrations are available for Sensu Enterprise users only.

Overview

Create ServiceNow configuration items upon Sensu client registration, create/resolve ServiceNow incidents, and/or create ServiceNow events for Sensu events.

Configuration

Example(s)

The following is an example global configuration for the servicenow enterprise event handler (integration).

{
  "servicenow": {
    "host": "dev42.service-now.com",
    "user": "admin",
    "password": "secret",
    "create_cmdb_ci": true,
    "cmdb_ci_enabled": true,
    "cmdb_ci_table": "cmdb_ci_server",
    "incident_management": true,
    "incident_table": "incident",
    "timeout": 10
  }
}

When creating ServiceNow configuration items, by default, Sensu will use the client’s name for the item name. Individual Sensu clients can override the name of their corresponding configuration item, using specific client definition attributes. In addition to specifying a item name, any valid CMDB table attributes (fields & values) may also be set, e.g. os_version.

The following is an example client definition, specifying its ServiceNow configuration item attributes.

{
  "client": {
    "name": "i-424242",
    "address": "8.8.8.8",
    "subscriptions": [
      "production",
      "webserver"
    ],
    "servicenow": {
      "configuration_item": {
        "name": "webserver01.example.com",
        "os_version": "14.04"
      }
    }
  }
}

Integration Specification

NOTE: the following integration definition attributes may be overwritten by the corresponding Sensu client definition servicenow attributes, which are included in event data.

servicenow attributes

The following attributes are configured within the {"servicenow": {} } configuration scope.

host
description The ServiceNow host address.
required true
type String
example
"host": "dev42.service-now.com"
user
description The ServiceNow user used to authenticate.
required true
type String
example
"user": "admin"
password
description The ServiceNow user password.
required true
type String
example
"password": "secret"
create_cmdb_ci
description If ServiceNow CMDB configuration items should be automatically created for Sensu clients.
required false
type Boolean
default true
example
"create_cmdb_ci": false
cmdb_ci_enabled
description Allows Sensu to look up ServiceNow CMDB confirmation items and link them to incidents and events. When set to true, requires access to the table specified in the cmdb_ci_table configuration option.
required false
type Boolean
default true
example
"cmdb_ci_enabled": false
cmdb_ci_table
description The ServiceNow CMDB table used for automated configuration item creation.
required false
type String
default cmdb_ci_server
example
"cmdb_ci_table": "cmdb_ci_sensu_client"
incident_management
description If ServiceNow incidents should be created and resolved for Sensu events.
required false
type Boolean
default true
example
"incident_management": false
incident_table
description The ServiceNow table used for creating/resolving incidents corresponding to Sensu events.
required false
type String
default incident
example
"incident_table": "incident"
event_management
description If ServiceNow events should be created for Sensu events.
required false
type Boolean
default false
example
"event_management": true
event_table
description The ServiceNow table used for creating ServiceNow events corresponding to Sensu events.
required false
type String
default em_event
example
"event_table": "em_event"
http_proxy
description The URL of a proxy to be used for HTTP requests.
required false
type String
example
"http_proxy": "http://192.168.250.11:3128"
filters
description An array of Sensu event filters (names) to use when filtering events for the handler. Each array item must be a string. Specified filters are merged with default values.
required false
type Array
default
["handle_when", "check_dependencies"]
example
"filters": ["recurrence", "production"]
severities
description An array of check result severities the handler will handle. NOTE: event resolution bypasses this filtering.
required false
type Array
allowed values ok, warning, critical, unknown
default
["warning", "critical", "unknown"]
example
 "severities": ["critical", "unknown"]
timeout
description The handler execution duration timeout in seconds (hard stop).
required false
type Integer
default 10
example
"timeout": 30