On configuring GC 10.2.0.5 to monitor LISTENER SCAN using UDMs ...
- by [email protected]
Hi,Looks like Grid Control 10.2.0.5 is not fully prepared for monitoringthe 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 customersare 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 sousing the GC User Defined Metrics ( at host level )I am more than happy to share with you:#!/bin/ksh
### NAME###
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/gridRSC_KEY=$1AWK=/sbin/awk
LISTENER_DOWN_COUNT=$(${ORACLE_HOME}/bin/crsctl status
resource -w 'TYPE = ora.scan_listener.type' | grep OFFLINE | wc -l)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
UPfiHope it helpsL