summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b25150f)
raw | patch | inline | side by side (parent: b25150f)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Wed, 2 Jul 2003 16:21:46 +0000 (16:21 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Wed, 2 Jul 2003 16:21:46 +0000 (16:21 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@581 f882894a-f735-0410-b71e-b25c423dba1c
plugins-scripts/check_oracle.sh | patch | blob | history |
index 22ba2bb6a753bd47fce9652380acfa5ad880c101..ba15dc852152255e40a04b7b17fbb49d13cd5cd6 100755 (executable)
and cg.name='consistent gets';
EOF`
+ if [ -n "`echo $result | grep ORA-`" ] ; then
+ error=` echo "$result" | grep "ORA-" | head -1`
+ echo "CRITICAL - $error"
+ exit $STATE_CRITICAL
+ fi
+
buf_hr=`echo $result | awk '{print int($1)}'`
result=`sqlplus -s ${3}/${4}@${2} << EOF
set pagesize 0
from v\\$librarycache lc;
EOF`
+ if [ -n "`echo $result | grep ORA-`" ] ; then
+ error=` echo "$result" | grep "ORA-" | head -1`
+ echo "CRITICAL - $error"
+ exit $STATE_CRITICAL
+ fi
+
lib_hr=`echo $result | awk '{print int($1)}'`
if [ $buf_hr -le ${5} -o $lib_hr -le ${5} ] ; then
where a.tablespace_name=b.tablespace_name and a.tablespace_name='${5}';
EOF`
+ if [ -n "`echo $result | grep ORA-`" ] ; then
+ error=` echo "$result" | grep "ORA-" | head -1`
+ echo "CRITICAL - $error"
+ exit $STATE_CRITICAL
+ fi
+
ts_free=`echo $result | awk '{print int($1)}'`
ts_total=`echo $result | awk '{print int($2)}'`
ts_pct=`echo $result | awk '{print int($3)}'`