check_uptime work around... with snmp

Leonard Miller Leonard_Miller at udlp.com
Fri Jun 20 18:27:57 CEST 2003


I must have missed that thread.  On Linux you can use swatch and
set it to look for 
shutting down for system reboot
or
Switching to runlevel

and then have swatch send him a message.  

>>> "Serveur-Faucon Surveillance" <SrvFaucon at cslaval.qc.ca> 06/20/03 11:42AM >>>
Hi all,

Someone was looking up a way to be notified when his servers where rebooting. The suggestion at that time was to use the check_uptime check that is in the contrib directory (= means, does not work right now and need some modification).

A work around for this, using snmp, would be to use the check_snmp check (latest daily release of plugins, with the range option.

So the command would look like... (in checkcommands.cfg)
BEGIN --------------------
#snmp
define command{
   command_name snmp_sysuptime
   command_line $USER1$/check_snmp -H $HOSTADDRESS$ -c 300:1 -C $ARG1$ -o .1.3.6.1.2.1.1.3.0
}
----------------- END

-o .1.3.6.1.2.1.1.3.0 = This is the OID uptime in seconds (I think) for everything that does SNMP
-c 300:1 = Assuming that theses are seconds, this option would let me know if it is between 300 seconds and 1 second.

You would have to do some tests to actually see if it is seconds.

Happy hunting. :)

Alex



---------------------------------------------------
Alexandre Racine
Laval-Montréal, Québec, Canada



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php 
_______________________________________________
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



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
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