Performs speedtest-cli tests and pushes metrics to Prometheus Pushgateway
Project description
Prometheus Speedtest
Instrument Speedtest.net tests from Prometheus.
Getting Started
These instructions will run prometheus_speedtest
on your system.
Running with Docker
prometheus_speedtest is available on Docker Hub :whale:.
docker run --rm -d --name prometheus_speedtest -p 8080:8080/tcp jraviles/prometheus_speedtest:latest
Installing with PyPi
prometheus_speedtest is also provided as a PyPi package. It can be installed with:
pip install prometheus_speedtest
Usage
usage: prometheus_speedtest.py [-h] [-p port]
Instrument speedtest.net speedtests from Prometheus.
optional arguments:
-h, --help show this help message and exit
-p port, --port port port to listen on.
Getting Started (Development)
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Prerequisites
Running locally
First, ensure packages listed in requirements.txt are installed with pip.
python2 prometheus_speedtest.py
Running with Docker
docker build -t prometheus_speedtest:latest .
docker run --rm -d -p 8080:8080/tcp prometheus_speedtest:latest
Perform a Speedtest
curl localhost:8080
Or visit http://localhost:8080
Testing
python2 prometheus_speedtest_test.py
Contributing
Pull requests welcome. Please adhere to the Google Python style guide.
Deploying
pypi
python3 setup.py sdist
twine upload dist/*
Authors
- Jean-Ralph Aviles
License
This product is licensed under the Apache 2.0 license. See LICENSE file for details.
Acknowledgments
- Matt Martz speedtest-cli
- The Prometheus team https://prometheus.io
- Testing in Python team http://lists.idyll.org/listinfo/testing-in-python
- Benjamin Staffin python-glog
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
Hashes for prometheus_speedtest-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d481d81cc472074468b85e9ee946355e164154711f6b9f04daac13a94cebc9b1 |
|
MD5 | efadc6ad4783b105cfabf694456de712 |
|
BLAKE2b-256 | 72a852531fd7267a9a59cdba6ce43ce795717297a87b076df1ed7de360b758df |