Documentation

Configure Telegraf to write to InfluxDB 3 Enterprise

InfluxDB 3 Enterprise is in Public Beta

InfluxDB 3 Enterprise is in public beta and available for testing and feedback, but is not meant for production use yet. Both the product and this documentation are works in progress. We welcome and encourage your input about your experience with the beta and invite you to join our public channels for updates and to share feedback.

Beta expectations and recommendations

Use the Telegraf influxdb_v2 output plugin to collect and write metrics to InfluxDB 3 Enterprise. This plugin uses the InfluxDB v2 HTTP API write endpoint available with InfluxDB 3 Enterprise. Learn how to enable and configure the influxdb_v2 output plugin to write data to InfluxDB 3 Enterprise.

View the requirements for using Telegraf with InfluxDB 3 Enterprise.

Configure Telegraf input and output plugins

Configure Telegraf input and output plugins in the Telegraf configuration file (typically named telegraf.conf). Input plugins collect metrics. Output plugins define destinations where metrics are sent.

This guide assumes you have already installed InfluxDB 3 Enterprise and have been through the getting started guide.

Add Telegraf plugins

To add any of the available Telegraf plugins, follow the steps below.

  1. Find the plugin you want to enable from the complete list of available Telegraf plugins.
  2. Click View to the right of the plugin name to open the plugin page on GitHub. For example, view the MQTT plugin GitHub page.
  3. Copy and paste the example configuration into your Telegraf configuration file (typically named telegraf.conf).

Enable and configure the InfluxDB v2 output plugin

To send data to InfluxDB 3 Enterprise, enable the influxdb_v2 output plugin in the telegraf.conf.

[[outputs.influxdb_v2]]
  urls = ["http://localhost:8181"]
  token = "
AUTH_TOKEN
"
organization = "" bucket = "
DATABASE_NAME
"
  • Copy
  • Fill window

Replace the following:

  • DATABASE_NAME: the name of the database to write data to

  • AUTH_TOKEN: your InfluxDB 3 Enterprise authorization token. Store this in a secret store or environment variable to avoid exposing the raw token string.

    While in beta, InfluxDB 3 Enterprise does not require an authorization token. For the token option, provide an arbitrary, non-empty token string.

The InfluxDB output plugin configuration contains the following options:

urls

An array of URL strings. To write to InfluxDB 3 Enterprise, include your InfluxDB 3 Enterprise URL:

["http://localhost:8181"]
  • Copy
  • Fill window

token

Your InfluxDB 3 Enterprise authorization token.

While in beta, InfluxDB 3 Enterprise does not require an authorization token. For the token option, provide an arbitrary, non-empty token string.

Store your authorization token as an environment variable

To prevent a plain text token in your Telegraf configuration file, we recommend that you store the token as an environment variable and then reference the environment variable in your configuration file using string interpolation. For example:

[[outputs.influxdb_v2]]
  urls = ["http://localhost:8181"]
  token = "${INFLUX_TOKEN}"
  # ...
  • Copy
  • Fill window

organization

For InfluxDB 3 Enterprise, set this to an empty string ("").

bucket

The name of the InfluxDB 3 Enterprise database to write data to.

An InfluxDB v2 bucket is synonymous with an InfluxDB 3 Enterprise database.

Other Telegraf configuration options

For more plugin configuration options, see the influxdb_v2 output plugin README on GitHub.

Start Telegraf

Start the Telegraf service using the --config flag to specify the location of your telegraf.conf.

telegraf --config /path/to/custom/telegraf.conf
  • Copy
  • Fill window

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.

Read more

InfluxDB 3 Core and Enterprise are now in Beta

InfluxDB 3 Core and Enterprise are now available for beta testing, available under MIT or Apache 2 license.

InfluxDB 3 Core is a high-speed, recent-data engine that collects and processes data in real-time, while persisting it to local disk or object storage. InfluxDB 3 Enterprise is a commercial product that builds on Core’s foundation, adding high availability, read replicas, enhanced security, and data compaction for faster queries. A free tier of InfluxDB 3 Enterprise will also be available for at-home, non-commercial use for hobbyists to get the full historical time series database set of capabilities.

For more information, check out: