Docker image (or Python script) to save internet speedtest into MySQL database.
- Download source code
- Edit Dockerfile to change local variables
Variable Default value Description DB_HOST host Ip of db host DB_PORT port db port DB_USER user db user DB_PASSWD pwd db password DB_DATABASE db db name TIME 1800 time between tests - Build Docker image
docker build --tag speedtest .
- Create container
docker create --name Speedtest speedtest
- Start container
docker start Speedtest
In some distributon, like Synology DSM, you must execute the commands above with sudo
.
- Dowload Docker image from DockerHub
docker pull fantinialex/speedtest-to-mysql
- Create a new container
docker create --name Speedtest fantinialex/speedtest-to-mysql
- Edit local variables value
Variable Default value Description DB_HOST host Ip of db host DB_PORT port db port DB_USER user db user DB_PASSWD pwd db password DB_DATABASE db db name TIME 1800 time between tests - Start container
docker start Speedtest
Why you memorize the ISP? This script is designed for a network with redoundance connection, so the easy way to know what connection is active is saving the Isp name.
Do you want to easy view this datas? You can use Grafana (coming soon ;)).