Use Kapacitor with InfluxDB OSS

Support for stream tasks

InfluxDB Cloud and InfluxDB OSS 2.1 do not have subscription APIs and do not support Kapacitor stream tasks, but you can continue to use stream tasks by writing data directly to Kapacitor. For more information, see .

On this page

To connect Kapacitor to InfluxDB Cloud or InfluxDB OSS 2.1, update the section(s) of your Kapacitor configuration file:

Provide your InfluxDB URL in the [[influxdb]].urls configuration option. For more information, see InfluxDB Cloud regions or .

  • username: InfluxDB username
  • password: InfluxDB API token

Kapacitor is subject to InfluxDB token permission restrictions. To query or write to an InfluxDB bucket, the InfluxDB token must have read and/or write permissions for the target bucket. For information about token permissions, see .

InfluxDB Cloud and InfluxDB OSS 2.1 do not have subscriptions APIs. Set the [[influxdb]].disable-subscriptionsto true to disable InfluxDB subscriptions.

Kapacitor batch tasks use the endpoint of the 1.x compatibility API and require no change to use with InfluxDB Cloud and InfluxDB OSS. For information about writing back to InfluxDB in Kapacitor tasks, see Write back to InfluxDB below.

We recommend using to write data to both InfluxDB Cloud or OSS and Kapacitor. The following example Telegraf configuration writes data to both InfluxDB and Kapacitor:

Example Telegraf configuration

If using the Kapacitor InfluxDBOut node to write data to InfluxDB Cloud or OSS 2.1, InfluxDB maps the specified database and retention policy to a corresponding bucket. You can also manually map database/retention policy combinations (DBRPs) to buckets. For more information, see and Map unmapped buckets.

The following example TICKscript writes to the my-db/my-rp bucket in InfluxDB Cloud or InfluxDB OSS 2.1.