Skip to content

Python script to monitor your internet speed! ๐Ÿš€ Periodically run librespeed/speedtest-cli and send results to InfluxDB.

License

Notifications You must be signed in to change notification settings

dbrennand/speeder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

49 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Speeder

Build Lint

Python script to monitor your internet speed! ๐Ÿš€

Periodically run librespeed/speedtest-cli and send results to InfluxDB.

Quick Start

Note The assumption is made that you've already setup InfluxDB 2.x.x. Alternatively, you can use the Docker Compose method where this is setup for you.

List available server IDs:

docker run --rm -it ghcr.io/dbrennand/speeder:latest /librespeed --list

Next, start and configure speeder using the environment variables:

docker run -itd --rm --name speeder \
    -e "SPEEDER_SPEEDTEST_INTERVAL=300" \
    -e "SPEEDER_SPEEDTEST_SERVER_ID=49" \
    -e "SPEEDER_INFLUXDB_HOST=influx.example.com" \
    -e "SPEEDER_INFLUXDB_TOKEN=<Token>" \
    -e "SPEEDER_INFLUXDB_ORG=speeder" \
    -e "SPEEDER_INFLUXDB_BUCKET=speeder" \
    ghcr.io/dbrennand/speeder:latest

Environment Variables

The speeder script is configured using the below environment variables:

Name Description Default Value
SPEEDER_SPEEDTEST_INTERVAL Interval in seconds to run speedtests on. 300
SPEEDER_SPEEDTEST_SERVER_ID Server ID to run speedtests against. Supports multiple IDs using a comma separated string. ""
SPEEDER_INFLUXDB_HOST InfluxDB hostname. influxdb
SPEEDER_INFLUXDB_PORT InfluxDB port. 8086
SPEEDER_INFLUXDB_TOKEN InfluxDB token. root
SPEEDER_INFLUXDB_ORG InfluxDB organisation name. speeder
SPEEDER_INFLUXDB_BUCKET InfluxDB bucket name to write speedtest results to. speeder

Docker Compose Stack - InfluxDB and Grafana

The docker-compose.yml file in this repository will deploy speeder, InfluxDB 2.7.1 and Grafana containers. Grafana will be provisioned with InfluxDB as the data source and the pre-created dashboard:

Dashboard

Dashboard 1

  1. Set the SPEEDER_SPEEDTEST_SERVER_ID environment variable located in the .env file to the server IDs to perform speedtests against.

    Note

    If you don't know any server IDs, run the following command to list them:

    docker run --rm -it ghcr.io/dbrennand/speeder:latest /librespeed --list
  2. Set the DOCKER_INFLUXDB_INIT_PASSWORD, DOCKER_INFLUXDB_INIT_ADMIN_TOKEN and GF_SECURITY_ADMIN_PASSWORD environment variables located in the .env file.

  3. Start the compose stack:

    docker compose up -d

Grafana will be accessible at http://localhost:3000 and your host's IP address.

Disclaimer

I did NOT create the LibreSpeed project or CLI. The great folks over at LibreSpeed did.

If you like this project then please give their repositories a star! โญ

Authors -- Contributors

Daniel Brennand - Author

License

This project is licensed under the MIT License - see the LICENSE for details.

About

Python script to monitor your internet speed! ๐Ÿš€ Periodically run librespeed/speedtest-cli and send results to InfluxDB.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages