Sign inSign up

frdmn/speedtest-grafana

By frdmn

•Updated about 6 years ago

Image
4

100K+

frdmn/speedtest-grafana repository overview

⁠docker-speedtest-grafana

Docker setup consisting out of Grafana incl. a pre-configured dashboard, InfluxDB and a speedtest.net CLI test⁠ runner.

⁠Installation

  1. Make sure you've installed all requirements
  2. Clone this repository:
git clone https://github.com/frdmn/docker-speedtest-grafana
  1. Create a copy of the sample .env file and adjust it at will:
cp .env.sample .env
  1. Spin up the containers:
docker-compose up -d

⁠Configuration

You can make use of the following environment variables / configurations:

Environment variableDefault valueDescription
GRAFANA_PORT3000Port to bind Grafana webinterface on the host system
SPEEDTEST_SPEEDTEST_INTERVAL3600Interval/pause (in seconds) between speedtests
SPEEDTEST_HOSTlocalDisplay name of the client
SPEEDTEST_SERVERnoneOptionally set specific speedtest.net derver ID, otherwise use the closest
INFLUXDB_DBspeedtestDatabase to save speedtest results
INFLUXDB_HOSTinfluxdbName of the InfluxDB host/containers
INFLUXDB_USERNAMErootUsername for InfluxDB authentication
INFLUXDB_PASSWORDrootPassword for InfluxDB authentication

⁠Usage

⁠Services
⁠Start/create services
$ docker-compose up -d
Creating speedtest_influxdb_1  ... done
Creating speedtest_grafana_1   ... done
Creating speedtest_speedtest_1 ... done
⁠Stop services
$ docker-compose stop
Stopping speedtest_influxdb_1  ... done
Stopping speedtest_grafana_1   ... done
Stopping speedtest_speedtest_1 ... done
⁠Upgrade services
$ docker-compose stop
$ docker-compose pull
$ docker-compose rm
$ docker-compose up -d
⁠Check logs
$ docker-compose logs -f
$ docker-compose logs -f grafana
⁠Grafana
⁠Dashboard

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)
⁠Administrative access

Access http://${HOSTNAME}:${GRAFANA_PORT} (http://localhost:3000⁠ by default) and login using the following default credentials:

  • Username: admin
  • Password: admin

⁠Contributing

  1. Fork it
  2. Create your feature branch:
git checkout -b feature/my-new-feature
  1. Commit your changes:
git commit -am 'Add some feature'
  1. Push to the branch:
git push origin feature/my-new-feature
  1. Submit a pull request

⁠Requirements / Dependencies

  • Docker (incl. docker-compose)

⁠Version

1.0.0

⁠License

MIT⁠

Tag summary

Content type

Image

Digest

Size

15.4 MB

Last updated

about 6 years ago

docker pull frdmn/speedtest-grafana