wdstorer / speedtest-exporter Goto Github PK
View Code? Open in Web Editor NEWPrometheus exporter for speedtest-cli
Prometheus exporter for speedtest-cli
Hello, thank you for wonderful tool!
I've added your great program to our monitoring system for check metrics of our 4G wireless link and today found that it crashed at night. It seems that it would be very helpful to add some exception handling in case of connection errors in speedtest library.
13004748.3156
837615.98368
14524592.5378
1558531.87772
3319399.65134
1462846.98004
13033611.358
502204.085212
11905193.2834
Exception in thread Thread-115155:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/site-packages/speedtest.py", line 841, in run
f = self._opener(request)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/site-packages/speedtest.py", line 482, in http_open
req
File "/usr/lib/python2.7/urllib2.py", line 1201, in do_open
r = h.getresponse(buffering=True)
File "/usr/lib/python2.7/httplib.py", line 1121, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 438, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 402, in _read_status
raise BadStatusLine(line)
BadStatusLine: ''
Traceback (most recent call last):
File "./run-speedtest.py", line 36, in <module>
process_request(60)
File "./run-speedtest.py", line 23, in process_request
s.upload()
File "/usr/lib/python2.7/site-packages/speedtest.py", line 1574, in upload
self.results.bytes_sent = sum(finished)
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.