---
title: Use Telegraf to write data
description: Use Telegraf to collect and write data to InfluxDB. Create Telegraf configurations in the InfluxDB UI or manually configure Telegraf.
url: https://docs.influxdata.com/influxdb/v2/write-data/no-code/use-telegraf/
estimated_tokens: 630
product: InfluxDB OSS v2
version: v2
publisher: InfluxData
canonical: https://docs.influxdata.com/influxdb/v2/write-data/no-code/use-telegraf/
date: '2023-09-12T23:33:31-06:00'
lastmod: '2023-09-12T23:33:31-06:00'
---

This page documents an earlier version of InfluxDB OSS.[InfluxDB 3 Core](/influxdb3/core/) is the latest stable version.

#### API token hashing is enabled by default in InfluxDB OSS 2.9.0

Stronger token security: tokens are stored as hashes on disk, so a
copy of the database file doesn’t expose usable tokens. Existing
tokens are hashed on first startup and the original strings can’t
be recovered afterward — **capture any plaintext tokens you still
need before you upgrade**.

For more information, see [Token hashing](/influxdb/v2/admin/tokens/#token-hashing).

[Telegraf](https://www.influxdata.com/time-series-platform/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.9.

For a list of available plugins, see [Telegraf plugins](/telegraf/v1/plugins/).

#### Requirements

* **Telegraf 1.9.2 or greater**.*For information about installing Telegraf, see the[Telegraf Installation instructions](/telegraf/v1//install/).*

## 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](/influxdb/v2/write-data/no-code/use-telegraf/auto-config/)

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](/influxdb/v2/write-data/no-code/use-telegraf/dual-write/)

Write data to both OSS and Cloud simultaneously.

### [Manually configure Telegraf](/influxdb/v2/write-data/no-code/use-telegraf/manual-config/)

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](/influxdb/v2/write-data/no-code/use-telegraf/use-telegraf-plugins/)

Use Telegraf plugins to capture and write metrics to InfluxDB.

![InfluxDB University](/svgs/influxdbu-full-white.svg)

#### 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](https://university.influxdata.com/courses/data-collection-with-telegraf-tutorial/)
