No project description provided
Project description
Speedtest Influx Logger
Summary
Micro application to run speedtests periodically and send statistics to remote InfluxDB node.
Was created to be run as a self contained daemon script, or within a Docker setup to automatically push speedtest results to a remote InfluxDB node for display within Grafana.
Can be run within a script by performing the following:
import speedtest
from speedtest_influx_logger.main import check_speed
check_speed(speedtest.Speedtest())
# 2020-09-27 21:44:27 - Speedtest complete: 166.48/37.67
Statistics
The script sends the following statistic data to Influx:
{
"measurement": "internet_speed",
"tags": {
"host": NODE_NAME,
"client_version": APP_VERSION
},
"fields": {
"download": float(download),
"upload": float(upload),
"ping": float(ping)
}
}
Installation
python3 -m pip install pipx
apt-get install -y python3-venv
pipx install speedtest-influx-logger
Environment Variables
- NODE_NAME
- INFLUX_HOST
- INFLUX_PORT
- INFLUX_USER
- INFLUX_PASS
- INFLUX_DB
- TEST_FREQUENCY
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for speedtest_influx_logger-0.0.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4e87b3e2a27bb37e9336e69844770b8fad3933ee84eea80c8d4e24c7a58a317 |
|
MD5 | df7110c37c4ca0823a0a280018214d80 |
|
BLAKE2b-256 | ca43b5f06bf742d6f5b6b212bb359ee3cb5aa4e68a8b6fd4505aa6f287e86f52 |
Close
Hashes for speedtest_influx_logger-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5419231178e69638c5fa6056f9e4bb5dbb377b68417bdb66214bddc349860c74 |
|
MD5 | 0e5fb2c0dcf218bc2901b50a6c80a1ab |
|
BLAKE2b-256 | 3e5da7c15c5661021c78cacb3438d40b352f20d674d5788967df576c62e53416 |