cread / ecks Goto Github PK
View Code? Open in Web Editor NEWAn easy way to get data out of SNMP without having to deal with the MIB
License: Apache License 2.0
An easy way to get data out of SNMP without having to deal with the MIB
License: Apache License 2.0
>>> import ecks
>>> e = ecks.Ecks()
>>> e.get_data('127.0.0.1', 'public', 'disk')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/etc/lib/python2.6/site-packages/Ecks-0.9-py2.6.egg/ecks/ecks.py", line 139, in get_data
return eval("self.get_%s(host, comm)" % plugin)
File "<string>", line 1, in <module>
File "/etc/lib/python2.6/site-packages/Ecks-0.9-py2.6.egg/ecks/plugins/disk.py", line 52, in get_disk
for i in [t for t in parent._extract(data, int, 1)]:
File "/etc/lib/python2.6/site-packages/Ecks-0.9-py2.6.egg/ecks/ecks.py", line 82, in _extract
return [ value_type(value) for (oid, (data_type, index), value) in data if data_type == filter ]
ValueError: need more than 0 values to unpack
Is it possible to split get_cpu
stats by core?
Importing cmdgen
inside the get_snmp_data
function seems to cause a strange race condition when calling asynchronously:
UnboundLocalError: local variable 'cmdgen' referenced before assignment
This is the Exception:
File "C:\Python26\lib\site-packages\ecks-0.8-py2.6.egg\ecks\plugins\uptime.py", line 43, in get_uptime
if ("Windows" in os) and (int(re.search("(Build (\d+) ", os).groups()[0]) < 7600):
AttributeError: 'NoneType' object has no attribute 'groups'
Apparently, on Windows CE the OS description is 'Microsoft Windows CE Version 5.0 (Build 1400)', while for a Windows Server it is 'Hardware: x86 Family 6 Model 23 Stepping 8 AT/AT COMPATIBLE - Software: Windows Version 5.2 (Build 3790 Multiprocessor Free)'
For Win CE, there is no space after the Build number, so the regexp '"(Build (\d+) " turns up nothing.
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.