Smokeping is a self-contained network monitoring app , capable of monitoring using ICMP/Ping, HTTP, DNS -- as well as other signals generated from CLI monitoring tools (e.g. curl, dig, mtr etc). It provides a web-based monitoring UI to chart the probe measurements so no further monitoring apps (like Prometheus) are needed.
Running smokeping on a $5 Raspberry Pi Zero is a fun experiment in lightweight computing . Using Apache Mod FastCGI makes the app usable on the meager hardware.
By the end of the exercise you'll have the smokeping probes running to test network performance and the UX available on your local network onhttp://raspberrypi.local/smokeping
Prerequisites
- Pi Zero
- MicroSD 4GB+
- A windows or mac machine to run image installation & configuration
- wifi for installing packages
1. Install RaspberryPi OS using the Imager
- Download & Install Raspberry Pi Imager
- Select RaspberryPi OS Lite 32bit from the Advanced menu
- [new] Use the cog / settings menu to enable SSH, set hostname & set WIFI credentials . ⚠️ Don't Skip this step: RaspberryPi OS no longer supports default user credentials.
- Write the image to your Micro SD
2. Boot & SSH into the device and update the device (optional)
- SSH into the device e.g.
ssh pi@raspberrypi.local
- update your catalog
sudo apt update
- (optional ~15min) update your installed packages
sudo apt upgrade
3. Install smokeping, apache2 & fastCGI
- install apache, smokeping & fast-cgi (to improve loading times) \
$ sudo apt install apache2 fping curl smokeping libapache2-mod-fcgid
- enable smokeping
$ sudo a2enconf smokeping
- restart and test that smokeping default site is working by visiting
http://raspberrypi.local/
in your browser
At this point you will see the default smokeping installation with minimal example probes
4 Enable smokeping configuration
- activate fastcgi and set smokeping to default by adding this block to
/etc/apache2/conf-available/smokeping.conf
(after Line 3)
# redirect / to /smokeping
RedirectMatch ^/$ /smokeping/
# activate fastcgi to improve performance
<Location /smokeping/smokeping.cgi>
SetHandler fcgid-script
</Location>
5 Edit Targets and Test
Here is the example head of the Targets config to probe your home router
$ head -n 19 /etc/smokeping/config.d/Targets
***Targets***
probe = FPing
menu = Top
title = Network Latency Grapher
remark = Welcome to the SmokePing website of WORKS Company. \
Here you will learn all about the latency of our network.
+ Home
menu = Home
title = Home
++ Gateway
menu = Gateway
title = Gateway
host = 192.168.1.1
6 Follow Up & Next Steps
At this point your probes should be running regularly and collecting historical measurements.
I recommend adding the following probes
- Your ISP's first and second HOPs (use
traceroute
to identify the IP addresses) - any streaming services e.g. Netflix, Youtube
- Assign fixed IPs to your devices like PS4, laptop, phone and probe them in your home to catch performance issues.
Top comments (0)