Extending net-snmp with simple sub-agent

AllCloud Blog:
Cloud Insights and Innovation

Very often we want to extend the net-snmp agent with our private data, net-snmp provides a very simple method to pass certain OID ranges to an external script.

snmpd.conf example

rocommunity public
# send all Emind Enterprise ID requests to the subagent
pass . /usr/local/emind/snmp-subagent/snmp_subagent.sh

When a request will arrive to any OID behind . the snmp_subagent.sh will be called

GET Request:

/usr/local/emind/snmp-subagent/snmp_subagent.sh -g [requesed oid]

SET Request:

/usr/local/emind/snmp-subagent/snmp_subagent.sh -s [requesed oid]

NEXT Request: (for walk)

/usr/local/emind/snmp-subagent/snmp_subagent.sh -n [requesed oid]

As always, Enjoy !

Lahav Savir

Founder and CTO, Cloud Platforms

Read more posts by Lahav Savir