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 hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page