Frequently Asked Questions (FAQ) on SNMP_Session.pm


When will MRTG/SNMP_Session.pm support SNMPv3?

MRTG 2.13 and higher includes support for SNMPv3, using the Net::SNMP library. See the sections about EnableSnmpV3, Target, and SnmpOptions, in the MRTG Reference Manual.

SNMP_Session.pm only supports SNMPv1 and (community-based) SNMPv2 ("SNMPv2c"). There are no plans to add SNMPv3 support to SNMP_Session.pm. I'd recommend looking at Net::SNMP instead, which has been supporting SNMPv3 for quite a while. Net::SNMP is also written much cleaner than SNMP_Session.pm, and like SNMP_Session.pm doesn't require any external binaries. Some non-standard (crypto) Perl modules might be required to use SNMP's security features, however.

A nice project would be to write a variant of SNMP_util.pm that sits on top of Net::SNMP rather than on top of SNMP_Session.pm. Since MRTG uses the SNMP_util.pm layer, that should make it work with SNMPv3.

However, since SNMPv3 doesn't have communities, MRTG's target syntax would have to be changed to accomodate SNMPv3 targets. The current syntax of community{at}host[:options] would have to be modified (I think it should be changed, rather than further extended, because it already looks too ugly because of its multiple extensions.

For the target syntax, one should probably look at the SNMP URI syntax (RFC 4088.

Anther issue with SNMPv3 is that it uses engine IDs, which are usually "discovered" using a well-defined discovery mechanism. It would be good to cache discovered engine IDs somewhere, to avoid repeating the discovery process for every round of MRTG. If MRTG is run from cron every five minutes, then such an engine ID cache should be written to disk between runs. I'm not sure whether Net::SNMP already supports this. If MRTG is run as a long-running "daemon" process, making the cache persistent might not be necessary.


2007/10/13 19:15:00
Simon Leinen <simon.leinen@switch.ch>