Today I made the first public release of a new project, the netsnmpagent Python module.
From the README:
python-netsnmpagent is a Python module that facilitates writing Net-SNMP
subagents in Python. Subagents connect to a locally running Master agent
(snmpd) over a Unix domain socket (eg. "/var/run/agentx/master") and using the
AgentX protocol (RFC2747). They implement custom Management Information Base
(MIB) modules that extend the local node's MIB tree. Usually, this requires
writing a MIB as well, ie. a text file that specifies the structure, names
and data types of the information within the MIB module.
python-netsnmpagent was written after a lot of frustration trying to fix the
python-agentx module hosted on Sourceforge. I fixed some smaller issues there
but when it came to making sure that you could actually walk the whole MIB, not
just the variables registered, I realized that it would not make much sense to
reimplement the complete behavior of a proper SNMP agent when the NetSNMP API
actually can handle those things for you. Also, to be honest, I don't get
python-agentx's design :-)
python-netsnmpagent, by contrast, in the first line focusses on making the
net-snmp C agent API accessible from Python. Though I will try not to just
pass through every library call 1:1 but wrap them in a useful manner.
net-snmp itself also comes with a Python module (see the "python" subdirectory
in the source distribution), however it seems to offer bindings that implement
the client side only, not the agent side.
There is no real homepage yet, for now use the following netsnmpagent Resources:
- Development is reflected at GitHub at https://github.com/pief/python-netsnmpagent.
- Distribution archives are available from the Python Package Index (PyPI) at http://pypi.python.org/pypi/netsnmpagent.
- RPMs for SUSE distributions are available from my Open Build Service (OBS) project, eg. for SLE 11 SP2 and openSUSE 12.2.