kanejaku.org

Grafana + InfluxDB + Telegraf to monitor Raspberry Pi

8 Nov 2020

I was planning to do spare-time programming this weekend but I couldn’t think straight so I did something different for a change.

Several weeks ago, I wrote a Prometheus exporter which records speedtest results. Currently it is running on a VM which lives in my desktop computer. I want to move the exporter to a Raspberry Pi 4 device.

Before moving the exporter, I thought it would be better to set up a nice visualization tool, not only for the exporter but metrics (CPU usage, tempurature etc) of the device. I searched the Web and Grafana looked a good candidate.

My initial attempt was to use Prometheus as a data source of device metrics, but I noticed that someone already created a nice dashboard for Raspberry Pi monitoring which doesn’t use prometheus.

I ended up following nicolargo/docker-influxdb-grafana.

Understanding and searching these tools (Grafana, InfluxDB and Telegraf) took some time, but all I had to do was writing a few configuration files to get the following dashboard. Now I understand why people say docker-compose is great.