Docker setup consisting out of Grafana incl. a pre-configured dashboard, InfluxDB and a speedtest.net CLI test runner.
- Make sure you've installed all requirements
- Clone this repository:
git clone https://github.com/MrMegaNova/docker-speedtest-grafana
- Create a copy of the sample
.env
file and adjust it at will:
cp .env.sample .env
- Spin up the containers:
docker-compose up -d
You can make use of the following environment variables / configurations:
Environment variable | Default value | Description |
---|---|---|
GRAFANA_PORT |
3000 |
Port to bind Grafana webinterface on the host system |
SPEEDTEST_SPEEDTEST_INTERVAL |
3600 |
Interval/pause (in seconds) between speedtests |
SPEEDTEST_HOST |
local |
Display name of the client |
SPEEDTEST_SERVER |
none | Optionally set specific speedtest.net server ID, otherwise use the closest |
INFLUXDB_DB |
speedtest |
Database to save speedtest results |
INFLUXDB_HOST |
influxdb |
Name of the InfluxDB host/containers |
INFLUXDB_USERNAME |
root |
Username for InfluxDB authentication |
INFLUXDB_PASSWORD |
root |
Password for InfluxDB authentication |
$ docker-compose up -d
Creating speedtest_influxdb_1 ... done
Creating speedtest_grafana_1 ... done
Creating speedtest_speedtest_1 ... done
$ docker-compose stop
Stopping speedtest_influxdb_1 ... done
Stopping speedtest_grafana_1 ... done
Stopping speedtest_speedtest_1 ... done
$ docker-compose stop
$ docker-compose pull
$ docker-compose rm
$ docker-compose up -d
$ docker-compose logs -f
$ docker-compose logs -f grafana
By default the dashboard shows all speedtest results. To filter for a specifc host, simply add a and host = 'local'
statement in the WHERE
clause of the SQL select.
Example (Download Time Serie):
SELECT mean("value") FROM "download" WHERE $timeFilter and host = 'local' GROUP BY time($interval) fill(null)
Access http://${HOSTNAME}:${GRAFANA_PORT}
(http://localhost:3000 by default) and login using the following default credentials:
- Username:
admin
- Password:
admin
- Fork it
- Create your feature branch:
git checkout -b feature/my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin feature/my-new-feature
- Submit a pull request
- Docker (incl.
docker-compose
)
1.0.0