Telegraf Tips from InfluxDB University Experts

Navigate to:

Telegraf is a very powerful open source plugin-based agent that gathers data from stacks, sensors, and systems and sends it to a database. It collects data from an input and sends it to an output, and gives you the option to transform data with aggregators and processors before it reaches its endpoint. Getting started with Telegraf can have a bit of a learning curve, but luckily InfluxDB University has a free hands-on course taught by the Telegraf maintainers that can help any new user become a Telegraf expert. Here are a couple of tips and tricks from the course that address common connection issues that new Telegraf users might run into.


Connecting input to output

If you’ve configured and run Telegraf but you’re not seeing any data in InfluxDB, you should try checking the ‘’’telegraf.log’’’ and ‘’’stdout’’’ files because they might have warnings or errors. You can also try running Telegraf with the [--once flag]( which can help you figure out if your issue is an input or an output problem. The --debug flag is another good command to try. It gives a more detailed output log of what Telegraf is doing. You should also check that your API token for InfluxDB was properly exported.

If you’ve checked all of this, you’re not finding any errors with the --test flag, and Telegraf still isn’t writing data out, it could be that your metrics have been dropped. Normally when this happens there’s an error message, but if your metric buffer is full, older metrics are rewritten with newer ones. You can change the size of your metric buffer with the metric_buffer_limit setting in your configuration file. You should also check your input connections to make sure you have the correct permissions to send data.

Troubleshooting your configuration

Setting up your Telegraf configuration properly is very important, and it’s also a common place users run into errors. To start off, look at the ‘’’’’’ file and the documentation for the plugins you’re using. These have information such as sample configurations, expected metric formats, and potential issues users should be aware of. One of the most common mistakes people run into is the ‘’’TOML’’’ format that configuration files are written in. It has both single brackets and double brackets as well as a specific order you need to follow. Each ‘’’’’’ file has tips for how to handle this and set up your configuration. If you’re still having problems, you can send a message to the Telegraf channel in the InfluxData community Slack to get help.

Become a Telegraf expert

Learn more about collecting and transforming data with Telegraf, including more expert troubleshooting advice in the free self-paced InfluxDB University course, Data Collection with Telegraf. By completing this course, you’ll earn a sharable digital badge in recognition of your accomplishment. We’ll see you in class!