Browse Source

debian bts #268044:
- use a "less beastly" regex for parsing ntpq output. probably need
some more widespread testing on this one.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1250 f882894a-f735-0410-b71e-b25c423dba1c

M. Sean Finney 20 years ago
parent
commit
17edbb05d4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins-scripts/check_ntp.pl

+ 1 - 1
plugins-scripts/check_ntp.pl

@@ -293,7 +293,7 @@ if ($have_ntpq) {
 			}
 			
 			# match sys.peer or pps.peer
-			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.]+)/) {
+			if (/^(\*|o)(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/) {
 				$syspeer = $2;
 				$stratum = $4;
 				$jitter = $11;