geerlingguy / internet-monitoring

Monitor your network and internet speed with Docker & Prometheus
1.28k stars 138 forks source link

Speedtest Choose specific server #19

Closed AnvithLobo closed 3 years ago

AnvithLobo commented 3 years ago

speedtest-cli allows you to manually choose a server instead of auto picking the best server. This can be using using the -s flag with a server_id example speedtest -s 35945 this allows us to tet the speeds without letting speedtest choose the best server, which might not pick the best server always and won't provide the most accurate data.

also maybe adding a way to test multiple servers could be a good idea since my ISP only promises speeds up to their node i can monitor speeds on different nodes / countries to check their peering and routing. I Currently try to do this with a cronjob and a python script which stores data to a sqlite DB. Grafana and Prometheus solution might be a much better choice in this case.

AnvithLobo commented 3 years ago

Looking at miguelndecarvalho/speedtest-exporter it checks for serverid in environment variable

-e SPEEDTEST_SERVER=<speedtest-serverid> #optional \

so that should work for at least the first problem testing for multiple servers would need a lot of work maybe adding this to prometheus config is something that can be done ?

geerlingguy commented 3 years ago

I think adding the ability to optionally specify a specific server is in scope, but having multiple available would be quite a bit harder.

AnvithLobo commented 3 years ago

Yeah thought so. I was just about to edit the docker compose itself to add the environment variable.

MiguelNdeCarvalho commented 3 years ago

Hey,

@AnvithLobo is it possible for you to open an issue on speedtest-exporter repo? That is an excelent idea.

Thanks, MiguelNdeCarvalho

AnvithLobo commented 3 years ago

@MiguelNdeCarvalho do you mean an issue for multiple tests with multiple server IDs? since it already allows us to set one as env var.

MiguelNdeCarvalho commented 3 years ago

Yes, it should be a feature to add or at least take a look on it. Thanks

geerlingguy commented 3 years ago

I'll be archiving this repository as the contents have been merged into my internet-pi repository—please feel free to re-open this issue in that repo to keep the conversation going!

More details: https://github.com/geerlingguy/internet-monitoring/issues/22