aboutsummaryrefslogtreecommitdiff
path: root/plugins-scripts/check_oracle.sh
diff options
context:
space:
mode:
authorGravatar Jan Wagner <waja@cyconet.org> 2017-01-06 18:02:36 +0100
committerGravatar Jan Wagner <waja@cyconet.org> 2017-01-06 18:02:36 +0100
commit5c473c8612a55cc71689bf4ba468a464bf9da197 (patch)
treed417abe6bb82b3645c9bb65d2d8fd7149b5a8287 /plugins-scripts/check_oracle.sh
parent1204d7fe56c9f35af6500f5ddbae733a622fb63d (diff)
downloadmonitoring-plugins-5c473c8612a55cc71689bf4ba468a464bf9da197.tar.gz
Fixing shellcheck SC2143
Diffstat (limited to 'plugins-scripts/check_oracle.sh')
-rwxr-xr-xplugins-scripts/check_oracle.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh
index 70a3fefa..9b9540a6 100755
--- a/plugins-scripts/check_oracle.sh
+++ b/plugins-scripts/check_oracle.sh
@@ -219,7 +219,7 @@ and dbg.name='db block gets'
and cg.name='consistent gets';
EOF`
- if [ -n "$(echo "$result" | grep ORA-)" ] ; then
+ if echo "$result" | grep -q 'ORA-' ; then
error=$(echo "$result" | grep "ORA-" | head -1)
echo "CRITICAL - $error"
exit "$STATE_CRITICAL"
@@ -234,7 +234,7 @@ select sum(lc.pins)/(sum(lc.pins)+sum(lc.reloads))*100
from v\\$librarycache lc;
EOF`
- if [ -n "$(echo "$result" | grep ORA-)" ] ; then
+ if echo "$result" | grep -q 'ORA-' ; then
error=$(echo "$result" | grep "ORA-" | head -1)
echo "CRITICAL - $error"
exit "$STATE_CRITICAL"
@@ -273,7 +273,7 @@ from dba_free_space group by tablespace_name) B
ON a.tablespace_name=b.tablespace_name WHERE a.tablespace_name='${5}';
EOF`
- if [ -n "$(echo "$result" | grep ORA-)" ] ; then
+ if echo "$result" | grep -q 'ORA-' ; then
error=$(echo "$result" | grep "ORA-" | head -1)
echo "CRITICAL - $error"
exit "$STATE_CRITICAL"