OK, turns out I described the issue incompletely.

By wiping /opt/local/var/snmp/mib_indexes, I can squeeze out a single
successful run of a net-snmp utility:

guru> snmpget -c public localhost sysDescr.0
RFC1213-MIB::sysDescr.0 = STRING: "Linux guru.company.com
2.6.18-308.11.1.el5.centos.plus #1 SMP Tue Jul 10 16:44:19 EDT 2012 x86_64"
guru>

But, on the next invocation, I run into the issue:

guru> snmpget -c rrcesowas localhost sysDescr.0
add_mibdir: strings scanned in from
/opt/local/share/snmp/mibs/Cisco/.index are
too large.  count = 24
 add_mibdir: strings scanned in from
/opt/local/share/snmp/mibs/IETF/.index are
too large.  count = 25
 MIB search path:
/opt/local/share/snmp/mibs:/opt/vdops/share/snmp/mibs/Cisco:
/opt/local/share/snmp/mibs/IETF:/opt/local/share/snmp/mibs/Microsoft:
/opt/local/share/snmp/mibs/NetSNMP
Cannot find module (SNMP-FRAMEWORK-MIB): At line 9 in
/opt/local/share/snmp/mibs
/NetSNMP/NET-SNMP-VACM-MIB
[...]

If I wipe /opt/local/var/snmp/mib_indexes, I can squeeze out one more
'snmpget' invocation ...

I've stashed my collection of mib files plus snmp.conf at
https://vishnu.fhcrc.org/add_mibdir

==> I don't see a '.index' file anywhere in /opt/local/share/snmp/mibs
... is this a problem?
==> Would you have tips on how to narrow the fault domain?

I figure I could replicate the problem with a /much/ smaller collection
of MIB files ... but then I'm not sure what I would do once I had that
shrunken collection in hand.

?

--sk

Stuart Kendrick
FHCRC

On 8/5/2012 4:17 PM, Stuart Kendrick wrote:
> Historically, when I've added MIB files to my net-snmp installation, I
> do something like this:
>
> (1) mkdir /opt/local/share/snmp/mibs/Cisco
> (2) cp ~/somewhere/* /opt/local/share/snmp/mibs/Cisco
> (3) echo mibdirs +/opt/vdops/share/snmp/mibs/Cisco >>
> /opt/local/etc/snmp/snmp.conf
>
> And, of course, sometimes I just execute Step #2, if I'm adding/updating
> MIB files to an existing directory.
>
> And life is good.
>
>
> But recently, I've found that the MIB compiler doesn't enjoy this procedure:
>
> guru> snmptranslate
> add_mibdir: strings scanned in from
> /opt/local/share/snmp/mibs/IETF/.index are too large.  count = 25
>  MIB search path:
> /opt/local/share/snmp/mibs:/opt/local/share/snmp/mibs/3Par:/opt/local/share/snmp/mibs/APC
> [...]
> Cannot find module (SNMPv2-SMI): At line 5 in
> /opt/local/share/snmp/mibs/Xyplex/XYPLEX-IEEE-HUB-MIB
> Did not find 'enterprises' in module #-1
> (/opt/local/share/snmp/mibs/Xyplex/XYPLEX-IEEE-HUB-MIB)
> [...]
>
>
> Instead, I need to add a Step #4:
> (4) rm -rf /opt/local/var/snmp/mib_indexes/*
>
> whereupon life goes back to being good.
>
>
> This is not a problem per se -- easy enough to add this step -- but the
> behavior surprises me:  I've been using net-snmp for a decade+ now,
> customizing my MIB file collection, and I haven't needed Step #4.
>
> Is this new?  A bug?  Or have I passed some threshold?  [~2900 MIB files]
>
> net-snmp-5.7.1 running under CentOS 5.8
>
> ?
>
> --sk
>
> Stuart Kendrick
> FHCRC
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Net-snmp-users mailing list
> [email protected]
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to