# DCgrid.cfg: Collects Oracle Management Server and Repository Information # $Id: DCgrid.cfg,v 1.20 2015/11/03 11:10:19 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/EM/DCgrid.cfg,v 1.20 2015/11/03 11:10:19 RDA Exp $ # # Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. # # Change history # 20151102 KRA Add T_SERVERS setting. ############################################################################### # Collect Oracle Enterprise Manager Grid Control setup information ############################################################################### #------------------------------------------------------------------------------ # Module definition #------------------------------------------------------------------------------ col=${B_IN_USE} dsc='Collects Oracle Management Server and Repository Information' pre=RDA:DCbegin req=?B_REQ_IREQ:OFM:DCireq,?B_REQ_WREQ:OFM:DCwreq rpt=B_IN_USE,D_GRID_HOME,B_EMDIAG_IN_USE tgt=${I_ORACLE_HOME/C} trg=?B_REQ_IREQ:OFM:DCireq,?B_REQ_WREQ:OFM:DCwreq var=not_used # Flow:in_use,oracle_home,B_IN_USE,D_GRID_HOME exe=sdcl { "var ${B_REQ_IREQ/T} = undef "var ${B_REQ_WREQ/T} = undef "var @{AUX.var} = \ " cond(${AUX.N_DEPTH},list('D_GRID_HOME','oracle_home'),\ " ${PRF.B_TESTS},list('in_use'),\ " list('B_IN_USE')) } #------------------------------------------------------------------------------ # Setting definitions for BEGIN-based setup #------------------------------------------------------------------------------ [D_GRID_HOME] typ=D dft=${ENV.ORACLE_HOME} dsc='Oracle Enterprise Manager Cloud/Grid Control directory' err='Warning: The specified directory does not -yet- exist' inp='Enter the Oracle Enterprise Manager Cloud/Grid Control (OMS) home \ directory location' val=W [oracle_home] typ=D dft=${D_GRID_HOME} dsc='Oracle home' nam=D_ORACLE_HOME #------------------------------------------------------------------------------ # Setting definitions for GRID-based setup #------------------------------------------------------------------------------ [in_use] typ=B dft=true dsc='Is Oracle Enterprise Manager Cloud/Grid Control information requested?' nam=B_IN_USE var=chk_oms_home,chk_mapping,chk_version,B_INTERIM [not_used] typ=B dft=false dsc='Is Oracle Enterprise Manager Cloud/Grid Control information requested?' nam=B_IN_USE [B_IN_USE] typ=B dft=${AUX.B_SELECTED} dsc='Is Oracle Enterprise Manager Cloud/Grid Control information requested?' inp='Do you want RDA to analyze Oracle Enterprise Manager Cloud/Grid Control \ (Y/N)?' var=true:chk_oms_home,chk_mapping,chk_version,B_INTERIM [chk_oms_home] typ=D alt=D_SERVER_HOME dft=${SET.RDA.BEGIN.D_GRID_HOME} dsc='Oracle Enterprise Manager Cloud/Grid Control directory' nam=D_SERVER_HOME var=set_home_target [D_SERVER_HOME] typ=D dft=(catDir(${SET.RDA.BEGIN.D_ORACLE_PARENT},'oms'),\ catDir(${SET.RDA.BEGIN.D_ORACLE_PARENT},'oms11g')) dsc='Oracle Enterprise Manager Cloud/Grid Control directory' err='Warning: The specified directory does not -yet- exist' inp='Enter the Oracle Enterprise Manager Cloud/Grid Control (OMS) home \ directory location' val=W var=exists:set_home_target [set_home_target] typ=I cls='OH' dft=nvl(findItem('OH','D_ORACLE_HOME',${D_SERVER_HOME}),\ defineTarget('OH',{D_ORACLE_HOME=>${D_SERVER_HOME},\ T_ORACLE_HOME=>${D_SERVER_HOME},\ T_TITLE =>"Grid home ${D_SERVER_HOME}"})) dsc='Target associated with the Grid home' nam=I_ORACLE_HOME vis=false #------------------------------------------------------------------------------ # Get the instance and domain details #------------------------------------------------------------------------------ [chk_mapping] typ=B dsc='Check for emInstanceMapping.properties file' # stopwords emInstanceMapping nam=- var=true:set_req_instance,set_req_domain exe=sdcl { "if ?testFile('f',catFile(${D_SERVER_HOME},'sysman','config',\ " 'emInstanceMapping.properties')) "{var ${AUX.dft} = true " if grepFile(lastFile(),'^[^\043]*.*?=(.*\bemgc\.properties)\s*$','f1') " {var ($fil) = last " if $flg = or(isWindows(),isCygwin()) " var $fil = s($fil,'^(\w+)\\:','$1:') " if loadFile(catFile($fil)) " {if grepLastFile('^[^\043]*EM_WEBTIER_INSTHOME=(.*?)\s*$','f1') " var ${D_TMP_INS/T} = catDir(cond($flg,s(last,'^(\w+)\\:','$1:'),last)) " if grepLastFile('^[^\043]*EM_DOMAIN_HOME=(.*?)\s*$','f1') " var ${D_TMP_DOM/T} = catDir(cond($flg,s(last,'^(\w+)\\:','$1:'),last)) " } " } "} } [set_req_instance] typ=B dft=false dsc='Does GRID require Oracle instance request handler execution?' nam=B_REQ_IREQ exe=sdcl { "if ?testDir('d',${D_TMP_INS}) "{var ${AUX.dft} = true " var ${MOD.IREQ_EM_GRID_OI.I_ORACLE_INSTANCE:\ " 'Target associated with the Oracle instance home'} = $tgt = \ " nvl(findItem('OI','D_ORACLE_INSTANCE',${D_TMP_INS}),\ " defineTarget('OI',{\ " D_ORACLE_INSTANCE=>${D_TMP_INS},\ " T_TITLE =>"Cloud/Grid Instance ${D_TMP_INS}"})) " var ${MOD.IREQ_EM_GRID_OI.T_OH_FOCUS:\ " 'Focus areas for Oracle home associated to the instance home'} = \ " 'HTTP,OPMN' " var ${MOD.IREQ_EM_GRID_OI.T_OI_FOCUS:\ " 'Focus areas for instance home'} = 'HTTP,OPMN' " if ?$tgt->get_first('I_ORACLE_HOME')\ " ->get_first('I_MW_HOME')\ " ->get_first('I_COMMON_HOME') " {var ${MOD.IREQ_EM_GRID_CH.I_COMMON_HOME:\ " 'Target associated with the Oracle common home'} = last " var ${MOD.IREQ_EM_GRID_CH.T_CH_FOCUS:\ " 'Focus areas for common home collection'} = \ " 'Generic,Manifest,WlsGeneric' " } "} } [set_req_domain] typ=B dft=false dsc='Does GRID require Oracle WebLogic request handler execution?' nam=B_REQ_WREQ var=true:T_SERVERS exe=sdcl { "if ?$dir = testDir('d',${D_TMP_DOM}) "{if expr('>',scalar(@dir = splitDir($dir)),1) " {var ${AUX.dft} = true " var $nam = pop(@dir) " var ${MOD.WREQ_EM_GRID_DOM.I_DOMAIN:\ " 'Target associated with the domain'} = \ " nvl(findItem('DOM','D_DOMAIN_HOME',getShortPath($dir,true)),\ " defineTarget('DOM',{\ " D_DOMAIN_ROOT=>$top = catNative(@dir,''),\ " T_DOMAIN_NAME=>$nam,\ " T_TITLE=>"Cloud/Grid Domain ${VAR.nam} (in ${VAR.top})"})) " var ${MOD.WREQ_EM_GRID_DOM.T_TOP_FOCUS:\ " 'Focus areas for Oracle WebLogic Server Middleware collection'} = \ " 'Generic' " var ${MOD.WREQ_EM_GRID_DOM.T_DOM_FOCUS:\ " 'Focus areas for Oracle WebLogic Server domain collection'} = \ " 'ExtDomCfg,ExtSnmCfg,EM_GRID,MinDomCfg,MinSrvCfg,NodDomCfg,\ " NodDomLog,SrvErr' " } "} } [T_SERVERS] typ=M bef="Server list for '${T_TMP_NAM}' domain:" def='./WREQ_EM_GRID_DOM' dft='*' dsc='Domain server list' itm=[@{T_TMP_ITM}] pck=true val=E exe=sdcl { "var ($dir,@itm) = (${CTX.D_TMP_DOM}) "if expr('>',scalar(@dir = splitDir($dir)),1) "{loop $srv (findDir(catDir($dir,'servers'),'^[^\.]+$','n')) " {if ?testDir('d',catDir($dir,'servers',$srv,'logs')) " call push(@itm,$srv,$srv) " } " var ${T_TMP_NAM/T} = $nam = pop(@dir) " var @{T_TMP_ITM/T} = @itm "} } #------------------------------------------------------------------------------ # Other settings #------------------------------------------------------------------------------ [chk_version] typ=B dsc='Check for Cloud Control 12c install' nam=- var=true:use_c_emdiag_omsvfy,use_c_emdiag_repvfy,B_NO_NAMES,B_HCVE_CHECKS:\ use_g_emdiag,B_PING_TEST exe=sdcl { "var ($pgm,$ver) = (catCommand(${D_SERVER_HOME},'bin',${AS.BATCH:'emctl'})) "once "{if loadCommand({cmd => concat($pgm,' status oms'),\ " env => {PERL5LIB => ${ENV.PERL5LIB},\ " PERL5OPT => ${ENV.PERL5OPT}}}) " {if grepLastFile('\sRelease\s','f') " break ($ver) = match(last,'\s(\d+(\.\d+){3,})') " } " if loadCommand({cmd => concat($pgm,' getversion oms'),\ " env => {PERL5LIB => ${ENV.PERL5LIB},\ " PERL5OPT => ${ENV.PERL5OPT}}}) " {if grepLastFile('\sOMS Version\s','f') " break ($ver) = match(last,'\s(\d+(\.\d+){3,})') " } "} "var ${AUX.dft} = compare('VALID',$ver,'12') } [use_c_emdiag_omsvfy] typ=B dft=${B_EMDIAG_OMSVFY_IN_USE:false} dsc='Is Cloud Control EMDIAG OMSVFY diagnostic kit information requested?' inp='Do you want to run the EMDIAG OMSVFY diagnostic kit on the Cloud Control \ OMS (Y/N)?' nam=B_EMDIAG_OMSVFY_IN_USE var=true:D_EMDIAG_OMSVFY_TOP [D_EMDIAG_OMSVFY_TOP] typ=D clr='-' dft=${ENV.EMDIAG_HOME:catDir(${D_SERVER_HOME},'emdiag')} dsc='Cloud Control EMDIAG OMSVFY diagnostic kit directory' err='Warning: The specified directory does not -yet- exist' inp="To collect the log files from a local EMDIAG OMSVFY diagnostic kit \ installation, enter the EMDIAG OMSVFY diagnostic kit top-level directory \ location, where its 'log' directory is present. Otherwise, enter a dash \ (${AUX.clr})." val=W [use_c_emdiag_repvfy] typ=B dft=${B_EMDIAG_REPVFY_IN_USE:false} dsc='Is Cloud Control EMDIAG REPVFY diagnostic kit information requested?' inp='Do you want to run the EMDIAG REPVFY diagnostic kit on the Cloud Control \ Repository (Y/N)?' nam=B_EMDIAG_REPVFY_IN_USE var=true:D_EMDIAG_REPVFY_TOP,R_AUDIT_AGE,R_VIOLATION_AGE [D_EMDIAG_REPVFY_TOP] typ=D clr='-' dft=${ENV.EMDIAG_HOME:catDir(${D_SERVER_HOME},'emdiag')} dsc='Cloud Control EMDIAG REPVFY diagnostic kit directory' err='Warning: The specified directory does not -yet- exist' inp="To collect the log files from a local EMDIAG REPVFY diagnostic kit \ installation, enter the EMDIAG REPVFY diagnostic kit top-level directory \ location, where its 'log' directory is present. Otherwise, enter a dash \ (${AUX.clr})." val=W [use_g_emdiag] typ=B dft=${B_EMDIAG_IN_USE:false} dsc='Is Grid Control EMDIAG kit information requested?' inp='Do you want EMDIAG kit results on the Grid OMS Repository (Y/N)?' nam=B_EMDIAG_IN_USE var=true:D_EMDIAG_TOP,R_AUDIT_AGE,R_VIOLATION_AGE [D_EMDIAG_TOP] typ=D clr='-' dft=${ENV.EMDIAG_HOME:catDir(${D_SERVER_HOME},'emdiag')} dsc='Cloud/Grid Control EMDIAG kit directory' err='Warning: The specified directory does not -yet- exist' inp="To collect the log files from a local EMDIAG kit installation, enter the \ EMDIAG kit top-level directory location, where its 'log' directory is \ present. Otherwise, enter a dash (${AUX.clr})." val=W [R_AUDIT_AGE] typ=N dft=30 dsc='Age limit (in days) of the audit events to be collected' err='The number of days must be an integer greater than zero' inp='Specify the age limit (in days) of the audit events to be collected' lvl=6 ref='R]0,[' val=E [R_VIOLATION_AGE] typ=N dft=15 dsc='Age limit (in days) of the violations to be collected' err='The number of days must be an integer greater than zero' inp='Specify the age limit (in days) of the violations to be collected' lvl=6 ref='R]0,[' val=E [B_NO_NAMES] typ=B dft=true dsc='Do you want to disable name resolution in component port report?' inp="Do you want to disable name resolution when reporting component port \ information (Y/N)?" lvl=6 [B_HCVE_CHECKS] typ=B dft=${PRF.B_HCVE_CHECKS} dsc='Are Oracle EM Cloud Control 12c postinstallation checks requested?' inp='Do you want RDA to execute Oracle Enterprise Manager Cloud Control 12c \ postinstallation checks (Y/N)?' lvl=6 [B_PING_TEST] typ=B dft=false dsc='Do you want to perform agent ping test?' inp='Do you want to perform agent ping test (Y/N)?' var=true:T_PING_LIST [T_PING_LIST] typ=T dsc='Agent host names for which a ping test should be performed' dup='Duplicate host name' end='.' inp="You can enter multiple host names one by one and finish the list by \ entering a period (${AUX.end}) at last. Enter an agent host name or a \ period (${AUX.end}) to end." [B_INTERIM] typ=B dft=false dsc='Collect the file/directory list for the interim patches' inp='Do you want to collect the file/directory list for the interim patches \ in inventory (Y/N)?' lvl=6