frdmn / docker-speedtest-grafana

🚢📦Grafana + InfluxDB + Speedtest.net results
MIT License
206 stars 71 forks source link

External InfluxDB / Grafana #10

Closed n1nj4888 closed 4 years ago

n1nj4888 commented 4 years ago

Hi,

For those of us with existing InfluxDB and Grafana containers/services, Is it possible to run the Speedtest Docker image without creating new InfluxDB and grafana containers?

Looking at your docker-compose.yml it looks to create 3 separate containers for Speedtest, influx and grafana so can I assume that by only using “frdmn/speedtest-grafana“, the Speedtest would run on its own and if so, how to specify an existing external InfluxDB host/port/username/password/database to write to?

Thanks!

frdmn commented 4 years ago

Hi @n1nj4888, that should be possible by setting the INFLUXDB_DB and INFLUXDB_HOST environment variables and rebuilding the container afterwards. At the moment it doesn't check user/password authentication:

https://github.com/frdmn/docker-speedtest-grafana/blob/master/docker/speedtest/index.js#L37-L40

n1nj4888 commented 4 years ago

Would it be please possible to add Influx Host, Port, Database, Username and Password as environment variables to the image, with the image defaulting them to their current values if not specified?

frdmn commented 4 years ago

Added in latest version :)

n1nj4888 commented 4 years ago

Awesome! Thanks for this!