ServiceNow event handler

ServiceNow provides service management software with a comprehensive managed workflow that supports features such as real-time communication, collaboration, and resource sharing. Configure Kapacitor to send alert messages to ServiceNow.


Configuration and default option values for the ServiceNow event handler are set in your kapacitor.conf. The example below shows the default configuration:

  # Configure ServiceNow.
  enabled = false
  # The ServiceNow URL for the target table (Alert or Event). Replace this instance with your hostname.
  url = ""
  # Default source identification.
  source = "Kapacitor"
  # Username for HTTP BASIC authentication
  username = ""
  # Password for HTTP BASIC authentication
  password = ""


Set to true to enable the ServiceNow event handler.


The ServiceNow instance address.


Default “Kapacitor” source.


Username to use for basic HTTP authentication.


Password to use for basic HTTP authentication.


The following ServiceNow event handler options can be set in a handler file or when using .serviceNow() in a TICKscript. These options set corresponding fields in the ServiceNow alert or event. For information about ServiceNow alerts, see Manually create an alert.

nodestringServiceNow node to associate with the event.
typestringServiceNow type used to identify an event record from which alerts are created, for example, disk or CPU.
resourceAdds key values pairs to the Sensu API request.
metricNamestringUnique name that describes metrics collected for which the alert has been created.
messageKeystringUnique event identifier used to identify multiple events related to the same alert. If empty, this is generated from the source, node, type, resource, and metricName field values.
sourcestringSource that generated the event.
messagestringAlert message.
alert IDstringUnique ID used to identify the alert.

All the handler options above support templates with the following variables: ID, Name, TaskName, Fields, Tags, same as in the AlertNode.message.

By default, the handler maps the Kapacitor values below to the ServiceNow Alert or Event fields as follows:

alert IDMessage key

TICKscript examples

    .crit(lambda: "usage_user" > 90)
    .message('Hey, check your CPU')
    .crit(lambda: "usage_user" > 90)
    .message('Hey, check your CPU')
        .node('{{ index .Tags "host" }}')
        .messageKey('Alert: {{ .ID }}')

Was this page helpful?

Thank you for your feedback!

The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Flux is going into maintenance mode and will not be supported in InfluxDB 3.0. This was a decision based on the broad demand for SQL and the continued growth and adoption of InfluxQL. We are continuing to support Flux for users in 1.x and 2.x so you can continue using it with no changes to your code. If you are interested in transitioning to InfluxDB 3.0 and want to future-proof your code, we suggest using InfluxQL.

For information about the future of Flux, see the following: