[Nagiosplug-checkins] CVS: nagiosplug/plugins-scripts check_oracle.sh,1.7,1.8

Ton Voon tonvoon at users.sourceforge.net
Wed Jul 2 09:22:15 CEST 2003


Update of /cvsroot/nagiosplug/nagiosplug/plugins-scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv18458

Modified Files:
	check_oracle.sh 
Log Message:
Check for ORA- errors for tablespace and cache (patch 755456 - Sven Meyer)


Index: check_oracle.sh
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins-scripts/check_oracle.sh,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** check_oracle.sh	3 Apr 2003 21:21:59 -0000	1.7
--- check_oracle.sh	2 Jul 2003 16:21:46 -0000	1.8
***************
*** 213,216 ****
--- 213,222 ----
  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
***************
*** 220,223 ****
--- 226,235 ----
  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)}'`
  
***************
*** 249,252 ****
--- 261,270 ----
  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)}'` 





More information about the Commits mailing list