A Python script to capture speedtest JSON and insert it into a database.
This script was written to track internet speed using Ookla's speed test.
This repository contains the SQL schema and the Grafana dashboard JSON so you can track your own metrics.
- speedtest binary from Ookla; I'm using the Linux binary here. (Installed automatically if using Dockerfile.)
- MySQL database, built with the database/speedtest_database.sql schema, to store results.
- Set environment variables (DB_HOST, DB_USERNAME, DB_PASSWORD) in
docker-compose.yml
OR in your environment if not using Docker.
- See pyproject.toml
- To run the Python script:
python speedtest_monitor.py
- In order to use the provided
grafana_dashboard.json
file, you'll need to use the SQL schema provided inspeedtest_database.sql
AND a Grafana MySQL Data Source named "SpeedTest".
- Grafana dashboard layout borrowed from speedtest_exporter.
- Aaron Melton - Author - Aaron Melton aaron@aaronmelton.com