[Nagiosplug-help] How to format send/expect strings for check_udp against SNMP managed devices?

Andreas Ericsson ae at op5.se
Thu Sep 27 13:42:58 CEST 2007


Ralph.Grothe at itdz-berlin.de wrote:
>> -----Original Message-----
>> From: Andreas Ericsson [mailto:ae at op5.se]
>> Sent: Thursday, September 27, 2007 12:00 PM
>> To: Grothe, Ralph
>> Cc: tom.nail at amd.com; nagiosplug-help at lists.sourceforge.net
>> Subject: Re: [Nagiosplug-help] How to format send/expect
> strings for
>> check_udp against SNMP managed devices?
>>
>>
>> Ralph.Grothe at itdz-berlin.de wrote:
>>
>> ...
>>
>>> or the more often used form with prepended MIB?
>>>
>>  
>> The correct answer is "none of the above". Use the OID directly
>> instead. It's not subject to change. .1.3.6.1.2.1.1.1.0 is the
>> one you want, and will save quite a bit of load every time you
>> run the check.
> 
> O yeah, of course.
> I forgot the avoidable overhead of MIB parsing and descriptor to
> numeric OID mapping.
> 
> I could verify the OID you mentioned (which I'm sure seasoned
> SNMP admins know by heart)
> without paging the RFC1213-MIB by simply giving snmpget the
> numeric output flag
> (I can never remember such long digit dot sequences)
> This also reminds me of not forgetting the leading top level
> "domain" dot.
> 
> $ /usr/bin/snmpget -On -t 1 -r 5 -m RFC1213-MIB -v 1 -c public
> sensor_r01:161 sysDescr.0
> .1.3.6.1.2.1.1.1.0 = STRING: "sensorProbe8 v 2.0 SP8363 191006"
> 
> 
>>
>>> As the really executed snmpget command, which the -v option
>>> additionally displays, implies to me
>>> the second form seems to load ALL MIBs from net-snmp's mib
> dirs
>>> which to me seems to be more wasteful than the preselection
> via
>>> -m.
>>> Is this true?
>>>
>> Yes. By default the Net-SNMP tools load all the mibs on every
>> invocation. You can limit the number of mibs to load using the
>> -m switch, and also tell it to load mibs from different
> locations.
>> "-m :" will make it load no mibs at all, which is what you
> want.
>> The check_snmp plugin will notice if you're using an oid or a
>> mib-name and act accordingly.
> 
> So when using a numeric OID I don't have to additionally pass the
> mentioned "-m :"
> to check_snmp to avoid the overhead 
> (i.e. check_snmp will sort out the best snmpget options on its
> own)?
> 

Yes.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231




More information about the Help mailing list