Skip to content

🚢📦Grafana + InfluxDB + Speedtest.net results

License

Notifications You must be signed in to change notification settings

n1nj4888/docker-speedtest-grafana

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 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 derver 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

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

About

🚢📦Grafana + InfluxDB + Speedtest.net results

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 76.4%
  • Dockerfile 23.6%