pnp4nagios, check_snmp, and the `-m' flag

David Krider david at davidkrider.com
Wed Nov 18 15:31:28 CET 2009


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.

dk



------------------------------------------------------------------------------
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