pnp4nagios, check_snmp, and the `-m' flag

Thomas Guyot-Sionnest dermoth at aei.ca
Wed Nov 18 17:17:30 CET 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 18/11/09 09:31 AM, David Krider wrote:
> On Wed, 2009-11-18 at 06:46 -0500, Thomas Guyot-Sionnest wrote:
>> You may be able to get the perfdata again by specifying a warning or
>> critical threshold. The code changed lately so if it doesn't work with
>> an older version you may want to try with 1.4.14 (the version I looked at).
> 
> Spot-on, mate. Thanks for the suggestion! I'll revamp all my checks to
> use warnings, even if they don't really need them.
> 
>> Note though that check_snmp runs faster without loading any mibs, which
>> is an important tuning for large monitoring systems using this plugin.
> 
> Now, this is odd, because it speeds things up TREMENDOUSLY with doing
> things at the command line with snmpwalk and snmpget. As this is my SNMP
> management machine, we have thousands of mib files being parsed before
> those commands are run without specifying. So I checked:
> 
> 
> temporary ~ # time /usr/lib/nagios/plugins/check_snmp -H 10.1.25.11
> -o .1.3.6.1.4.1.534.8.3.1.5.1.1.4.1 -w 10:20 -c 20:30
> SNMP WARNING - *27* | iso.3.6.1.4.1.534.8.3.1.5.1.1.4.1=27  
> 
> real	0m0.264s
> user	0m0.050s
> sys	0m0.010s
> 
> 
> temporary ~ # time /usr/lib/nagios/plugins/check_snmp -H 10.1.25.11 -m
> EATON-PWR-MTR-MIB -o .1.3.6.1.4.1.534.8.3.1.5.1.1.4.1 -w 10:20 -c 20:30
> SNMP WARNING - *27* | EATON-PWR-MTR-MIB::pwrMtrDemandKiloWatts.1=27  
> 
> real	0m0.040s
> user	0m0.030s
> sys	0m0.010s
> 
> 
> I did each several times in a row to make sure it wasn't a fluke. At
> least here, on my version, with my particular setup, specifying the mib
> file the counter is coming from seems to be an extraordinary speedup.

This is very strange. I can understand that loading a single MIB is
fast, but check_snmp should force a blank mib list (-m '') when only a
numeric OID is broken. some time ago I fixed it when using multiple
numerical oids separated with commas, but this behaviour with a single
OID should be very old.

Can you please show be your version, send the verbose output for the 1st
one and try the same with this switch:
- -m ''

Thanks

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFLBB4a6dZ+Kt5BchYRAtNDAJ4nJ28033owi272lEZw7Y/oGj/wdwCfZd9C
/Gda53ujJaIZYUF5/ZuGDhg=
=5ls9
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list