Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
Your review has been submitted and is pending approval.
Checks the hosts uptime through SNMP. Based on uptime_by_snmp.sh but improved (help, no tempfiles, output in minutes and days).
Current Version
Last Release Date
June 23, 2009
Owner
Nagios Exchange
Website
http://nagios.lantschner.name/Nagios.html
Compatible With
Shellscript for checking hosts uptime with SNMP
Rev. 0.2: minmal bugfix in error message
Checks the hosts uptime through SNMP. Based on uptime_by_snmp.sh but conforms more to the guidlines (no tempfiles, help). The output is in minutes (if critcial or warning), otherwise in days. Can be used to check any host (*nix, Windows). To change German output, pls. go into the script and change Tage to days.
This plugin uses DISMAN-EVENT-MIB::sysUpTimeInstance which expresses uptime in 1/100 sec in a 32-bit value. So it will roll over in 496 days and may result in spurious alerts at that time. If your device supports SNMP-FRAMEWORK-MIB::snmpEngineTime.0 (.1.3.6.1.6.3.10.2.1.3.0) that OID's result is expressed in seconds and can be monitored by simply using check_snmp. check_snmp -H router -C public -o SNMP-FRAMEWORK-MIB::snmpEngineTime.0 -c 2000
no Perf data and the plugin shows not very accurate info... But it works like a charm... I've edited myself for my needs: if [ $RES = 0 ]; then UPTDAY=$(expr $UPTMIN / 60 / 24 ) UPTMINT=$(( $UPTDAY * 1440 )) UPTMINM=$(( $UPTMIN - $UPTMINT )) UPTMINH=$(expr $UPTMINM / 60 ) UPTMINHM=$(( $UPTMINH * 60 )) UPTMINHMS=$(( $UPTMINM - $UPTMINHM )) if [ $UPTMIN -lt $CRIT ]; then echo CRITICAL: Systemuptime $UPTDAY Days $UPTMINH Hours $UPTMINHMS Mins'|Uptime='$UPTMIN'm;'$WARN';'$CRIT';0;0' exit 2 fi if [ $UPTMIN -lt $WARN ]; then echo OK: Systemuptime $UPTDAY Days $UPTMINH Hours $UPTMINHMS Mins'|Uptime='$UPTMIN'm;'$WARN';'$CRIT';0;0' exit 0 fi if [ $UPTMIN -ge $WARN ]; then echo WARNING: Systemuptime $UPTDAY Days $UPTMINH Hours $UPTMINHMS Mins'|Uptime='$UPTMIN'm;'$WARN';'$CRIT';0;0' exit 1 fi fi
You must be logged in to submit a review.
To:
From: