Package: nagios-plugins-contrib
Version: 21.20170222
Hi,
the check_uptime script contains a wrong regex matching the uptime command
output. The regex is missing the backslash to properly use the \s
character class. See attached patch for a fix.
Sven
check_uptime/check_uptime | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git i/check_uptime/check_uptime w/check_uptime/check_uptime
index e1e5b99..41b7f26 100644
--- i/check_uptime/check_uptime
+++ w/check_uptime/check_uptime
@@ -540,7 +540,7 @@ if ($check_type==1) { # local
elsif ($uptime_output =~ /up\s+(\d+)\s+min/) {
($days, $hrs, $mins) = (0,0,$1);
}
- elsif ($uptime_output =~ /up\s+(\d+)s+days?,s+(\d+)s+min/) {
+ elsif ($uptime_output =~ /up\s+(\d+)\s+days?,\s+(\d+)\s+min/) {
($days, $hrs, $mins) = ($1,0,$2);
}
else {