content/influxdb3/cloud-dedicated/write-data/use-telegraf/configure/_index.md
Use the Telegraf influxdb_v2 output plugin to collect and write metrics to
{{< product-name >}}.
Learn how to enable the plugin in new and
existing Telegraf configurations,
and then start Telegraf using the custom configuration file.
<!-- TOC -->[!Note] View the requirements for using Telegraf with {{< product-name >}}.
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 followed Setup instructions in the Get Started tutorial to set up InfluxDB and configure authentication credentials.
To add any of the available Telegraf plugins, follow the steps below.
telegraf.conf).To send data to {{< product-name >}}, enable the
influxdb_v2 output plugin
in the telegraf.conf.
{{% code-placeholders "DATABASE_NAME" %}}
[[outputs.influxdb_v2]]
urls = ["https://{{< influxdb/host >}}"]
# INFLUX_TOKEN is an environment variable you created for your database WRITE token
token = "${INFLUX_TOKEN}"
organization = ""
bucket = "DATABASE_NAME"
{{% /code-placeholders %}}
Replace the following:
DATABASE_NAME: the name of the InfluxDB database to write data toThe InfluxDB output plugin configuration contains the following options:
urlsAn array of URL strings. To write to {{% product-name %}}, include your {{% product-name omit=" Clustered" %}} cluster URL using the HTTPS protocol:
["https://{{< influxdb/host >}}"]
tokenYour {{% product-name %}} database token with write permission to the database.
In the examples, INFLUX_TOKEN is an environment variable assigned to a
database token that
has write permission to the database.
organizationFor {{% product-name %}}, set this to an empty string ("").
bucketThe name of the {{% product-name %}} database to write data to.
[!Note]
Write to InfluxDB v1.x and {{% product-name %}}
If a Telegraf agent is already writing to an InfluxDB v1.x database, enabling the InfluxDB v2 output plugin will write data to both v1.x and your {{< product-name omit="Clustered" >}} cluster.
influx_uint_support: supported in InfluxDB 3.
For more plugin options, see influxdb on GitHub.
Start the Telegraf service using the --config flag to specify the location of your telegraf.conf.
telegraf --config /path/to/custom/telegraf.conf