napalmzrpi/speedtest
A speed2influx modified version using a better speedtest cli.
883
This is an adaptation of "Speedtest-for-InfluxDB-and-Grafana" script with a more powerfull speedtest cli. I also added a HEALTHCHECK.
SpeedTest cli is taken here: https://github.com/taganaka/SpeedTest TEMPORARILY MOVED TO https://github.com/gglluukk/SpeedTest due to pending fix in main repo.
The original Dockerfile can be found here: https://github.com/elRadix/Speedtest-for-InfluxDB-and-Grafana
According to original version, you need 2 additional container to run a perfect speed monitoring hub at home. This is mine home setup:
version: '2'
services:
influxdb:
image: influxdb:1.8.4
container_name: speedtest_db
hostname: speedtest_db
environment:
INFLUXDB_DB: speedtests
INFLUXDB_ADMIN_USER: speed
INFLUXDB_ADMIN_PASSWORD: test
INFLUXDB_HTTP_AUTH_ENABLED: "true"
TZ: Europe/Rome
volumes:
- /your/local_path/speedtest/influxdb:/var/lib/influxdb
restart: always
speedtest:
image: napalmzrpi/speedtest:influxdb1
container_name: speedtest_engine
environment:
TZ: Europe/Rome
volumes:
- /your/local_path/speedtest/config.ini:/src/config.ini
depends_on:
- influxdb
restart: always
grafana:
image: grafana/grafana:latest
container_name: speedtest_gui
environment:
TZ: Europe/Rome
ports:
- 3000:3000
volumes:
- /your/local_path/speedtest/grafana:/var/lib/grafana
depends_on:
- influxdb
restart: always
My config.ini file:
[GENERAL]
# Every 5 minutes
Delay = 300
[INFLUXDB]
Address = speedtest_db
Port = 8086
Database = speedtests
Username = speed
Password = test
Verify_SSL = False
[SPEEDTEST]
# Leave blank to auto pick server
Server =
[LOGGING]
# Valid Options: critical, error, warning, info, debug
Level = debug
NEW VERSION - Now using Influxdb2 and ENV variable, "config.ini" file no longer needed.
version: '3'
services:
speedtest2_db:
image: influxdb:2.7
container_name: speedtest2_db
hostname: speedtest2_db
environment:
DOCKER_INFLUXDB_INIT_MODE: setup
DOCKER_INFLUXDB_INIT_USERNAME: speedtest
DOCKER_INFLUXDB_INIT_PASSWORD: speedtest
DOCKER_INFLUXDB_INIT_ORG: speedtest
DOCKER_INFLUXDB_INIT_BUCKET: speedtests
#DOCKER_INFLUXDB_INIT_RETENTION=1w
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: VeryLooooooooooooooooooooooooongToken==
TZ: Europe/Rome
volumes:
- /your/local_path/speedtest2/influxdb/data:/var/lib/influxdb2
- /your/local_path/speedtest2/influxdb/config:/etc/influxdb2
restart: always
######
speedtest2_engine:
image: napalmzrpi/speedtest:influxdb2
container_name: speedtest2_engine
environment:
TZ: Europe/Rome
# Delay and output
GENERAL_DELAY: 600
GENERAL_OUTPUT: true
# Connection to InfluxDb2
INFLUX_URL: http://speedtest2_db:8086
INFLUX_TOKEN: VeryLooooooooooooooooooooooooongToken==
INFLUX_ORG: speedtest
INFLUX_BUCKET: speedtests
# Choose server, Leave blank to auto pick server
SPEEDTEST_SERVER:
depends_on:
- speedtest2_db
restart: always
######
speedtest2_gui:
image: grafana/grafana:latest
container_name: speedtest2_gui
environment:
TZ: Europe/Rome
ports:
- 3000:3000
volumes:
- /your/local_path/speedtest2/grafana:/var/lib/grafana
depends_on:
- speedtest2_db
restart: always
docker pull napalmzrpi/speedtest