8 Commits

Author SHA1 Message Date
b6072b0e51 Merge pull request 'Update logspeedtest.py' (#4) from paradizelost-patch-1 into main
Reviewed-on: #4
2024-12-04 09:12:13 -06:00
06da5ef71a Update logspeedtest.py
All checks were successful
/ Plan (push) Successful in 3m6s
2024-12-04 09:12:00 -06:00
3633dd4787 Merge pull request 'Update Dockerfile' (#3) from paradizelost-patch-1 into main
Reviewed-on: #3
2024-11-27 10:50:24 -06:00
03cf5b67c2 Delete ookla_speedtest_cli.list
All checks were successful
/ Plan (push) Successful in 2m27s
/ Plan (pull_request) Successful in 7s
/ Deploy (pull_request) Successful in 41s
2024-11-27 10:47:14 -06:00
ede0e223ec Update Dockerfile
Some checks failed
/ Plan (push) Has been cancelled
2024-11-27 10:46:44 -06:00
6848570758 Merge pull request 'work' (#2) from work into main
Reviewed-on: #2
2024-11-26 14:41:41 -06:00
ab6ca7fac6 accept speedest eula
All checks were successful
/ Plan (push) Successful in 57s
/ Plan (pull_request) Successful in 16s
/ Deploy (pull_request) Successful in 13s
2024-11-26 14:33:46 -06:00
96b7f4cbc0 adding logging
All checks were successful
/ Plan (push) Successful in 1m5s
2024-11-26 14:31:41 -06:00
3 changed files with 3 additions and 8 deletions

View File

@@ -1,6 +1,5 @@
FROM debian:bullseye-slim
#
COPY ookla_speedtest_cli.list /
RUN apt update && apt install curl -y
RUN curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | bash
RUN apt install python3 python3-pip iputils-ping speedtest -y

View File

@@ -20,7 +20,8 @@ infdbuser = os.environ["INFLUX_USER"]
infdbpass = os.environ["INFLUX_PASSWORD"]
influxuri = os.environ["INFLUX_URI"]
while(True):
response = sp.getstatusoutput(f"speedtest --format=json")[1]
response = sp.getstatusoutput(f"speedtest --accept-license --format=json")[1]
print(response)
respjson = json.loads(response.split("\n")[1])
print(response)
downspeed = respjson['download']['bandwidth'] * 8 / 1024 / 1024
@@ -32,4 +33,4 @@ while(True):
maxlatency=respjson['ping']['high']
result = addinfluxrecord(downspeed,upspeed,pktloss,jitter,latencyavg,minlatency,maxlatency)
print(result)
time.sleep(300)
time.sleep(300)

View File

@@ -1,5 +0,0 @@
# this file was generated by packagecloud.io for #
# the repository at https://packagecloud.io/ookla/speedtest-cli
deb [signed-by=/etc/apt/keyrings/ookla_speedtest-cli-archive-keyring.gpg] https://packagecloud.io/ookla/speedtest-cli/debian/ bookworm main
deb-src [signed-by=/etc/apt/keyrings/ookla_speedtest-cli-archive-keyring.gpg] https://packagecloud.io/ookla/speedtest-cli/debian/ bookworm main