On Fri, 28 Sep 2012, Jummo wrote:

>  /usr/lib64/nagios/plugins/check_snmp -H 10.10.10.1 -o sysUpTime.0 -m \
> RFC1213-MIB -c 60000:
>
> Everythings fine so far. But if the uptime (timeticks) less than 60000
> the plugin still reports OK. I have tested it with 1913796445: as
> critical threshold.

    Try using 60000:0 as the final argument.

t1:~ >. /usr/local/icinga/libexec/check_snmp -H 192.168.1.14 -o \
sysUpTime.0 -m RFC1213-MIB -c 60000:0
SNMP OK - 165777776 | RFC1213-MIB::sysUpTime.0=165777776
t1:~ >. /usr/local/icinga/libexec/check_snmp -H 192.168.1.14 -o \
sysUpTime.0 -m RFC1213-MIB -c 60000:0
SNMP CRITICAL - *787* | RFC1213-MIB::sysUpTime.0=787
t1:~ >. echo $?
2
t1:~ >.

    I restarted the SNMP agent on one of my systems between
the two check_snmp invocations to reset the uptime datum.

    One thing worth noting is that this check will throw false-
positives when the (signed) 32-bit counter rolls on systems that
stay up for very long periods of time.  Too, in order to actually
catch a system in that state your retry count and interval will
need to be rather aggressively set in order to send alerts based
on that datum -- and this *will* result in notifications on the
above-mentioned false-positve.

    Cheers!

+------------------------------------------------+---------------------+
| Carl Richard Friend (UNIX Sysadmin)            | West Boylston       |
| Minicomputer Collector / Enthusiast            | Massachusetts, USA  |
| mailto:crfri...@rcn.com                        +---------------------+
| http://users.rcn.com/crfriend/museum           | ICBM: 42:22N 71:47W |
+------------------------------------------------+---------------------+

------------------------------------------------------------------------------
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/icinga-users

Reply via email to