[Nagiosplug-devel] [ nagiosplug-Bugs-1200030 ] check_ntp perl expression does not match some values
SourceForge.net
noreply at sourceforge.net
Wed May 11 10:33:43 CEST 2005
Bugs item #1200030, was opened at 2005-05-11 10:31
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: Nobody/Anonymous (nobody)
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)
----------------------------------------------------------------------
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