Menu

Tree [41a5ff] master v0.7 /
 History

HTTPS access


File Date Author Commit
 examples 2010-03-24 fraggod@malediction fraggod@malediction [ba1a3f] OIDDict: fixed OID/str shuffle, arbitrary getne...
 pyagentx 2010-04-06 fraggod@malediction fraggod@malediction [d6e754] OIDDict: added uniq to heap ordering
 .gitignore 2010-03-01 fraggod@malediction fraggod@malediction [65a500] Added gitignore list
 COPYING 2010-02-28 fraggod@sacrilege fraggod@sacrilege [337efb] Cosmetics and licensing stuff
 README 2010-03-16 fraggod@malediction fraggod@malediction [3201b2] readme: added note about snmpd-5.2 and counter64
 _agentx.c 2010-03-16 fraggod@malediction fraggod@malediction [8c8501] Added support for unsigned (including 64-bit) s...
 setup.py 2010-04-09 fraggod@sacrilege fraggod@sacrilege [41a5ff] setup: version bump

Read Me

Requirements:
-------------

Net-SNMP (http://net-snmp.sourceforge.net/) headers and libs (libnetsnmp*).

Counter64 type export doesn't seem to work with snmpd-5.2.3 at the moment, but
works with snmpd-5.4 versions correctly. AFAIK 64-bit support appeared somewhere
around 5.2, so it might be a bug of that version.


Installation:
-------------

Basically, it's just
	$ python3 ./setup.py install

To install for unprivileged user, use ~/.pydistutils.cfg:
	[install]
	install_lib = ~/.python
	install_scripts = ~/bin

...and set PATH / PYTHONPATH to include these:
	echo PATH="$HOME/bin:$PATH" >> ~/.bashrc
	echo PYTHONPATH="$HOME/.python:$PYTHONPATH" >> ~/.bashrc


Notes:
-------------

Check out "examples" path for sample code:
	static_data.py - serves static data from dict on a given oid
	cpu_load.py process_stats.py - dynamically poll/serve real system data
	ext_server.py - compose and serve all of the above (via ExtensionStack)

Note that for AgentX to work with net-snmp, you'd need to explicitly enable
it in snmpd.conf via "master agentx" directive. See snmpd.conf(5).

Sample (bare-basic) snmpd.conf:
	rocommunity PASS
	syslocation Right here
	syscontact me@somewhere.net
	master agentx

To try it all out:
	$ cd examples
	$ ./ext_server.py &
	$ snmpwalk -v2c -cPASS localhost UCD-SNMP-MIB::ucdavis.50


Links:
-------------

http://snmpd-pyagentx.sf.net/
http://sf.net/projects/snmpd-pyagentx/