Monitoring Your Home Network with Raspberry Pi and Grafana
raspberry pigrafanamonitoringinfluxdbnetwork
Build a dashboard showing bandwidth, device status, latency, and uptime.
Stack
- Telegraf — collects metrics
- InfluxDB — time-series database
- Grafana — dashboards
Install InfluxDB and Telegraf
# Add InfluxData repository per their docs at docs.influxdata.com
sudo apt install influxdb2 telegraf -y
sudo systemctl enable influxdb telegraf
Install Grafana
# ARM package from grafana.com/grafana/download?platform=arm
sudo dpkg -i grafana-rpi_[version]_armhf.deb
sudo systemctl enable --now grafana-server
Configure Telegraf for Network Monitoring
Edit /etc/telegraf/telegraf.conf:
[[inputs.ping]]
urls = ["8.8.8.8", "192.168.1.1"]
count = 4
interval = "30s"
[[inputs.net]]
interfaces = ["eth0"]
[[inputs.netstat]]
Grafana Setup
- Access at
http://raspberrypi.local:3000 - Add InfluxDB as data source
- Import Dashboard ID 928 (Telegraf system metrics) or build custom
Useful Panels
- Ping latency to gateway and internet
- Network throughput over time
- Device online status (green/red)
- Interface error counts