I built this tool for a blog post I wrote about my internet speed during the pandemic, which can be found here.
This tool runs an Ansible playbook in a Docker container to provision a Raspberry Pi for the purpose of monitoring internet speed.
- Tested on Raspberry Pi OS Lite (64-bit) with a Raspberry Pi 4 Model B.
- Using OS version:
2022-09-22-raspios-bullseye-arm64-lite.img.xz
(but later versions should also work!).
- Raspberry Pi 3 Model B+ or 4 Model B (Gigabit capable)
- Docker >= v20.10.17
- GNU Make >= 4.3
- InfluxDB v2.4.0
- Grafana v9.2.0
- Cron job for running
speedtest.py
script- Speedtest CLI v1.2.0
- influxdb-client-python v1.33.0
-
Install Docker.
-
Install GNU Make (if your OS doesn't provide it by default).
-
Generate an SSH key to access the Raspberry Pi with.
$ ssh-keygen
-
Use the Raspberry Pi Imager to install Raspberry Pi OS Lite (64-bit) to your SD card.
-
Ensure you have
Enable SSH
andAllow public-key authentication only
options set with your SSH key's public key. -
Insert the SD card into your Pi.
-
Connect your Pi to the same LAN as your PC and power it on.
-
Run the following command to provision your Pi.
You can specify any of the following parameters to customize the installation.
# You can specify any of the following parameters to customize the installation. # Defaults: # HOST=raspberrypi.local [Address of the Raspberry Pi] # SSH_USER=pi [SSH user] # SSH_KEY=~/.ssh/id_rsa [Location of the SSH private key] # CRON='*/30 * * * *' [Speedtest interval (Every 30 minutes)] $ make [HOST='...'] [SSH_USER='...'] [SSH_KEY='...'] [CRON='...']
-
Access your Internet Speed Monitor Grafana dashboard here, with
admin:admin
. -
You should see new data points every 30 minutes (by default).