I am trying to pass the environment EXPORTER_SERVERID to force a different server, however it defaults to closest server every time:
speedtest:
tty: true
stdin_open: true
expose:
- 9696
environment:
- EXPORTER_SERVERID=1772
- EXPORTER_PORT=9696
ports:
- 9696:9696
image: nlamirault/speedtest_exporter:0.3.0
restart: always
networks:
- back-tier
INFO[0000] Starting speedtest exporter (version=, branch=, revision=) source="speedtest_exporter.go:121"
INFO[0000] Build context (go=go1.13.3, user=, date=) source="speedtest_exporter.go:122"
INFO[0000] Setup Speedtest client with interval 1m0s source="speedtest_exporter.go:64"
2020/02/07 18:42:02 Env Report
2020/02/07 18:42:02 -------------------------------
2020/02/07 18:42:02 [User Environment]
2020/02/07 18:42:02 Arch: arm
2020/02/07 18:42:02 OS: linux
2020/02/07 18:42:02 IP: XXX.XXX.XXX.XXX
2020/02/07 18:42:02 Lat: XXXXX
2020/02/07 18:42:02 Lon: XXXXX
2020/02/07 18:42:02 ISP: Spectrum
2020/02/07 18:42:02 Config: http://c.speedtest.net/speedtest-config.php?x=h3HeHkroR6qyjQ0y
2020/02/07 18:42:02 Servers: http://c.speedtest.net/speedtest-servers-static.php?x=EiPLZFaoIb5w6PBy
2020/02/07 18:42:02 User Agent: speedtest_exporter
2020/02/07 18:42:02 -------------------------------
2020/02/07 18:42:02 [args]
2020/02/07 18:42:02 []string{"/usr/bin/speedtest_exporter"}
2020/02/07 18:42:02 --------------------------------
2020/02/07 18:42:04 Sorting all servers by distance...
2020/02/07 18:42:04 Doing 3 runs of {http://cavt.ost.myvzw.com:5060/speedtest/upload.php 33.185 -117.2754 Vista, CA United States US Verizon 15951 16.430756041944438 0}
2020/02/07 18:42:04 Testing latency: Vista, CA (Verizon)
2020/02/07 18:42:04 Run took: 89.057381ms
2020/02/07 18:42:04 Testing latency: Vista, CA (Verizon)
2020/02/07 18:42:04 Run took: 95.598126ms
2020/02/07 18:42:04 Testing latency: Vista, CA (Verizon)
2020/02/07 18:42:04 Run took: 93.695711ms
2020/02/07 18:42:04 Testing latency: Vista, CA (Verizon)
2020/02/07 18:42:04 Run took: 99.654367ms
2020/02/07 18:42:04 Testing latency: Vista, CA (Verizon)
2020/02/07 18:42:04 Run took: 92.692054ms
2020/02/07 18:42:04 Total runs took: 89.057381
2020/02/07 18:42:04 Server latency was ok 89.057381 adding to successful servers list
2020/02/07 18:42:04 Doing 3 runs of {http://esc.speedtest.t-mobile.com:8080/speedtest/upload.php 33.1192 -117.0864 Escondido, CA United States US T-Mobile 15037 19.021629683503186 0}
2020/02/07 18:42:04 Testing latency: Escondido, CA (T-Mobile)
2020/02/07 18:42:04 Get http://esc.speedtest.t-mobile.com:8080/speedtest/latency.txt: dial tcp [2607:fb90:5f0:1ea2::5eed]:8080: connect: cannot assign requested address
I am trying to stop it from attempting to resolve this IPv6 speedtest URL. Docker is having other issues with IPv6.