[Nagiosplug-checkins] CVS: nagiosplug/plugins-scripts check_oracle.sh,1.4.2.1,1.4.2.2
Ton Voon
tonvoon at users.sourceforge.net
Wed Jul 2 09:21:05 CEST 2003
Update of /cvsroot/nagiosplug/nagiosplug/plugins-scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv17979
Modified Files:
Tag: r1_3_0
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.4.2.1
retrieving revision 1.4.2.2
diff -C2 -r1.4.2.1 -r1.4.2.2
*** check_oracle.sh 17 Mar 2003 22:24:30 -0000 1.4.2.1
--- check_oracle.sh 2 Jul 2003 16:20:19 -0000 1.4.2.2
***************
*** 211,215 ****
where pr.name = 'physical reads' \
and dbg.name='db block gets' \
! and cg.name='consistent gets'; `
buf_hr=`echo $result | awk '{print int($1)}'`
--- 211,222 ----
where pr.name = 'physical reads' \
and dbg.name='db block gets' \
! 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)}'`
***************
*** 218,223 ****
select sum(lc.pins)/(sum(lc.pins)+sum(lc.reloads))*100 \
! from v\\$librarycache lc ; `
lib_hr=`echo $result | awk '{print int($1)}'`
--- 225,237 ----
select sum(lc.pins)/(sum(lc.pins)+sum(lc.reloads))*100 \
! 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)}'`
***************
*** 248,252 ****
( select tablespace_name,sum(bytes)/1024/1024 free \
from dba_Free_space group by tablespace_name) B \
! where a.tablespace_name=b.tablespace_name and a.tablespace_name='${5}'; `
ts_free=`echo $result | awk '{print int($1)}'`
--- 262,273 ----
( select tablespace_name,sum(bytes)/1024/1024 free \
from dba_Free_space group by tablespace_name) B \
! 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