Script to periodically run the Speedtest CLI application by Ookla and post results to InfluxDB, updated for InfluxDB2
Find a file
2020-07-18 10:59:00 -04:00
.dockerignore Initial commit 2019-11-02 00:09:20 +00:00
.gitignore Install Python requirements from requirements.txt 2019-11-05 20:55:09 +00:00
Dockerfile Install Python requirements from requirements.txt 2019-11-05 20:55:09 +00:00
LICENSE Added MIT license. 2019-11-02 00:33:22 +00:00
main.py Updated to use ENV Vars 2020-07-18 10:59:00 -04:00
README.md Add clarification on speedtest-cli 2020-01-09 15:08:10 +00:00
requirements.txt Install Python requirements from requirements.txt 2019-11-05 20:55:09 +00:00

Speedtest to InfluxDB

This is a small Python script that will continuously run the Speedtest CLI application by Ookla, reformat the data output and forward it on to an InfluxDB database.

You may want to do this so that you can track your internet connections consistency over time. Using Grafana you can view and explore this data easily.

Grafana Dashboard

Using the script

Adjust the InfluxDB connection settings at the top of main.py to fit your setup and then run with one of the options listed below.

Be aware that this script will automatically accept the license and GDPR statement so that it can run non-interactively. Make sure you agree with them before running.

1. No Container

  1. Install the Speedtest CLI application by Ookla.

    NOTE: The speedtest-cli package in distro repositories is an unofficial client. It will need to be uninstalled before installing the Ookla Speedtest CLI application with the directions on their website.

  2. Install the InfluxDB client for library from Python.

    pip install influxdb

  3. Run the script.

    python3 ./main.py

2. Run with Docker or Podman

  1. Build the container.

    docker build -t aidengilmartin/speedtest-influx ./

  2. Run the container.

    docker run -d --name speedtest-influx aidengilmartin/speedtest-influx