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.
This Nagios plugin checks the time the server is running. It can be used to notify (with a warning or critical exit status) if an host has a boot time lower or greater than a given number of minutes. You can specify the notification ranges by using the standard Nagios syntax: ‘[@]start:end’.
Current Version
7
Last Release Date
2013-02-07
Owner
Davide Madrisan
Website
https://github.com/madrisan/nagios-plugins-uptime
Download URL
https://sites.google.com/site/davidemadrisan/files/nagios-plugins-uptime-7.tar.gz
License
GPL
Compatible With
check_uptime version 7
Usage: check_uptime [--warning [@]start:end] [--critical [@]start:end] Examples: check_uptime check_uptime --warning 30: --critical 15: Supported platforms: * Linux (tested on openmamba GNU/Linux and RHEL 4,5,6) * FreeBSD 8.2-RELEASE-p10 * AIX 6.1 with gcc 4.2.0 * Solaris 11.1 (SunOS solaris 5.11 11.1) with gcc 4.5.2 * OpenIndiana build 151a7 with gcc 4.3.3 * OpenBSD 5.2 with gcc 4,2,1 Please drop me a note if this plugin does not compile or run on your favorite os! Note. The corresponding plugin shipped by nagios-plugins 2.0 or better is based on the clock monotonic function (clock_gettime() with clockid_t eq. to CLOCK_MONOTONIC). According to the POSIX specifications "the value returned by clock_gettime() represents the amount of time (in seconds and nanoseconds) since an unspecified point in the past (for example, system start-time, or the Epoch)". The (recent) Linux kernels returns a value that is somehow related to the system start-time but can be different from the output of the command uptime (procps), or the first value returned by /proc/uptime. $ /usr/bin/uptime 18:45:00 up 8:46, 7 users, load average: 0.67, 1.79, 2.49 $ awk '{printf("%02d:%02dn",($1/60/60%24),($1/60%60))}' /proc/uptime 08:46 $ ./clock_monotonic 4 hours 37 min Conversely, the implementation followed by this Nagios plugins is compatible with uptime and /proc/uptime
This plugin was successfully tested in our production environment on 800 hosts. Now we can see when a host reboots unexpectedly. We are using a critical threshold when uptime is less than 15mn. Thx for your contribution.
You must be logged in to submit a review.
To:
From: