From 17edbb05d44eee6f3d5aef7fa42bd957e47b9970 Mon Sep 17 00:00:00 2001 From: "M. Sean Finney" Date: Thu, 13 Oct 2005 10:20:50 +0000 Subject: 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 diff --git a/plugins-scripts/check_ntp.pl b/plugins-scripts/check_ntp.pl index d6584ae..e844327 100755 --- a/plugins-scripts/check_ntp.pl +++ b/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; -- cgit v0.10-9-g596f