breadlysm / SpeedFlux

Script to periodically run the Speedtest CLI application by Ookla and post results to InfluxDB.
MIT License
108 stars 69 forks source link

Speedtest will not run after initial launch #11

Closed data-source closed 3 years ago

data-source commented 3 years ago

Sorry to be logging another issue, but it seems the script will not launch speedtest on interval set:

TEST_INTERVAL = int(os.getenv('SPEEDTEST_INTERVAL', '300')) * 60 PING_INTERVAL = int(os.getenv('PING_INTERVAL', '300'))

It will write speedtest to DB on launch, but that's it. 5 minutes later it'll just perform the ping:

2021-05-30 10:38:34,861 [DEBUG] http://127.0.0.1:8086 "POST /write?db=speedtest HTTP/1.1" 204 0 2021-05-30 10:38:34,862 [INFO] Ping data written successfully 2021-05-30 10:38:34,892 [DEBUG] http://127.0.0.1:8086 "POST /write?db=speedtest HTTP/1.1" 204 0 2021-05-30 10:38:34,893 [INFO] Ping data written successfully 2021-05-30 10:38:56,726 [INFO] Speedtest Successful...Writing to Influx 2021-05-30 10:38:56,727 [INFO] Speedtest Data: time: 2021-05-30T08:38:56Z ping: 13.684ms download: 941.8116Mb/s upload: 599.403496Mb/s isp: Orange ext. IP: 86.xxx.xx.xx
2021-05-30 10:38:56,752 [INFO] Speedtest data written successfully 2021-05-30 10:43:35,737 [DEBUG] Starting new HTTP connection (1): 127.0.0.1:8086 2021-05-30 10:43:35,749 [DEBUG] http://127.0.0.1:8086 "POST /write?db=speedtest HTTP/1.1" 204 0 2021-05-30 10:43:35,750 [INFO] Ping data written successfully 2021-05-30 10:43:35,783 [DEBUG] http://127.0.0.1:8086 "POST /write?db=speedtest HTTP/1.1" 204 0 2021-05-30 10:43:35,784 [INFO] Ping data written successfully

NB - I downloaded the newest version of the script, not sure why it would run once and miss its intervals.

data-source commented 3 years ago

Removed ' 60' on 'TEST_INTERVAL', exemple is in seconds, yet multiplies 60, expecting minutes.