Automatically configure Telegraf
View the requirements for using Telegraf with InfluxDB v2.1.
Open the InfluxDB UI (default: ).
In the navigation menu on the left, select Data (Load Data) > Telegraf.
Load Data
In the Bucket dropdown, select the bucket where Telegraf will store collected data.
Select one or more of the available plugin groups and click Continue.
Review the list of Plugins to Configure for configuration requirements. Plugins listed with a require no additional configuration. To configure a plugin or access plugin documentation, click the plugin name.
Adjust configuration settings as needed. To find configuration settings for a specific plugin, see Telegraf plugins.
Click Save and Test.
The Test Your Configuration page provides instructions for how to start Telegraf using the generated configuration. See below for detailed information about what each step does.
Once Telegraf is running, click Listen for Data to confirm Telegraf is successfully sending data to InfluxDB. Once confirmed, a Connection Found! message appears.
Click Finish. Your Telegraf configuration name and the associated bucket name appears in the list of Telegraf configurations.
If you plan to monitor a Windows host using the System plugin, you must complete the following steps.
Open the downloaded Telegraf configuration file and replace the plugin with one of the following Windows plugins, depending on your Windows configuration:
- Save the file and place it in a directory that telegraf.exe can access.
Find your API token. For information about viewing tokens, see View tokens.
To configure your API token as the environment variable, run the command appropriate for your operating system and command-line tool:
Start the Telegraf service using the flag to specify the location of the generated Telegraf configuration file.
- For Windows, the location is always a local file path.
- For Linux and macOS, the location can be a local file path or URL.
Telegraf starts using the Telegraf configuration pulled from InfluxDB API.
InfluxDB host URLs and ports differ between InfluxDB OSS and InfluxDB Cloud. For the exact command, see the Telegraf configuration Setup Instructions in the InfluxDB UI.
For more information about managing Telegraf configurations in InfluxDB, see .