![]() ![]() Return self.view_functions(**req.view_args)įile "/root/post_test2.py", line 11, in homeįile "/usr/lib/python3/dist-packages/speedtest.py", line 1091, in _init_įile "/usr/lib/python3/dist-packages/speedtest. Return gi_app(environ, start_response)įile "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2450, in wsgi_appįile "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1867, in handle_exceptionįile "/usr/local/lib/python3.8/dist-packages/flask/_compat.py", line 39, in reraiseįile "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2447, in wsgi_appįile "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1952, in full_dispatch_requestįile "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1821, in handle_user_exceptionįile "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1950, in full_dispatch_requestįile "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1936, in dispatch_request S = speedtest.Speedtest(source_address=source)ĮDIT: This is the error: Traceback (most recent call last):įile "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2464, in _call_ I have also tried to search before posting on StackOverflow. I have read Speedtest python API documentation and mostly copied code from there. It works well for eth0 (192.168.1.21), but I get an error if I try to use a different interface, in this case, eth1 (192.168.8.100). I would like to measure the internet speed of the different interface, in this case - eth1. Time before retrying a failed Speedtest (in seconds).I have eth0, eth1 and wlan0 connected to my Raspberry Pi. Time before retrying a failed data upload. Use OS or Docker environmet variables to configure the program run.Įxample: docker run -d -env DB_ADDRESS= influx_db -env TEST_INTERVAL=120 -name speedtest-influx aidengilmartin/speedtest-influx InfluxDB Settings Variable Import the grafana_dashboard_template.json template as a new dashboard. InfluxDB Details - Password: db_password. ![]() InfluxDB Details - Database: speedtest_db.Login to the Grafana Dashboard (admin/admin) and create a datasource. ![]() In the docker_env/ folder you can edit the environment variables of the docker container (see below, grafana and influx). ĭocker run -d -name speedtest-influx aidengilmartin/speedtest-influx Install the InfluxDB client for library from Python.ĭocker build -t aidengilmartin/speedtest-influx. It will need to be uninstalled before installing the Ookla Speedtest CLI application with the directions on their website. NOTE: The speedtest-cli package in distro repositories is an unofficial client. Install the Speedtest CLI application by Ookla. Make sure you agree with them before running. This repository contains the SQL schema and the Grafana dashboard JSON so you can track your own metrics. This script was written to track internet speed using Ooklas speed test. Using Grafana you can view and explore this data easily.Īdjust the InfluxDB connection settings at the top of main.py to fit your setup and then run with one of the options listed below.īe aware that this script will automatically accept the license and GDPR statement so that it can run non-interactively. A Python script to capture speedtest JSON and insert it into a database. You may want to do this so that you can track your internet connections consistency over time. Version colorama0.4.4 PIP Command pip install colorama Requires Python >2.7, 3.0. This is a small Python script that will continuously run the Speedtest CLI application by Ookla, reformat the data output and forward it on to an InfluxDB database. Description Speed test module for Python Version speedtest0.0.1 Command pip install speedtest Requires Python >3.7 COLORAMA Description Cross-platform colored terminal text. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |