Use Telegraf to write data

Telegraf is InfluxData’s data collection agent for collecting and reporting metrics. Its vast library of input plugins and “plug-and-play” architecture lets you quickly and easily collect metrics from many different sources. This article describes how to use Telegraf to collect and store data in InfluxDB 2.7.

For a list of available plugins, see Telegraf plugins.

Requirements

Configure Telegraf

Telegraf input and output plugins are enabled and configured in Telegraf’s configuration file (telegraf.conf). You have the following options for configuring Telegraf:

Automatically configure Telegraf

Use the InfluxDB UI to automatically generate a Telegraf configuration, then start Telegraf using the generated configuration file.

Dual write to InfluxDB OSS and InfluxDB Cloud

Write data to both OSS and Cloud simultaneously.

Manually configure Telegraf

Update existing or create new Telegraf configurations to use the influxdb_v2 output plugin to write to InfluxDB. Start Telegraf using the custom configuration.

Use Telegraf plugins

Use Telegraf plugins to capture and write metrics to InfluxDB.

InfluxDB University

Data Collection with Telegraf

Learn how to use Telegraf to make data time series data collection easy in this free InfluxDB University course.

Take the course