Press "Enter" to skip to content

How to install telegraf and Raspberry pi dashboard in Grafana

bist 0

This guide assumes you already have influxdb and grafana up and running.

To monitor our raspberry pi we need to install telegraf and do some stuff to the config file. I tried prometheus but it didn’t give me all the info I needed, like temperatures.

Telegraf install

curl -sL | sudo apt-key add -
curl -sL | sudo apt-key add -
echo "deb buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
echo "deb stable main" | sudo tee /etc/apt/sources.list.d/grafana.list
sudo apt-get update

Now that all the repository lists and their dependencies are up to date, the actual installation can happen, followed by enabling and starting the services.

sudo apt-get install -y telegraf
sudo systemctl enable  telegraf
sudo systemctl start  telegraf

Configure telegraf to log to the influx DB

[email protected]:~ $ sudo nano /etc/telegraf/telegraf.conf
   urls = ["http://your influx server:8086"]

Collector Configuration Details

Linux and machine performance:

  • CPUs (defaults to all)
  • Disks (per-disk IOPS)
  • Network interfaces (packets, bandwidth, errors/drops)
  • Mountpoints (space / inodes)
  • Temperature
#In order to monitor both Network interfaces, eth0 and wlan0, uncomment, or add the next:


  files = ["/sys/class/thermal/thermal_zone0/temp"]
  name_override = "cpu_temperature"
  data_format = "value"
  data_type = "integer"

  commands = ["/opt/vc/bin/vcgencmd measure_temp"]
  name_override = "gpu_temperature"
  data_format = "grok"
  grok_patterns = ["%{NUMBER:value:float}"]

To be able for telegraf to gather info about the GPU, we need to add the telegraf user into video group:

sudo usermod -G video telegraf

Grafana dashboard

Dashboard ID


Leave a Reply

Your email address will not be published. Required fields are marked *