Documentation

Automatically configure Telegraf

The InfluxDB user interface (UI) can automatically create Telegraf configuration files based on user-selected Telegraf plugins. This article describes how to create a Telegraf configuration in the InfluxDB UI and start Telegraf using the generated configuration file.

Only a subset of plugins are configurable using the InfluxDB UI. To use plugins other than those listed, you must manually configure Telegraf.

View the requirements for using Telegraf with InfluxDB v2.0.

Create a Telegraf configuration

  1. Open the InfluxDB Cloud UI.

  2. In the navigation menu on the left, select Data (Load Data) > Telegraf.

  3. Click Create Configuration.

  4. In the Bucket dropdown, select the bucket where Telegraf will store collected data.

  5. Select one or more of the available plugin groups and click Continue.

  6. 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.

    Not all available plugins are listed on this screen. For more information on manually configuring additional plugins, see Manually add Telegraf plugins.

  7. Provide a Telegraf Configuration Name and an optional Telegraf Configuration Description.

  8. Click Create and Verify.

  9. The Test Your Configuration page provides instructions for how to start Telegraf using the generated configuration. See Start Telegraf below for detailed information about what each step does.

  10. Once Telegraf is running, click Listen for Data to confirm Telegraf is successfully sending data to InfluxDB. Once confirmed, a Connection Found! message appears.

  11. Click Finish. Your Telegraf configuration name and the associated bucket name appears in the list of Telegraf configurations.

    Windows

    If you plan to monitor a Windows host using the System plugin, you must complete the following steps.

    1. In the list of Telegraf configurations, double-click your Telegraf configuration, and then click Download Config.
    2. Open the downloaded Telegraf configuration file and replace the [[inputs.processes]] plugin with one of the following Windows plugins, depending on your Windows configuration:
    1. Save the file and place it in a directory that telegraf.exe can access.

Start Telegraf

Requests to the InfluxDB v2 API must include an API token. A token identifies specific permissions to the InfluxDB instance.

Configure your token as an environment variable

  1. Find your API token. For information about viewing tokens, see View tokens.

  2. To configure your token as the INFLUX_TOKEN environment variable, run the command appropriate for your operating system and command-line tool:

export INFLUX_TOKEN=YourAuthenticationToken
$env:INFLUX_TOKEN = "YourAuthenticationToken"
set INFLUX_TOKEN=YourAuthenticationToken
# Make sure to include a space character at the end of this command.

Start the Telegraf service

Start the Telegraf service using the -config 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.

telegraf -config https://cloud2.influxdata.com/api/v2/telegrafs/0xoX00oOx0xoX00o

Manage Telegraf configurations

For more information about managing Telegraf configurations in InfluxDB, see Telegraf configurations.


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 v3 enhancements and InfluxDB Clustered is now generally available

New capabilities, including faster query performance and management tooling advance the InfluxDB v3 product line. InfluxDB Clustered is now generally available.

InfluxDB v3 performance and features

The InfluxDB v3 product line has seen significant enhancements in query performance and has made new management tooling available. These enhancements include an operational dashboard to monitor the health of your InfluxDB cluster, single sign-on (SSO) support in InfluxDB Cloud Dedicated, and new management APIs for tokens and databases.

Learn about the new v3 enhancements


InfluxDB Clustered general availability

InfluxDB Clustered is now generally available and gives you the power of InfluxDB v3 in your self-managed stack.

Talk to us about InfluxDB Clustered

InfluxDB Cloud powered by TSM