[Nagiosplug-devel] [ nagiosplug-Bugs-1173266 ] check_ntp matching expression and ntpq output

SourceForge.net noreply at sourceforge.net
Mon Apr 18 17:20:15 CEST 2005


Bugs item #1173266, was opened at 2005-03-30 08:07
Message generated for change (Comment added) made by seanius
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1173266&group_id=29880

Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Rusty Allen (wackoadmin)
>Assigned to: M. Sean Finney (seanius)
Summary: check_ntp matching expression  and ntpq output

Initial Comment:
The perl expression being used to parse the output of
ntpq in check_ntp does not account for some possible
output lines create by ntpq.

     remote           refid      st t when poll reach 
 delay   offset  jitter
==============================================================================
-163.185.18.1    192.5.41.40      2 u 116m  18h  377  
 2.133   16.566   2.467
*192.5.41.41     .USNO.           1 u  16h  18h  376  
92.765   13.857  19.226
+204.34.198.40   .USNO.           1 u  10h  18h  376  
66.439  -12.246   1.836
 127.127.1.0     LOCAL(0)        10 l   54   64  377  
 0.000    0.000   0.008
+130.88.200.98   194.81.227.227   2 u   6h  18h  377 
122.584    0.349   4.552
-128.118.25.3    128.118.25.5     2 u 118m  18h  377  
63.745  -44.445  89.870

Note the "hours" tag in the "when" and "poll" values.

I have change the expressionis    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.]+)/)
{

$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.]+)/;




----------------------------------------------------------------------

>Comment By: M. Sean Finney (seanius)
Date: 2005-04-18 20:17

Message:
Logged In: YES 
user_id=226838

fix commited to cvs, thanks

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1173266&group_id=29880




More information about the Devel mailing list