[Nagiosplug-devel] [ nagiosplug-Bugs-1267741 ] 1.4.1: check_ntp logic incorrect with >1 peers
SourceForge.net
noreply at sourceforge.net
Tue Dec 20 02:24:10 CET 2005
Bugs item #1267741, was opened at 2005-08-24 08:42
Message generated for change (Comment added) made by zjuran
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1267741&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parsing problem
Group: Release (specify)
Status: Open
Resolution: None
Priority: 5
Submitted By: ozburgess (ozburgess)
Assigned to: Nobody/Anonymous (nobody)
Summary: 1.4.1: check_ntp logic incorrect with >1 peers
Initial Comment:
After finding a matching entry and recording the
jitter, the loop parsing the ntpq output (below) should
exit. Otherwise, it will read the next line, that line
will not match the regex (since it is not the sys.peer
or pps.peer), and $jitter will always be set to '(not
parsed)' (which is what we see with every test).
# match sys.peer or pps.peer
if
(/^(\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z_().]+)\s+([-0-9.]+)\s+([lumb-]+)\s+([-0-9hm.]+)\s+([-0-9
.mh]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/)
{
$syspeer = $2;
$stratum = $4;
$jitter = $11;
print "match $_ \n" if
$verbose;
if ($jitter > $jcrit) {
print
"Jitter_crit = $11 :$jcrit\n" if ($verbose);
$jitter_error =
$ERRORS{'CRITICAL'};
} elsif ($jitter >
$jwarn ) {
print
"Jitter_warn = $11 :$jwarn\n" if ($verbose);
$jitter_error =
$ERRORS{'WARNING'};
} else {
$jitter_error =
$ERRORS{'OK'};
}
########################
# I think we need a loop break here.
########################
} else {
print "No match!\n" if
$verbose;
$jitter = '(not parsed)';
}
----------------------------------------------------------------------
Comment By: Bufalooo (zjuran)
Date: 2005-12-20 11:23
Message:
Logged In: YES
user_id=1405801
see reqid 1381801 perhaps it helps
----------------------------------------------------------------------
Comment By: Bufalooo (zjuran)
Date: 2005-12-20 11:20
Message:
Logged In: YES
user_id=1405801
see reqid 1381801 perhaps it helps
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1267741&group_id=29880
More information about the Devel
mailing list