in reply to Best module(s) for SNMP?

It depends on your objectives - if this is a one-time request for simple info, your Net-SNMP approach is fine.

If, this is a development effort to monitor or modify device parameters with dependencies on various factors - this needs programming, and Net::SNMP, though not the friendliest, is very powerful.

You could try SNMP::Simple, although the author recommends against it being a starting point. If you just ineed Interface info, Net::SNMP::Interfaces works great.

On request, I'm willing to share code that uses SNMP (perL) for monitoring switches, getting ARP info, and diagnose Spanning-tree issues.

     "For every complex problem, there is a simple answer ... and it is wrong." --H.L. Mencken

Replies are listed 'Best First'.
Re^2: Best module(s) for SNMP?
by splinky (Hermit) on Feb 10, 2006 at 06:22 UTC
    My application is automated testing of the SNMP interface for a piece of equipment my company sells, so it'll probably be pretty rigorous if I'm doing my job correctly :-) Lots of table additions and deletions, that's for sure.

    Interesting that you mention Net::SNMP. That's the first thing I looked at, but I stopped looking when I realized that it didn't know anything about MIBs. If I want to get sysDescr.0 without having to know that it's .1.3.6.1.2.1.1.1.0, how do I go about that with Net::SNMP?

      Take a look at SNMP::MIB::Compiler.
      use SNMP::MIB::Compiler; my $mib = new SNMP::MIB::Compiler; $mib->add_path('./mibs', '/usr/share/snmp/mibs'); $mib->add_extension('', '.mib', '.my', '.txt'); $mib->repository('./out'); # only accept SMIv2 MIBs $mib->{'accept_smiv1'} = 0; $mib->{'accept_smiv2'} = 1; # no debug $mib->{'debug_lexer'} = 0; $mib->{'debug_recursive'} = 0; # store compiled MIBs into files $mib->{'make_dump'} = 1; # read compiled MIBs $mib->{'use_dump'} = 1; # follow IMPORTS clause while compiling $mib->{'do_imports'} = 1; # load a precompiled MIB $mib->load('SNMPv2-MIB'); print $mib->resolve_oid('sysDescr'), ".0\n";
      UPDATE: show sysDescr.
      -- gam3
      A picture is worth a thousand words, but takes 200K.