[Nagiosplug-devel] [ nagiosplug-Bugs-1200030 ] check_ntp perl expression does not match some values
SourceForge.net
noreply at sourceforge.net
Mon May 16 16:33:04 CEST 2005
Bugs item #1200030, was opened at 2005-05-11 10:31
Message generated for change (Comment added) made by kraby
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1200030&group_id=29880
Category: Parsing problem
Group: CVS
Status: Open
Resolution: None
Priority: 5
Submitted By: Kenny Raby (kraby)
Assigned to: Subhendu Ghosh (sghosh)
Summary: check_ntp perl expression does not match some values
Initial Comment:
check_ntp was returning:
Use of uninitialized value in concatenation (.) or
string at ./check_ntp line 346.
The sys.peer line in the ntpq output was:
*127.127.7.1 CHU_AUDIO(1) 3 - 66m 64 377
0.000 0.000 0.020
The perl regex was not matching the _, ( or )
changed line 277 from:
if
(/^(\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z.]+)\s+([-0-9.]+)\s+([lumb-]+)\s+([-0-9m.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+
([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) {
To:
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.]+)/) {
and line 302 from:
$c =~
/^(#)([-0-9.\s]+)\s+([-0-9A-Za-z.]+)\s+([-0-9.]+)\s+([lumb-]+)\s+([-0-9m.]+)\s+([-0-9.]+)\s+([-0-9
.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/;
to
$c =~
/^(#)([-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.]+)/;
(basically added _() to the $3 check)
----------------------------------------------------------------------
>Comment By: Kenny Raby (kraby)
Date: 2005-05-16 16:30
Message:
Logged In: YES
user_id=908646
Not exactly. It was a response from a Cisco Router and the
line corresponed to the routers own master clock. The show
ntp assoc on the router shows:
+~127.127.7.1 127.127.7.1 3 24 64 377
0.0 0.00 0.0
(see http://www.cisco.com/warp/public/620/ntpassoc.html )
The ntpq -p from the linux server running Nagios gives:
+CHU_AUDIO(1) CHU_AUDIO(1) 3 - 5 64 377
0.000 0.000 0.020
ntpq -p from a Solaris 8 server gives:
+CHU(1) CHU(1) 3 - 5 64 377
0.00 0.000 0.02
(note that the routers is actually synced to another ntp
source thus this shows only as a candidate)
There is a thread here which would indicate this is for a
radio. I think it is just seeing the 127.127.7 and
assigning it that way since as I say this is a router acting
as it's own master so doesn't really have a radio attached
(well I don't think so anyway)
A google search also brings up this:
http://www.hn.edu.cn/book/NetWork/NetworkingBookshelf_2ndEd/tshoot/ch11_03.htm
----------------------------------------------------------------------
Comment By: Subhendu Ghosh (sghosh)
Date: 2005-05-16 15:22
Message:
Logged In: YES
user_id=46572
Thanks for the report - Any idea what the peer is?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1200030&group_id=29880
More information about the Devel
mailing list