Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

speedtest_influx_logger-0.0.7.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

speedtest_influx_logger-0.0.7-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file speedtest_influx_logger-0.0.7.tar.gz.

File metadata

  • Download URL: speedtest_influx_logger-0.0.7.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for speedtest_influx_logger-0.0.7.tar.gz
Algorithm Hash digest
SHA256 b4e87b3e2a27bb37e9336e69844770b8fad3933ee84eea80c8d4e24c7a58a317
MD5 df7110c37c4ca0823a0a280018214d80
BLAKE2b-256 ca43b5f06bf742d6f5b6b212bb359ee3cb5aa4e68a8b6fd4505aa6f287e86f52

See more details on using hashes here.

Provenance

File details

Details for the file speedtest_influx_logger-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: speedtest_influx_logger-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for speedtest_influx_logger-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 5419231178e69638c5fa6056f9e4bb5dbb377b68417bdb66214bddc349860c74
MD5 0e5fb2c0dcf218bc2901b50a6c80a1ab
BLAKE2b-256 3e5da7c15c5661021c78cacb3438d40b352f20d674d5788967df576c62e53416

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page