Documentation

Troubleshoot Telegraf

Validate your Telegraf configuration with --test

Run a single telegraf collection, outputting metrics to stdout: telegraf --config telegraf.conf --test

Use the --once option to single-shot execute

Once tested, run telegraf --config telegraf.conf --once to perform a single-shot execution of all configured plugins. This sends output to partner systems specified in the telegraf.conf rather than writing to stdout.

Add outputs.file to read to a file or STDOUT

The following step might be helpful if:

  • You’re encountering issues in your output and trying to determine if it’s an issue with your configuration or connection.
  • -test outputs metrics to stdout as expected and your input, parsers, processors, and aggregators are configured correctly. Note that if it’s a listener plugin, -test wouldn’t output any metrics right away.

Add the file output plugin with the metrics reporting to STDOUT or to a file.

[[outputs.file]]
  files = ["stdout"]

Set debug = true in your settings

When you set debug = true in global settings, Telegraf runs with debug log messages.

2021-06-28T19:18:00Z I! Starting Telegraf 1.19.0
2021-06-28T19:18:00Z I! Loaded inputs: cpu disk diskio mem net processes swap system
2021-06-28T19:18:00Z I! Loaded aggregators:
2021-06-28T19:18:00Z I! Loaded processors:
2021-06-28T19:18:00Z I! Loaded outputs: influxdb_v2
2021-06-28T19:18:00Z I! Tags enabled: host=MBP15-INFLUX.local
2021-06-28T19:18:00Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"MBP15-INFLUX.local", Flush Interval:30s
2021-06-28T19:18:00Z D! [agent] Initializing plugins
2021-06-28T19:18:00Z D! [agent] Connecting outputs
2021-06-28T19:18:00Z D! [agent] Attempting connection to [outputs.influxdb_v2]
2021-06-28T19:18:00Z D! [agent] Successfully connected to outputs.influxdb_v2
2021
-06-28T19:18:00Z D! [agent] Starting service inputs

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