diff options
author | Jan Wagner <waja@cyconet.org> | 2017-01-06 18:02:36 +0100 |
---|---|---|
committer | Jan Wagner <waja@cyconet.org> | 2017-01-06 18:02:36 +0100 |
commit | 5c473c8612a55cc71689bf4ba468a464bf9da197 (patch) | |
tree | d417abe6bb82b3645c9bb65d2d8fd7149b5a8287 /plugins-scripts/check_oracle.sh | |
parent | 1204d7fe56c9f35af6500f5ddbae733a622fb63d (diff) | |
download | monitoring-plugins-5c473c8612a55cc71689bf4ba468a464bf9da197.tar.gz |
Fixing shellcheck SC2143
Diffstat (limited to 'plugins-scripts/check_oracle.sh')
-rwxr-xr-x | plugins-scripts/check_oracle.sh | 6 |
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' | |||
219 | and cg.name='consistent gets'; | 219 | and cg.name='consistent gets'; |
220 | EOF` | 220 | EOF` |
221 | 221 | ||
222 | if [ -n "$(echo "$result" | grep ORA-)" ] ; then | 222 | if echo "$result" | grep -q 'ORA-' ; then |
223 | error=$(echo "$result" | grep "ORA-" | head -1) | 223 | error=$(echo "$result" | grep "ORA-" | head -1) |
224 | echo "CRITICAL - $error" | 224 | echo "CRITICAL - $error" |
225 | exit "$STATE_CRITICAL" | 225 | exit "$STATE_CRITICAL" |
@@ -234,7 +234,7 @@ select sum(lc.pins)/(sum(lc.pins)+sum(lc.reloads))*100 | |||
234 | from v\\$librarycache lc; | 234 | from v\\$librarycache lc; |
235 | EOF` | 235 | EOF` |
236 | 236 | ||
237 | if [ -n "$(echo "$result" | grep ORA-)" ] ; then | 237 | if echo "$result" | grep -q 'ORA-' ; then |
238 | error=$(echo "$result" | grep "ORA-" | head -1) | 238 | error=$(echo "$result" | grep "ORA-" | head -1) |
239 | echo "CRITICAL - $error" | 239 | echo "CRITICAL - $error" |
240 | exit "$STATE_CRITICAL" | 240 | exit "$STATE_CRITICAL" |
@@ -273,7 +273,7 @@ from dba_free_space group by tablespace_name) B | |||
273 | ON a.tablespace_name=b.tablespace_name WHERE a.tablespace_name='${5}'; | 273 | ON a.tablespace_name=b.tablespace_name WHERE a.tablespace_name='${5}'; |
274 | EOF` | 274 | EOF` |
275 | 275 | ||
276 | if [ -n "$(echo "$result" | grep ORA-)" ] ; then | 276 | if echo "$result" | grep -q 'ORA-' ; then |
277 | error=$(echo "$result" | grep "ORA-" | head -1) | 277 | error=$(echo "$result" | grep "ORA-" | head -1) |
278 | echo "CRITICAL - $error" | 278 | echo "CRITICAL - $error" |
279 | exit "$STATE_CRITICAL" | 279 | exit "$STATE_CRITICAL" |