GithubHelp home page GithubHelp logo

mschirrmeister / docker-speedtest-grafana Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iamk3/docker-speedtest-grafana

0.0 0.0 0.0 94 KB

🚢📦Grafana + InfluxDB + Speedtest.net results

License: MIT License

JavaScript 67.35% Dockerfile 17.41% HCL 15.24%

docker-speedtest-grafana's Introduction

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/mschirrmeister/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

Note

If you experience performance issues, like you do not get the speed that you expect, or if you run it outside of Docker, then it might be related to the default Docker bridge network. If that is the case have a look at the file docker-compose-macvlan.yml. You have to change the network to your macvlan network, or create one if you do not already have one. Only the speedtest container needs an ip from your network.

docker compose -f docker-compose-macvlan.yml 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 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

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

docker-speedtest-grafana's People

Contributors

frdmn avatar iamk3 avatar mschirrmeister avatar karloskalcium avatar d3473r avatar crazyuploader avatar yourit avatar therealshark avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.