On configuring GC 10.2.0.5 to monitor LISTENER SCAN using UDMs ...
Posted
by [email protected]
on Oracle Blogs
See other posts from Oracle Blogs
or by [email protected]
Published on Fri, 26 Mar 2010 18:30:56 +0100
Indexed on
2010/03/26
17:53 UTC
Read the original article
Hit count: 767
Looks like Grid Control 10.2.0.5 is not fully prepared for monitoring
the Grid Infrastructure (11gR2).
Even I'm pretty sure the upcoming version of GC (11g) will of course support all the new features of 11gR2, some customers
are asking for some "hand-made" procedures for monitoring all the new stuff.
I think one of the most critical components that cant be monitored are the LISTENER SCAN, so I have developed a little script for doing so
using the GC User Defined Metrics ( at host level )
I am more than happy to share with you:
### monitor_scan.sh
###
### DESCRIPTION
### SCAN Listener monitoring
###
### RETURNS
###
### NOTES
###
### MODIFIED (DD/MM/YY)
### Oracle 25/03/10 - Creation
###
export ORACLE_HOME=/opt/oracle/soft/11.2/grid
RSC_KEY=$1
AWK=/sbin/awk
if [ ${LISTENER_DOWN_COUNT} != 0 ]; then
SCAN_DOWN_LIST=$(${ORACLE_HOME}/bin/crsctl status resource -w 'TYPE = ora.scan_listener.type' | $AWK \
'BEGIN { FS="="; state = 0; }
$1~/NAME/ && $2~/'$RSC_KEY'/ {appname = $2; state=1};
state == 0 {next;}
$1~/TARGET/ && state == 1 {apptarget = $2; state=2;}
$1~/STATE/ && state == 2 {appstate = $2; state=3;}
state == 3 {printf "%-45s %-10s %-18s\n", appname, apptarget, appstate; state=0;}' | grep OFFLINE | awk '{ print $1 }')
echo em_result=ALERT
echo em_message=There are LISTENER SCAN with down status: [${SCAN_DOWN_LIST}]
else
echo em_result=NORMAL
echo em_message=All SCAN Listener are UP
fi
Hope it helps
L
© Oracle Blogs or respective owner