Select Supported Platforms

Select Supported Architectures

Select Tier

Github Name


README
Asset Definition
Release Notes
Release Assets

Sensu Go ServiceNow Handler

The Sensu Go ServiceNow handler is a Sensu Event Handler that creates or updates a ServiceNow incident and/or event.

If a Configuration Item for the Sensu Entity doesn't exist in ServiceNow, this handler will create one automatically.

Configuration

Example Sensu Go handler definition:

{
    "api_version": "core/v2",
    "type": "Handler",
    "metadata": {
        "namespace": "default",
        "name": "servicenow"
    },
    "spec": {
        "type": "pipe",
        "command": "sensu-servicenow-handler -H mycompany.service-now.com -u sn_user -p sn_password -c cmdb_ci_server -i incident -e em_event -t 30",
        "timeout": 10,
        "filters": [
            "is_incident"
        ]
    }
}

Usage Examples

This handler creates a ServiceNow incident and/or event.

The incident or event can optionally be associated to a configuration item based on the Sensu event's entity.metadata.name attribute.

If the configuration item does not exist in ServiceNow it is created.

Help

The Sensu Go handler for managing ServiceNow Configuration Items, Incidents, and Events

Usage:
  sensu-servicenow-handler [flags]

Flags:
  -c, --cmdbCiTable string     The ServiceNow CMDB CI table
  -e, --eventTable string      The ServiceNow Event table
  -h, --help                   help for sensu-servicenow-handler
  -H, --host string            The ServiceNow host
  -i, --incidentTable string   The ServiceNow Incident table
  -p, --password string        The ServiceNow password
  -t, --timeout uint           The HTTP timeout for the ServiceNow request (seconds)
  -u, --username string        The ServiceNow username

Create a ServiceNow incident associated to a CMDB configuration item

Using environment variables

export SERVICENOW_HOST=sn-instance.service-now.com
export SERVICENOW_USERNAME=sn-username
export SERVICENOW_PASSWORD=sn-password
export SERVICENOW_CMDB_CI_TABLE=cmdb_ci
export SERVICENOW_INCIDENT_TABLE=incident
export HTTP_TIMEOUT=120
sensu-servicenow-handler < event.json

Using command line arguments

sensu-servicenow-handler -H sn-instance.service-now.com -u sn-username -p sn-password -c cmdb_ci -i incident -t 120 < event.json

Create a ServiceNow event not associated to a CMDB configuration item

Using environment variables

export SERVICENOW_HOST=sn-instance.service-now.com
export SERVICENOW_USERNAME=sn-username
export SERVICENOW_PASSWORD=sn-password
export SERVICENOW_EVENT_TABLE=events
export HTTP_TIMEOUT=60
sensu-servicenow-handler < event.json

Using command line arguments

sensu-servicenow-handler -H sn-instance.service-now.com -u sn-username -p sn-password -e events -t 60 < event.json

Activate the ServiceNow Event Management Plugin

Note that the event management plugin is not enabled by default. Before creating events it is necessary to activate the plugin using the following steps.

  1. In ServiceNow navigate to your instance
  2. Click on the Action dropdown menu
  3. Select Activate plugin from the dropdown
  4. Scroll down to the Event Management plugin
  5. Click on the Activate button

Contributing

See https://github.com/sensu/sensu-go/blob/master/CONTRIBUTING.md

Are you sure you want to report this asset?

Please describe the reason for reporting this asset. Our moderators will be notified and will disable the asset if it is found to be inappropriate.

×

You must be signed in to report this asset.

Sign In with Github

Download

×

There are no asset definitions for this version, only source code:

Download Source Cancel