瀏覽代碼

Merge branch 'issue722' of https://github.com/paulbruedgam/nagios-plugins into paulbruedgam-issue722

Sebastian Wolf 2 年之前
父節點
當前提交
b18c7bfe66
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins-scripts/check_oracle.sh

+ 1 - 1
plugins-scripts/check_oracle.sh

@@ -137,7 +137,7 @@ export ORACLE_HOME PATH LD_LIBRARY_PATH
 case "$cmd" in
 --tns)
     tnschk=$(tnsping "$2")
-    tnschk2=$(echo "$tnschk" | grep -c OK)
+    tnschk2=$(echo "$tnschk" | grep -Ec "^OK \([[:digit:]]+ msec\)")
     if [ "${tnschk2}" -eq 1 ] ; then 
         tnschk3=${tnschk##*(}; tnschk3=${tnschk3%)*}
         echo "OK - reply time ${tnschk3} from $2"