getting warnings/critical alerts from check_snmp / extend

Fabrice Laborie fabrice at laborie.eu
Fri Jul 1 06:43:21 CEST 2011


Hi!

I am struggling to get check_snmp to return critical/warning info for a
simple "extend" in snmpd.conf
(extend minutecheck /bin/sh /usr/local/bin/minutecheck.sh ), while it is
working for ifInUcastPkts

I suspect that the comparison with the range may not be happening if the
returned value is not a Counter32.
the extend seems to be returning a STRING by default.

Is this the case ?
Can I force a cast from STRING to Counter32  by check_snmp ?
Or is there a way to get snmpd to return a Counter32 directly??

snmpget -v2c -c public  192.168.25.11
iso.3.6.1.4.1.8072.1.3.2.4.1.2.11.109.105.110.117.116.101.99.104.101.99.107.1
iso.3.6.1.2.1.2.2.1.11.1
iso.3.6.1.4.1.8072.1.3.2.4.1.2.11.109.105.110.117.116.101.99.104.101.99.107.1
= STRING: "19"
iso.3.6.1.2.1.2.2.1.11.1 = Counter32: 39514

/usr/local/nagios/libexec/check_snmp -H 192.168.25.11 -o
iso.3.6.1.2.1.2.2.1.11.1 -C public  -w @38000:38900 -c @38901:
SNMP CRITICAL - *39458* | IF-MIB::ifInUcastPkts.1=39458c
/usr/local/nagios/libexec/check_snmp -H 192.168.25.11 -o
iso.3.6.1.4.1.8072.1.3.2.4.1.2.11.109.105.110.117.116.101.99.104.101.99.107.1
-C public  -w @10:15 -c @16:
SNMP OK - 18 | NET-SNMP-EXTEND-MIB::nsExtendOutLine."minutecheck".1=18
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110701/bdb1c19d/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
-------------- next part --------------
_______________________________________________
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