Giter VIP home page Giter VIP logo

internet-speed-monitor's People

Contributors

cybergitjul avatar itsb avatar raaaimund avatar timokluser-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

internet-speed-monitor's Issues

Error when staring up with portainer

When i try to start the stack with portainer via repository i get the following error:

Container internet-speed-monitor-speedtester-1 Started 
Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495:
container init caused: rootfs_linux.go:60: mounting "/data/compose/21/telegraf/telegraf.conf" to rootfs at "/var/lib/docker/overlay2/17ac96b8523ba2911532177a13c052635cb5b03b825d1a02c07aade1db8b59eb/merged/etc/telegraf/telegraf.conf" 
caused: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

Is there is difference in using portainer or running it by hand? I am not very familiar with compose. I know basic docker.

connection to speedtest failing

speedtest.net has changed cli connection, and failing, is there a solution to correct this error?

#Error for speedtest.net
crond: USER root pid 12 cmd /usr/local/bin/speedtest --accept-license -s 5025 -f json > $(mktemp -u -p /var/log/speedtest XXXXXX).json
speedtester_1 | [2021-04-20 13:15:06.201] [error] Configuration - SSL connect error (UnknownException)
speedtester_1 | [2021-04-20 13:15:06.201] [error] Configuration - Cannot retrieve configuration document (0)
speedtester_1 | [2021-04-20 13:15:06.202] [error] ConfigurationError - Could not retrieve or read configuration (Configuration)
speedtester_1 | [2021-04-20 13:15:06.202] [error] ConfigurationError - Could not retrieve or read configuration (Configuration)
speedtester_1 | {"type":"log","timestamp":"2021-04-20T13:15:06Z","message":"Configuration - Could not retrieve or read configuration (ConfigurationError)","level":"error"}

Better approach in reading speedtest results here

speedtest/Dockerfile:

Consider updating this line from:
RUN echo "${SPEEDTEST_CRON_SCHEDULE} root /usr/bin/speedtest --accept-license --accept-gdpr -s ${SPEEDTEST_SERVER} -f json > \$(mktemp -u -p /var/log/speedtest XXXXXX).json" > /etc/cron.d/speedtest
...to:
RUN echo "${SPEEDTEST_CRON_SCHEDULE} root /usr/bin/speedtest --accept-license --accept-gdpr -s ${SPEEDTEST_SERVER} -f json > /var/log/speedtest/results.json" > /etc/cron.d/speedtest

There is really no need to dump the results into unique json file every time. From long-term perspective and in conjuction with the speedtest being run every 1 minute, you will end up having 1440 files daily, 525k files in one year !!!!! That's crazy overkill and waste of resources.

Especially since telegraf agent is set to read all the files every 10s hence it reads THE SAME DATA of all thousands and thousand of files 6 times every one minute !!!!
Surely you can update telegraf agent interval to "1m" but that won't fix the inefficient usage of filesystem due to gazillion of files created by the speedtest and then being read by telegraf.

In the end, here below is the best of the best approaches.....
By doing this, telegraf agent executes the speedtest binary which dumps the json into stdout and telegraf reads and processed stdout and writes into influxdb.
Another advantage is also that you end up having just single container with both telegraf and speedtest in one nice package :)

[[inputs.exec]]
commands = ["/usr/bin/speedtest -f json-pretty"]
name_override = "Speedtest"
timeout = "1m"
interval = "5m"
data_format = "json"
json_string_fields = [ "interface_externalIp",
                       "server_name",
                       "server_location",
                       "server_host",
                       "server_ip",
                       "result_url" ]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.