# DCepma.cfg: Collects Enterprise Performance Management Architect Information # $Id: DCepma.cfg,v 1.15 2014/04/30 14:08:54 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/BI/DCepma.cfg,v 1.15 2014/04/30 14:08:54 RDA Exp $ # # Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. # # Change history # 20140430 JGS Extend Middleware home detection. ############################################################################### # Collect EPMA setup information ############################################################################### #------------------------------------------------------------------------------ # Module definition #------------------------------------------------------------------------------ col=${B_IN_USE} dsc='Collects Enterprise Performance Management Architect Information' fam=Cygwin,Unix,Windows pre=BI:DCepm req=?B_REQ_WREQ:OFM:DCwreq rpt=B_IN_USE tgt=${I_OH/C} trg=BI:DCepm,?B_REQ_IREQ:OFM:DCireq,?B_REQ_WREQ:OFM:DCwreq var=not_used # Flow:in_use,B_IN_USE,D_ORACLE_PARENT exe=sdcl { "var ${B_REQ_IREQ/T} = undef "var ${B_REQ_WREQ/T} = undef "if ${AUX.N_DEPTH} " var @{AUX.var} = ('D_ORACLE_PARENT') "elsif ${GRP.EPM.I_OH} " var (${I_OH/T},@{AUX.var}) = \ " (last,cond(${PRF.B_TESTS},'in_use','B_IN_USE')) " "macro derive_mw_home "{if ?testDir('d',${ENV.HYPERION_HOME}) " {var @dir = splitDir(catDir(last)) " call pop(@dir) " if expr('>',scalar(@dir),1) " return catDir(@dir) " } " loop $pth (grep(@{ENV.PATH},'\bepmsystem\d+\b')) " {next !?testDir('d',catDir($pth)) " var @dir = splitDir(last) " while ?$dir = pop(@dir) " {next !match($dir,'^epmsystem\d+$') " break expr('<',scalar(@dir),3) " if compare('eq',$dir[-1],'user_projects') " {call pop(@dir) " return catDir(@dir) " } " } " } " return () "} " "macro is_valid_mw_home "{var ($nam,$dir) = @arg " require testDir('d',$dir),\ " 'The specified Middleware home directory does not exist.' " require isAbsolute($dir),\ " 'The specified Middleware home directory is not an absolute path.' " require testFile('f',catFile($dir,'registry.xml')),\ " 'The specified Middleware home directory does not contain some \ " Oracle WebLogic server related-files. Without a valid directory, the \ " collection will be disabled. Rerun the setup with the correct \ " Middleware home directory.' " var ${AUX.nam} = $nam " return true "} } #------------------------------------------------------------------------------ # Setting definitions for BEGIN-based setup #------------------------------------------------------------------------------ [D_ORACLE_PARENT] typ=D dft=(${ENV.MW_HOME},\ ${ENV.BEA_HOME},\ derive_mw_home()) dsc='Oracle Middleware home' inp='Enter the Oracle Middleware home to be used for data analysis' nam=- ref=is_valid_mw_home('D_ORACLE_PARENT',last) val=F var=exists:set_properties [set_properties] typ=B nam=- exe=sdcl { "var $top = ${D_ORACLE_PARENT} "if ?testDir('d',catDir($top,'user_projects','domains','EPMSystem')) " var ${D_COMMON_DOMAIN_HOME:'Oracle WebLogic Server domain home'} = lastDir() "if findDir($top,'^EPMSystem\d+','fp') " var ${D_ORACLE_HOME:'Oracle home'} = first(last) "if ?testDir('d',catDir($top,'user_projects')) " var ${D_INSTANCE_ROOT:'Instance root directory'} = lastDir() "if findDir($top,'^(jdk\d+|jrockit_\d+)','fp') " var ${D_JAVA_HOME:'Java home'} = first(last) } #------------------------------------------------------------------------------ # Setting definitions for EPMA-based setup #------------------------------------------------------------------------------ [in_use] typ=B dft=true dsc='Is Enterprise Performance Management Architect information requested?' nam=B_IN_USE var=chk_domain,N_TAIL,R_LOG_AGE,B_DB,T_START_TIME,chk_start_time,I_OH [not_used] typ=B dft=false dsc='Is Enterprise Performance Management Architect information requested?' nam=B_IN_USE [B_IN_USE] typ=B dft=${AUX.B_SELECTED} dsc='Is Enterprise Performance Management Architect information requested?' inp='Do you want RDA to analyze Enterprise Performance Management \ Architect (Y/N)?' var=true:chk_domain,N_TAIL,R_LOG_AGE,B_DB,T_START_TIME,chk_start_time,I_OH #------------------------------------------------------------------------------ # Determine the collection approach #------------------------------------------------------------------------------ [chk_domain] typ=D alt=chk_instance dft=${GRP.EPM.D_DOMAIN} dsc='Does EPM contain single domain?' nam=-D_TMP_DOMAIN var=T_SERVERS [chk_instance] typ=D dft=${GRP.EPM.D_INSTANCE_ROOT} dsc='Does EPM contain instance root?' nam=- var=exists:set_ins_properties [set_ins_properties] typ=B nam=- var=true:loop_instances exe=sdcl { "keep %OID "var $flg = false "loop $tgt (@{GRP.EPM.I_ORACLE_INSTANCES}) "{var $dir = $tgt->get_first('D_ORACLE_INSTANCE') " next !?testDir('d',$dir) " var ($ins,$oid) = (basename($dir),$tgt->get_oid) " var ${MOD.${VAR.oid}.D_HOME:"Instance home directory for ${VAR.ins}"} = $dir " var $flg = true " var $OID{$ins} = $oid "} "var ${B_REQ_IREQ:\ " 'Does EPMA require Oracle instance request handler execution?'} = true "var ${AUX.dft} = $flg } [loop_instances] typ=L dft=keys(%OID) dsc='Iterate on each instance' nam=-RUN/SDSL.W_INS var=loop:domain_home #------------------------------------------------------------------------------ # Setting definitions for Oracle WebLogic Server #------------------------------------------------------------------------------ [domain_home] typ=D dft=${GRP.EPM.D_DOMAINS}->{${RUN.SDSL.W_INS}} dsc='Oracle WebLogic Server domain home' nam=-D_TMP_DOMAIN var=exists:T_SERVERS #------------------------------------------------------------------------------ # Select the server(s) #------------------------------------------------------------------------------ [T_SERVERS] typ=M bef="Server list for '${T_TMP_DOM}' domain:" def=concat('./WREQ_BI_EPMA_',replace($OID{${RUN.SDSL.W_INS}},'^OI_','DOM_')) dft='*' dsc="Server list for the domain associated to ${RUN.SDSL.W_INS}" itm=[@{T_TMP_ITM}] pck=true val=E exe=sdcl { "var ($dir,@itm) = (${CTX.D_TMP_DOMAIN}) "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_DOM/T} = $nam = pop(@dir) " var @{T_TMP_ITM/T} = @itm " var ${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=>"Domain ${VAR.nam} (in ${VAR.top})"})) " var ${T_TOP_FOCUS:\ " 'Focus areas for Oracle WebLogic Server Middleware collection'} = \ " 'Generic' " var ${T_DOM_FOCUS:\ " 'Focus areas for Oracle WebLogic Server domain collection'} = \ " 'BI_EPMA,BI_HSS,ExtDomCfg,ExtSnmCfg,ExtSrvCfg,MinDomCfg,MinSrvCfg,\ " NodDomCfg,NodDomLog,SrvErr' " var ${CTX.B_REQ_WREQ:\ " 'Does EPMA require Oracle WebLogic Request Handler collection?'} = true "} } #------------------------------------------------------------------------------ # Common settings #------------------------------------------------------------------------------ [N_TAIL] typ=N dft=5000 dsc='Maximum number of lines to extract from each log file' err='The number of lines must be an integer greater than zero' inp='How many lines do you want RDA to extract starting from the end of each \ log file?' lvl=6 ref='I]0,[' val=F [R_LOG_AGE] typ=N dft=15 dsc='Age limit (in days) of the log files to be collected' err='The number of days must be a positive number' inp='Enter the age limit (in days) for the log files to be collected' lvl=6 ref='R[0,[' val=F [B_DB] typ=B dft=true dsc='Collect information from an Oracle Database' hlp="WARNING: RDBMS information is collected from Oracle Database only.\n" inp='Do you want to collect information from an Oracle Database (Y/N)?' var=true:I_DB [I_DB] typ=I cls='DQ' dft=nvl(findItem('DQ','T_USER','epma'),${SET.DB.DB.I_DB}) dsc='Database to analyze' exe=sdcl { "var ${RUN.CLASS.DQ.B_LOCAL} = false "var ${RUN.CLASS.DQ.T_USER} = 'epma' } [T_START_TIME] typ=T clr='-' dft='' dsc='Start time for collection of job history information' err='Start time format should be DD-Mon-YYYY_HH24:MI' hlp='If you want to collect job history information for a specific time \ interval, enter the start and end times. Otherwise, RDA collects the \ information for the last 14 days.' inp="Enter the time, when you want to start the collection of job history \ information. When a dash (${AUX.clr}) is specified as input, last 14 days \ are considered. Start time should be in DD-Mon-YYYY_HH24:MI format." ref='^([0-3]\d\-[A-Za-z]{3}\-[1-2]\d{3}_[0-2]\d:[0-5]\d)?$' val=E [chk_start_time] typ=B dft=match(${T_START_TIME},'^[0-3]\d\-[A-Za-z]{3}\-[1-2]\d{3}_[0-2]\d:[0-5]\d$') dsc='Check if the end time must be specified' nam=- var=false:end_time:\ T_END_TIME [end_time] typ=T dft='' dsc='End time for collection of job history information' nam=T_END_TIME [T_END_TIME] typ=T clr='-' dft='' dsc='End time for collection of job history information' err='End time format should be DD-Mon-YYYY_HH24:MI' inp="Enter the time, when you want to end the collection of job history \ information. When a dash (${AUX.clr}) is specified as input, current \ time is taken as end time. End time should be in DD-Mon-YYYY_HH24:MI \ format." ref='^([0-3]\d\-[A-Za-z]{3}\-[1-2]\d{3}_[0-2]\d:[0-5]\d)?$' val=E [I_OH] typ=I cls='OH' dsc='Target associated with the EPM home' vis=false