[Nagios-devel] check_ntp, suggested changes

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] check_ntp, suggested changes

Post by Guest »

On the xntpdc stuff, seems like "-p" is more informative
rather than "-s". There are cases where "-p" will give you
the "+" and "=" designations for peers/clients where "-s" will
give you nothing. Which leads to my real concern.

When you are doing check_ntp against your ntpd, you really
don't care if your *clients* are out of sync, rather you only
care if your *peers* or your preferred server is out. So...
to get that, you use "-p" and you look for lines that start with
'+', or '=', or '*'.

Simple changes, but it makes more sense to me... Yes???
Something like:

if ( open(NTPDC,"$utils::PATH_TO_NTPDC -p $host 2>&1 |") ) {
while () {
print $_ if ($verbose);
if (/([+=*])([^\s]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)
\s+([-0-9.]+)\s+([-0-9.]+)/) {
if ($8>15) {

This will fix some of the problems that people have reported having
to do with "dispersion too high".

John G. Kemp ~ e-mail: kemp@ns.uoregon.edu
Sr. Security Engineer ~ incidents: security@uoregon.edu
UO Computing Center ~ phone: (541) 346-1704
1225 Kincaid Street ~ fax: (541) 346-4397
Eugene, OR 97403 ~ http://security.uoregon.edu/





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: emp@network-services.uoregon.ed
Locked