|
@@ -8,7 +8,7 @@
|
|
#
|
|
#
|
|
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
-MOSHELVERSION="2.1.7"
|
|
|
|
|
|
+MOSHELVERSION="2.1.8"
|
|
|
|
|
|
#---------------------------------------------------------
|
|
#---------------------------------------------------------
|
|
# init library and files
|
|
# init library and files
|
|
@@ -89,11 +89,10 @@ CheckValueUnder () {
|
|
fi
|
|
fi
|
|
RESULT=$( /bin/bash -c "$Command" | awk "$Awk" | cut -d "." -f 1 | cut -d "," -f 1 )
|
|
RESULT=$( /bin/bash -c "$Command" | awk "$Awk" | cut -d "." -f 1 | cut -d "," -f 1 )
|
|
|
|
|
|
-# if [ -z "$RESULT" ]; then
|
|
|
|
-# TextsAndGraphs "${Name}" 2 "Check failed"
|
|
|
|
-# RESULT=-1
|
|
|
|
-# el
|
|
|
|
- if [ "$RESULT" -ge $Value ]; then
|
|
|
|
|
|
+ if [ -z "$RESULT" ]; then
|
|
|
|
+ TextsAndGraphs "${Name}" 2 "Check failed"
|
|
|
|
+ RESULT=0
|
|
|
|
+ elif [ "$RESULT" -ge $Value ]; then
|
|
TextsAndGraphs "${Name}" 1 "(${RESULT} !over! ${Value}) ${Message}"
|
|
TextsAndGraphs "${Name}" 1 "(${RESULT} !over! ${Value}) ${Message}"
|
|
else
|
|
else
|
|
TextsAndGraphs "${Name}" 0 "(${RESULT} under ${Value}) ok"
|
|
TextsAndGraphs "${Name}" 0 "(${RESULT} under ${Value}) ok"
|
|
@@ -116,11 +115,10 @@ CheckValueOver () {
|
|
fi
|
|
fi
|
|
RESULT=$( /bin/bash -c "$Command" | awk "$Awk" | cut -d "." -f 1 | cut -d "," -f 1 )
|
|
RESULT=$( /bin/bash -c "$Command" | awk "$Awk" | cut -d "." -f 1 | cut -d "," -f 1 )
|
|
|
|
|
|
-# if [ -z "$RESULT" ]; then
|
|
|
|
-# TextsAndGraphs "${Name}" 2 "Check failed"
|
|
|
|
-# RESULT=-1
|
|
|
|
-# el
|
|
|
|
- if [ "$RESULT" -le $Value ]; then
|
|
|
|
|
|
+ if [ -z "$RESULT" ]; then
|
|
|
|
+ TextsAndGraphs "${Name}" 2 "Check failed"
|
|
|
|
+ RESULT=0
|
|
|
|
+ elif [ "$RESULT" -le $Value ]; then
|
|
TextsAndGraphs "${Name}" 1 "(${RESULT} !under! ${Value}) ${Message}"
|
|
TextsAndGraphs "${Name}" 1 "(${RESULT} !under! ${Value}) ${Message}"
|
|
else
|
|
else
|
|
TextsAndGraphs "${Name}" 0 "(${RESULT} over ${Value}) ok"
|
|
TextsAndGraphs "${Name}" 0 "(${RESULT} over ${Value}) ok"
|
|
@@ -143,11 +141,10 @@ CheckCountLessThan () {
|
|
fi
|
|
fi
|
|
RESULT=$( /bin/bash -c "$Command" | awk "$Awk" | wc -l )
|
|
RESULT=$( /bin/bash -c "$Command" | awk "$Awk" | wc -l )
|
|
|
|
|
|
-# if [ -z "$RESULT" ]; then
|
|
|
|
-# TextsAndGraphs "${Name}" 2 "Check failed"
|
|
|
|
-# RESULT=-1
|
|
|
|
-# el
|
|
|
|
- if [ "$RESULT" -ge $Value ]; then
|
|
|
|
|
|
+ if [ -z "$RESULT" ]; then
|
|
|
|
+ TextsAndGraphs "${Name}" 2 "Check failed"
|
|
|
|
+ RESULT=0
|
|
|
|
+ elif [ "$RESULT" -ge $Value ]; then
|
|
TextsAndGraphs "${Name}" 1 "(${RESULT} !above! ${Value}) ${Message}"
|
|
TextsAndGraphs "${Name}" 1 "(${RESULT} !above! ${Value}) ${Message}"
|
|
else
|
|
else
|
|
TextsAndGraphs "${Name}" 0 "(${RESULT} below ${Value}) ok"
|
|
TextsAndGraphs "${Name}" 0 "(${RESULT} below ${Value}) ok"
|
|
@@ -169,11 +166,10 @@ CheckCountMoreThan () {
|
|
fi
|
|
fi
|
|
RESULT=$( /bin/bash -c "$Command" | awk "$Awk" | wc -l )
|
|
RESULT=$( /bin/bash -c "$Command" | awk "$Awk" | wc -l )
|
|
|
|
|
|
-# if [ -z "$RESULT" ]; then
|
|
|
|
-# TextsAndGraphs "${Name}" 2 "Check failed"
|
|
|
|
-# RESULT=-1
|
|
|
|
-# el
|
|
|
|
- if [ "$RESULT" -le $Value ]; then
|
|
|
|
|
|
+ if [ -z "$RESULT" ]; then
|
|
|
|
+ TextsAndGraphs "${Name}" 2 "Check failed"
|
|
|
|
+ RESULT=0
|
|
|
|
+ elif [ "$RESULT" -le $Value ]; then
|
|
TextsAndGraphs "${Name}" 1 "(${RESULT} !below! ${Value}) ${Message}"
|
|
TextsAndGraphs "${Name}" 1 "(${RESULT} !below! ${Value}) ${Message}"
|
|
else
|
|
else
|
|
TextsAndGraphs "${Name}" 0 "(${RESULT} above ${Value}) ok"
|
|
TextsAndGraphs "${Name}" 0 "(${RESULT} above ${Value}) ok"
|