Telegraf is a monitoring agent application developed by InfluxData as part of Tick Stack. This application is written in Go and is used for collecting system performance metrics. Telegraf can collect metrics from a wide array of inputs and write them into a wide array of outputs. It is plugin-driven for both collection and output of data so it is easily extendable.

install telegraf debian

With over 200+ plugins available written by subject matter experts on the data in the community, it is easy to start collecting metrics from your end-points. You can easily add new inputs and outputs to suit your monitoring desires.

How To Install Telegraf on Debian 10 – Buster

In this guide, I’ll show you how to install and configure Telegraf on Debian 10 (Buster) Linux system.

Step 1: Update System

Update your Debian system.

sudo apt update && sudo apt -y upgrade

Step 2: Add Influxdata repository

The pre-packaged Go binaries for Telegraf are available on Influxdata repository.

Import repository GPG key.

sudo apt install -y gnupg2 curl wget
wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -

Add InfluxDB APT repository using the command below.

echo "deb https://repos.influxdata.com/debian buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.list

Once the repository is added, install Telegraf on Debian 10 (Buster).

sudo apt update
sudo apt -y install telegraf

Step 3: Configure Telegraf on Debian 10

Start and enable telegraf service.

$ systemctl status telegraf
● telegraf.service - The plugin-driven server agent for reporting metrics into InfluxDB
   Loaded: loaded (/lib/systemd/system/telegraf.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-10-23 16:10:04 UTC; 27s ago
     Docs: https://github.com/influxdata/telegraf
 Main PID: 7514 (telegraf)
    Tasks: 10 (limit: 4719)
   Memory: 23.1M
   CGroup: /system.slice/telegraf.service
           └─7514 /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d

Oct 23 16:10:04 deb10 telegraf[7514]: 2019-10-23T16:10:04Z I! Loaded aggregators:
Oct 23 16:10:04 deb10 telegraf[7514]: 2019-10-23T16:10:04Z I! Loaded processors:
Oct 23 16:10:04 deb10 telegraf[7514]: 2019-10-23T16:10:04Z I! Loaded outputs: influxdb
Oct 23 16:10:04 deb10 telegraf[7514]: 2019-10-23T16:10:04Z I! Tags enabled: host=deb10
Oct 23 16:10:04 deb10 telegraf[7514]: 2019-10-23T16:10:04Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"deb10", Flush Interval:10s
Oct 23 16:10:04 deb10 telegraf[7514]: 2019-10-23T16:10:04Z W! [outputs.influxdb] when writing to [http://localhost:8086]: database "" creation fail
Oct 23 16:10:20 deb10 telegraf[7514]: 2019-10-23T16:10:20Z E! [outputs.influxdb] when writing to [http://localhost:8086]: Post http://localhost:808
Oct 23 16:10:20 deb10 telegraf[7514]: 2019-10-23T16:10:20Z E! [agent] Error writing to outputs.influxdb: could not write any address
Oct 23 16:10:30 deb10 telegraf[7514]: 2019-10-23T16:10:30Z E! [outputs.influxdb] when writing to [http://localhost:8086]: Post http://localhost:808

The main configuration file for telegraf is /etc/telegraf/telegraf.conf. Most sections are commented out, but you can uncomment to unlock the inputs, outputs and configurations you wish to use.

We have a guide on monitoring of Linux system with Telegraf and Grafana:

Monitor Linux System with Grafana and Telegraf

This requires InfluxDB and Grafana installed, use below guides:

Install InfluxDB on Debian

Install Grafana on Debian

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!


As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here