# S571HSS.def: Collects Oracle Hyperion Shared Services Information # $Id: S571HSS.def,v 1.19 2012/08/10 10:48:25 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/S571HSS.def,v 1.19 2012/08/10 10:48:25 mschenke Exp $ # # Change History # 20120808 KRA Improve epmsys_registry collection. =head1 NAME S571HSS - Collects Oracle Hyperion Shared Services Information =head1 DESCRIPTION This module collects information for Oracle Hyperion Shared Services (HSS). The following reports can be generated and is regrouped under C: =cut use Buffer echo tput('bold'),'Processing HSS module ...',tput('off') # Initialization var $EPM_HOME = ${EPM_HOME:${ENV.EPM_ORACLE_HOME:${ENV.HYPERION_HOME:''}}} var $HSS_REQUESTS = getSetting('HSS_REQUESTS') var $TAIL = getSetting('HSS_TAIL',5000) var $MOD = cond(isWindows(),'f',\ isCygwin(), 'f',\ 'fx') var $REG = ${AS.BAT:'epmsys_registry'} var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' pretoc '1:Hyperion Shared Services' # Load the common macros run EPMlib() run library() # Password file on version 11.1.2.2 and later var $EPM_VERSION = get_epm_version($EPM_HOME) if compare('valid',$EPM_VERSION,'11.1.2.2') {var $epm = createTemp('EPMPWD','.tmp',false) if getSetting('SQL_PASSWORD_EPM_REGISTRY') var ($pwd) = unpack('u',last) else var $pwd = askPassword('Enter Shared Services database password:') call writeTemp('EPMPWD',$pwd) call closeTemp('EPMPWD') } =head1 ORACLE HOME INFORMATION =head2 Configuration Files Gets configuration files. =cut debug ' Inside HSS module, gathering configuration files' pretoc '2:Configuration Files' call sort_files(3,0,\ catFile($EPM_HOME,'common','config','11.1.2.0','resources','registry',\ 'logging.xml'),\ catFile($EPM_HOME,'common','utilities','LCM','11.1.2.0','conf',\ 'logging.xml'),\ catFile($EPM_HOME,'common','utilities','UpdateNativeDir',\ 'CSSClientLogging.xml'),\ catFile($EPM_HOME,'products','FinancialManagement','logging',\ 'InteropLogging.xml'),\ catFile($EPM_HOME,'upgrades','foundation','conf','logging.xml')) unpretoc =head2 Log Files Gets log files. =cut debug ' Inside HSS module, gathering log files' pretoc '2:Log Files' call sort_files(3,$TAIL,\ grepDir(catDir($EPM_HOME,'logs','hsf','debug'),'^SharedServices','inp')) unpretoc =head2 cssconfig - CSS Configuration Exports the CSS Configuration using F<$HYPERION_HOME/common/config/9.5.0.0/epmsys_registry.sh> or F<$HYPERION_HOME/common/config/9.5.0.0/epmsys_registry.bat> (on versions earlier than 11.1.2). =cut if !?$HSS_REQUESTS {debug ' Inside HSS module, getting the CSS Configuration' call collect_cssconfig(2,catDir($EPM_HOME,'common','config','9.5.0.0'),$epm) =head2 Oracle WebLogic Server Information Includes the Oracle WebLogic reports generated by the WREQ module for the associated Oracle WebLogic Server domain (on versions earlier than 11.1.2 having a product registry). =cut if ?${HSS_DOM_REQ_DOMAIN} {var $dom = basename(last) toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_HSS_TOP.toc")%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:',"'",$dom,"'",' Domain")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_HSS_DOM.toc")%' toc '%POP2%' } } =head1 DEPLOYMENT REPORTS Available on version 11.1.2 and later. =head2 CSS Configuration Exports the CSS Configuration using F<$INSTANCE_HOME/bin/epmsys_registry.sh> or F<$INSTANCE_HOME/bin/epmsys_registry.bat>. =cut else {loop $uid (split('\|',$HSS_REQUESTS)) {next !$uid var $ins = getSetting(concat('HSS_HOME',$uid)) call setAbbr(concat('HSS_i',$uid)) pretoc '%SPLIT%' pretoc "1+:'",getSetting(concat('HSS_INSTANCE',$uid)),"' Deployment" debug ' Inside HSS module, getting the CSS Configuration' call collect_cssconfig(2,catDir($ins,'bin'),$epm) =head2 Logging Configuration Collects the logging configuration files from the F<$INSTANCE_HOME/config>, and F<$INSTANCE_HOME/diagnostics/logs> directory. =cut debug ' Inside HSS module, getting the logging configuration files' pretoc '2:Configuration Files' call sort_files(3,0,\ catFile($ins,'config','FoundationServices','logging.xml'),\ catFile($ins,'config','ReportingAnalysis','syncCSSId','logging.xml'),\ catFile($ins,'diagnostics','logs','foundation','conf',\ 'hssupgrade.properties')) unpretoc =head2 diaglogs - Diagnostic Log Files Collects the diagnostic log files from the F<$INSTANCE_HOME/diagnostics/logs> directory. =cut report diaglogs var $log = catDir($ins,'diagnostics','logs') var %pat = (\ config => '^(SharedServices.*\.log|registry\.log)$',\ epma => '^SharedServices',\ essbase => '^SharedServices',\ FoundationServices => '^SharedServices',\ hfm => '^InteropJava\.log$',\ install => '^(hfm-cacls-lcmservice|hss-install\.log$)',\ migration => '^LCM',\ registry => '^registry\.log$',\ ReportingAnalysis => '^eiengine\.log$',\ services => '^HyS9FoundationServices.*\.log$') prefix {write '---+!! Diagnostic Log Files' write '---## From: ',$log if $TAIL write ' * Last ',$TAIL,' lines from the log files captured' write ' * Links point to files that have been collected in their original \ format. Opening them directly in your browser can present \ risks. To prevent them, access the file outside the browser or \ use the link to save them and use an adequate viewer.' write '|*File Name*| *Size*|*Last Modified Date*|' } loop $sub ('config','epma','essbase',catDir('essbase','lcm'),\ 'FoundationServices','hfm','install','migration','registry',\ 'ReportingAnalysis','services',catDir('upgrades','foundation')) {loop $fil (grepDir(catDir($log,$sub),nvl($pat{$sub},'\.(log|csv)$'),'ipt')) {if $buf = new('Buffer','r',$fil) {var $lnk = encode($fil) var $siz = getSize($fil) if $siz {output d,concat('L_',basename($fil)) if cond($TAIL,${CUR.LAST}->write_tail($buf,$TAIL,['F',$fil,'F','T']),\ ${CUR.LAST}->write_data($buf,['F',$fil,'F','T'])) var $lnk = concat('[[',${CUR.LAST}->get_file,'][_blank][',$lnk,']]') end ${CUR.LAST} } write '|',$lnk,' | ',$siz,'|',\ getLastModify($fil,'%d-%b-%Y %H:%M:%S'),' |' } } } if isCreated(true) toc '2:[[',getFile(),'][rda_report][Diagnostic Log Files]]' =head2 diagreport - Diagnostic Report Files Collects the diagnostic report files from the F<$INSTANCE_HOME/diagnostics/reports> directory. =cut report diagreport var $log = catDir($ins,'diagnostics','reports') var %pat = (services => 'Foundation') prefix {write '---+!! Diagnostic Report Files' write '---## From: ',$log write ' * Links point to files that have been collected in their original \ format. Opening them directly in your browser can present \ risks. To prevent them, access the file outside the browser or \ use the link to save them and use an adequate viewer.' write '|*File Name*| *Size*|*Last Modified Date*|' } loop $sub ('FoundationServices','registry','migration','services',\ catDir('upgrades','foundation')) {loop $fil (grepDir(catDir($log,$sub),nvl($pat{$sub},'^[^\.]+'),'ipt')) {var $lnk = encode($fil) var $siz = getSize($fil) if $siz {output d,concat('L_',basename($fil)) if ${CUR.LAST}->write_file($fil) var $lnk = concat('[[',${CUR.LAST}->get_file,'][_blank][',$lnk,']]') call $[OUT]->end_report(${CUR.LAST}) } write '|',$lnk,' | ',$siz,'|',\ getLastModify($fil,'%d-%b-%Y %H:%M:%S'),' |' } } if isCreated(true) toc '2:[[',getFile(),'][rda_report][Diagnostic Report Files]]' =head2 Oracle WebLogic Server Information Includes the Oracle WebLogic Server reports generated by the WREQ module for the associated Oracle WebLogic Server domain. =cut if ?getSetting(concat('HSS_DOM',$uid,'_REQ_DOMAIN')) {var $dom = basename(last) toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:Oracle WebLogic Server Overview")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_HSS_TOP',$uid,'.toc",1)%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:',"'",$dom,"'",' Domain")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_HSS_DOM',$uid,'.toc",1)%' toc '%POP2%' } unpretoc 2 } } # Unlink the temporary password file when existing if ?$epm call unlinkTemp('EPMPWD') unpretoc =head1 SEE ALSO L, L, L =begin credits =over 10 =item RDA 4.21: Venkat Maddipati. =item RDA 4.23: Venkat Maddipati. =item RDA 4.24: Maurice Bauhahn, Venkat Maddipati. =item RDA 4.28: Maurice Bauhahn. =item RDA 4.29: Maurice Bauhahn. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. =head1 TRADEMARK NOTICE Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. =cut