Documentation

Kapacitor event handlers

Kapacitor can be integrated into a monitoring system by sending alert messages to supported event handlers. Currently, Kapacitor can send alert messages to specific log files and specific URLs, as well as to many third party applications.

These documents outline configuration options, setup instructions, handler file and TICKscript syntax for officially supported Kapacitor event handlers.

Configure event handlers

Required and default configuration options for most event handlers are configured in your Kapacitor configuration file, kapacitor.conf. The default location for this is /etc/kapacitor/kapacitor.conf, but may be different depending on your Kapacitor setup.

Many event handlers provide options that can be defined in a TICKscript or in a handler file while some can only be configured in a handler file. These configurable options are outlined in the documentation for each handler.

Add and use event handlers

Enable the event handler in your kapacitor.conf if applicable. Once enabled, do one of the following:

Create a topic handler with a handler file

An event handler file is a simple YAML or JSON file that contains information about the handler. Although many handlers can be added in a TICKscript, managing multiple handlers in TICKscripts can be cumbersome. Handler files let you add and use handlers outside of TICKscripts. For some handler types, using handler files is the only option.

The handler file contains the following:

* Required
  • * ID: The unique ID of the handler.
  • * Topic: The topic to which the handler subscribes.
  • Match: A lambda expression to filter matching alerts. By default, all alerts match. Learn more about match expressions.
  • * Kind: The kind of handler.
  • Options: Configurable options determined by the handler kind. If none are provided, default values defined for the handler in the kapacitor.conf are used.
id: handler-id
topic: topic-name
match: changed()
kind: slack
options:
  channel: '#oh-nos'

Add the handler

Use the Kapacitor CLI to define a new handler with a handler file:

# Syntax
kapacitor define-topic-handler <handler-file-name>

# Example
kapacitor define-topic-handler slack_cpu_handler.yaml

Use a handler in a TICKscript

Many event handlers can be used directly in TICKscripts to send events. This is generally done with handlers that send messages to third-parties. Below is an example TICKscript that publishes CPU alerts to Slack using the .slack() event handler:

stream
  |from()
    .measurement('cpu')
  |alert()
    .crit(lambda: "idle_usage" < 10)
    .message('You better check your CPU usage.')
    .slack()

Events are sent to handlers if the alert is in a state other than ‘OK’ or the alert just changed to the ‘OK’ state from a non ‘OK’ state (the alert recovered). Use the AlertNode.StateChangesOnly property to send events to handlers only if the alert state changes.


Was this page helpful?

Thank you for your feedback!


InfluxDB 3.9: Performance upgrade preview

InfluxDB 3 Enterprise 3.9 includes a beta of major performance upgrades with faster single-series queries, wide-and-sparse table support, and more.

InfluxDB 3 Enterprise 3.9 includes a beta of major performance and feature updates.

Key improvements:

  • Faster single-series queries
  • Consistent resource usage
  • Wide-and-sparse table support
  • Automatic distinct value caches for reduced latency with metadata queries

Preview features are subject to breaking changes.

For more information, see:

Telegraf Enterprise now in public beta

Get early access to the Telegraf Controller and provide feedback to help shape the future of Telegraf Enterprise.

See the Blog Post

The upcoming Telegraf Enterprise offering is for organizations running Telegraf at scale and is comprised of two key components:

  • Telegraf Controller: A control plane (UI + API) that centralizes Telegraf configuration management and agent health visibility.
  • Telegraf Enterprise Support: Official support for Telegraf Controller and Telegraf plugins.

Join the Telegraf Enterprise beta to get early access to the Telegraf Controller and provide feedback to help shape the future of Telegraf Enterprise.

For more information:

Telegraf Controller v0.0.6-beta now available

Telegraf Controller v0.0.6-beta is now available with new features, improvements, and bug fixes.

View the release notes
Download Telegraf Controller v0.0.6-beta

InfluxDB Docker latest tag changing to InfluxDB 3 Core

On May 27, 2026, the latest tag for InfluxDB Docker images will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments.

If using Docker to install and run InfluxDB, the latest tag will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments. For example, if using Docker to run InfluxDB v2, replace the latest version tag with a specific version tag in your Docker pull command–for example:

docker pull influxdb:2