]> git.pld-linux.org Git - packages/monitoring-plugin-check_mysql-heartbeat.git/commitdiff
strip decimals, shell doesn't process these
authorElan Ruusamäe <glen@delfi.ee>
Tue, 22 Mar 2016 11:38:07 +0000 (13:38 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Tue, 22 Mar 2016 11:38:07 +0000 (13:38 +0200)
check_mysql-heartbeat.sh

index d6c7805ee903e530c20093df481d915e58abc2af..43a1ea241a88921d72e920af008e5b4b763ba983 100755 (executable)
@@ -124,6 +124,9 @@ if [ "$rc" != 0 ]; then
        die UNKNOWN "$secs"
 fi
 
+# strip decimals, shell doesn't process these
+secs=${secs%[.,]*}
+
 [ $secs -gt $critical ] && die CRITICAL "$heartbeat on $hostname $secs seconds over critical treshold $critical seconds"
 [ $secs -gt $warning ] && die WARNING "$heartbeat on $hostname $secs seconds over warning treshold $warning seconds"
 
This page took 0.046979 seconds and 4 git commands to generate.