[Nagiosplug-devel] [ nagiosplug-Bugs-1200030 ] check_ntp perl expression does not match some values
    SourceForge.net 
    noreply at sourceforge.net
       
    Mon May 16 15:45:22 CEST 2005
    
    
  
Bugs item #1200030, was opened at 2005-05-11 13:31
Message generated for change (Comment added) made by sghosh
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: Subhendu Ghosh (sghosh)
Date: 2005-05-16 18: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