/speedtest-logger

Runs an internet speed to periodically and save the result to InfluxDB

Primary LanguageGoGNU General Public License v3.0GPL-3.0

Speedtest logger

GitHub Workflow Status Go Report Card GitHub release (latest by date) GitHub

Speedtest logger runs an internet speedtest using Librespeed at a regular interval and saves it to InfluxDB.

Usage

Docker-compose

version: '3'
services:
  speedtest-logger:
     image: jacobbaungard/speedtest-logger
     container_name: speedtest-logger
     environment:
        - INFLUX_ADDRESS="http://localhost:8086"
        - INFLUX_ORG="ORG"
        - INFLUX_BUCKET="BUCKET"
        - INFLUX_TOKEN="TOKEN"
        - CRON_SPEC="0 * * * *"

The examples directory contains full examples with InfluxDB included, as well as an example using InfluxDB 1.8+.

Configuration

The following configuration options are available.

Setting Description
CRON_SPEC When to run the speedtest in regular cron format
INFLUX_ADDRESS Address to InfluxDB server, example http://localhost:8086
INFLUX_ORG InfluxDB Organisation ID (InfluxDB 2)
INFLUX_BUCKET InfluxDB Bucket ID (InfluxDB 2)
INFLUX_TOKEN InfluxDB Authentication Token (InfluxDB 2)
INFLUX_USERNAME InfluxDB Username (InfluxDB 1.8+)
INFLUX_PASSWORD InfluxDB Password (InfluxDB 1.8+)
INFLUX_DATABASE InfluxDB Database (InfluxDB 1.8+)
LOG_LEVEL Log level: debug, info (default), warn, error
LIBRESPEED_SERVER By default a server is chosen based on lowest ping. Use this option to use a specific for the speedtests. A list of server IDs can be found here.

Similar tools