Code

all alphanumeric accepted for refid on ntpq
authorSubhendu Ghosh <sghosh@users.sourceforge.net>
Sun, 16 Feb 2003 02:18:00 +0000 (02:18 +0000)
committerSubhendu Ghosh <sghosh@users.sourceforge.net>
Sun, 16 Feb 2003 02:18:00 +0000 (02:18 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@325 f882894a-f735-0410-b71e-b25c423dba1c

plugins-scripts/check_ntp.pl

index 67c0a6ae5b643100dd5f1fa22a22774e1e9818ee..cad92a6676b68c4f2b650242f593d63c135cf7c0 100755 (executable)
@@ -232,7 +232,7 @@ if ( $? && !$ignoreret ) {
 #           or 'o' which implies pps.peer
 #           If both exist, the last one is picked. 
 # Field 2: address of the remote peer
-# Field 3: Refid of the clock (0.0.0.0 if unknown, WWWV/PPS/GPS if Stratum1)
+# Field 3: Refid of the clock (0.0.0.0 if unknown, WWWV/PPS/GPS/ACTS/USNO/PCS/... if Stratum1)
 # Field 4: stratum (0-15)
 # Field 5: Type of the peer: local (l), unicast (u), multicast (m) 
 #          broadcast (b); not sure about multicast/broadcast
@@ -260,7 +260,7 @@ if ($have_ntpq) {
                        }
 
                        # match sys.peer or pps.peer
-                       if (/^(\*|o)([-0-9.\s]+)\s+([-0-9WwVvGgPpSs.]+)\s+([-0-9.]+)\s+([lumb]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) {
+                       if (/^(\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z.]+)\s+([-0-9.]+)\s+([lumb]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) {
                                $syspeer = $2;
                                $stratum = $4;
                                $jitter = $11;