Select Supported Platforms

Select Supported Architectures

Select Tier

Github Name

Asset Definition
Release Notes
Release Assets

Bonsai Asset Badge

Sensu InfluxDB Handler


The Sensu InfluxDB Handler is a Sensu Event Handler that sends metrics to
the time series database InfluxDB. Sensu can collect metrics using
check output metric extraction or the StatsD listener. Those collected metrics
pass through the event pipeline, allowing Sensu to deliver the metrics to the
configured metric event handlers. This InfluxDB handler will allow you to
store, instrument, and visualize the metric data from Sensu.

This handler also supports creating metrics out of check status results. This enables
operators to leverage InfluxDB as a long-term storage archive for Sensu check result
history. This feature will only work with the "-c" flag, and any check can add it as

Check out The Sensu Blog or Sensu Docs for a step by step guide!

Usage Examples


  sensu-influxdb-handler [flags]

  -a, --addr string            the address of the influxdb server, should be of the form 'http://host:port', defaults to 'http://localhost:8086' or value of INFLUXDB_ADDR env variable (default "http://localhost:8086")
  -c, --check-status-metric    if true, the check status result will be captured as a metric
  -d, --db-name string         the influxdb to send metrics to
  -h, --help                   help for sensu-influxdb-handler
  -i, --insecure-skip-verify   if true, the influx client skips https certificate verification
  -p, --password string        the password for the given db, defaults to value of INFLUXDB_PASS env variable
      --precision string       the precision value of the metric (default "s")
  -u, --username string        the username for the given db, defaults to value of INFLUXDB_USER env variable


Asset registration

Assets are the best way to make use of this handler. If you're not using an asset, please consider doing so! If you're using sensuctl 5.13 or later, you can use the following command to add the asset:

sensuctl asset add sensu/sensu-influxdb-handler

If you're using an earlier version of sensuctl, you can download the asset definition from this project's Bonsai Asset Index page.

Asset definition

type: Asset
api_version: core/v2
  name: sensu-influxdb-handler_linux_amd64
    io.sensu.bonsai.tier: Supported
    io.sensu.bonsai.version: 3.1.2
    io.sensu.bonsai.namespace: sensu sensu-influxdb-handler
    io.sensu.bonsai.tags: ''
  sha512: 612c6ff9928841090c4d23bf20aaf7558e4eed8977a848cf9e2899bb13a13e7540bac2b63e324f39d9b1257bb479676bc155b24e21bf93c722b812b0f15cb3bd
  - entity.system.os == 'linux'
  - entity.system.arch == 'amd64'

Handler definition

api_version: core/v2
type: Handler
  namespace: default
  name: influxdb
  type: pipe
  command: sensu-influxdb-handler -d sensu
  timeout: 10
  - INFLUXDB_ADDR=http://influxdb.default.svc.cluster.local:8086
  - INFLUXDB_PASS=password
  - has_metrics
  - sensu/sensu-influxdb-handler

Check definition

api_version: core/v2
type: CheckConfig
  namespace: default
  name: dummy-app-prometheus
  command: sensu-prometheus-collector -exporter-url http://localhost:8080/metrics
  - dummy
  publish: true
  interval: 10
  output_metric_format: influxdb_line
  - influxdb

That's right, you can collect different types of metrics (ex. Influx,
Graphite, OpenTSDB, Nagios, etc.), Sensu will extract and transform
them, and this handler will populate them into your InfluxDB.

Security Note: The InfluxDB addr, username and password are treated as a security sensitive configuration options in this example and are loaded into the handler config as env_vars instead of as a command arguments. Command arguments are commonly readable from the process table by other unprivileged users on a system (ex: ps and top commands), so it's a better practice to read in sensitive information via environment variables or configuration files as part of command execution. The command flags for these configuration options are provided as an override for testing purposes.

Installing from source and contributing

Download the latest version of the sensu-influxdb-handler from releases,
or create an executable script from this source.


Sensu-influxdb-handler uses go modules for managing package dependencies.


From the local path of the sensu-influxdb-handler repository:

go build -o /usr/local/bin/sensu-influxdb-handler main.go

To contribute to this plugin, see CONTRIBUTING

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



Either download the source code:

Download Source

Or download the asset definition: