# S399BIPL.def: Collects Oracle Business Intelligence Publisher Information # $Id: S399BIPL.def,v 1.12 2012/04/17 10:46:45 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/S399BIPL.def,v 1.12 2012/04/17 10:46:45 mschenke Exp $ # # Change History # 20120406 KRA Improve findDir macro usage. =head1 NAME S399BIPL - Collects Oracle Business Intelligence Publisher Information =head1 DESCRIPTION This module collects information about Oracle Business Intelligence Publisher. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),'Processing BIPL module ...',tput('off') # Load the common macros run library() pretoc '1:Oracle Business Intelligence Publisher' if !or(getSetting('BIPL_DOM_REQ_DOMAIN'),\ testDir('d',catDir($ORACLE_HOME,'bifoundation'))) {# Initialization var $BIPL_AGE = getSetting('BIPL_LOG_AGE',5) var $BIPL_HOME = getSetting('BIPL_HOME','') var $BIPL_TAIL = getSetting('BIPL_TAIL',5000) var $AS_TYPE = getSetting('BIPL_WAS_TYPE') var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' =head1 BUSINESS INTELLIGENCE PUBLISHER 10g INFORMATION =head2 Configuration Files Gets Oracle Business Intelligence Publisher configuration files. =cut if !isFiltered() {var $dir = catDir($BIPL_HOME,'xmlp','XMLP','Admin') pretoc '2: Configuration Files' var %flt = (\ 'database-config.xml', ['i','',''],\ 'datasources.xml', ['i','',''],\ 'principals.xml', ['is','user\s+username=".*?"\s+password="','"'],\ 'xmlp-server-config.xml',['i','property\s+name=".*password"\s+value="','"']) loop $fil (\ catFile($dir,'Configuration','xmlp-server-config.xml'),\ catFile($dir,'Security','principals.xml'),\ catFile($dir,'Security','security.xml'),\ catFile($dir,'DataSource','datasources.xml'),\ catFile($dir,'Scheduler','database-config.xml')) {if testFile('r',$fil) {var $nam = basename($fil) report $nam prefix {write '---+ Display of ',encode($nam),' File' write '---## Information Taken from ',encode($fil) } call statFile('b',$fil) if !exists($flt{$nam}) call writeFile($fil) elsif createBuffer('XML','F',$fil) {call filterBuffer('XML','%R:PASSWORD%',@{$flt{$nam}}) call writeBuffer('XML') call deleteBuffer('XML') } if isCreated(true) toc '3:[[',getFile(),'][rda_report][',encode($nam),']]' } } unpretoc } =head2 Log Files Gets Oracle Business Intelligence Publisher log files. =cut pretoc '2:Log Files' if testFile('r',catFile($BIPL_HOME,'oc4j_bi','j2ee','home','log','oc4j',\ 'log.xml')) {var $fil = lastFile() call sort_files(3,$BIPL_TAIL,$fil) } unpretoc =head2 Oracle Application Server Information Collects the F files found in the F subdirectories. =cut if match($AS_TYPE,'OAS') {pretoc '2:Oracle Application Server Information' var @fil var $dir = catDir(getSetting('BIPL_OAS_HOME'),'j2ee') loop $hom (findDir($dir,'oc4j','r',3)) {if testFile('r',catFile($hom,'log.xml')) call push(@fil,lastFile()) } call sort_files(3,$BIPL_TAIL,@fil) unpretoc } =head2 Apache Tomcat Log Files Collects recent log files from the Apache Tomcat installation logs directory. =cut elsif match($AS_TYPE,'TOM') {pretoc '2:Apache Tomcat Log Files' var $dir = catDir(getSetting('BIPL_TOMCAT_HOME'),'logs') call sort_files(3,$BIPL_TAIL,grepDir($dir,'\.log$',concat('ipm',$BIPL_AGE))) unpretoc } =head2 IBM WebSphere Log Files Collects recent log files from the IBM WebSphere installation logs directory. =cut elsif match($AS_TYPE,'WSP') {pretoc '2:IBM WebSphere Log Files' var $dir = catDir(getSetting('BIPL_WSP_HOME'),'logs') call sort_files(3,$BIPL_TAIL,grepDir($dir,'\.log$',concat('ipm',$BIPL_AGE))) unpretoc } } =head1 BUSINESS INTELLIGENCE PUBLISHER 11g INFORMATION =head2 Configuration Files Gets Oracle Business Intelligence Publisher configuration files. =cut else {if !isFiltered() {var $dir = catDir(getSetting('ORACLE_HOME'),'clients','bipublisher',\ 'repository','Admin','Security') pretoc '2: Configuration Files' loop $fil (grepDir($dir,'\.xml','np')) {if compare('ne',basename($fil),'principals.xml') var @fil = (@fil,$fil) } call sort_files(3,0,grepDir($dir,'\.(xsd|product|instance)','np'),@fil) if testFile('r',catFile($dir,'principals.xml')) {var $fil = lastFile() var $nam = basename($fil) report $nam prefix {write '---+ Display of ',encode($nam),' File' write '---## Information Taken from ',encode($fil) } call statFile('b',$fil) if createBuffer('XML','F',$fil) {call filterBuffer('XML','%R:PASSWORD%','is',\ 'user\s+username=".*?"\s+password="','"') call writeBuffer('XML') call deleteBuffer('XML') } if isCreated(true) toc '4:[[',getFile(),'][rda_report][',encode($nam),']]' } unpretoc } =head1 COMMON HOME INFORMATION Includes the reports generated by the IREQ module about the common home. =cut toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Common Product Home")%' toc '%INCLUDE("',${CUR.GROUP},'_IREQ_BIPL_CH.toc")%' toc '%POP2%' =head1 ORACLE INSTANCE INFORMATION Includes the reports generated by the IREQ module for about the Oracle instances and their associated Oracle homes. =cut loop $key (grepSetting('^BIPL_OI\d+_REQ_INSTANCE$')) {var $tid = substr($key,0,-13) var $ins = basename(getSetting($key,'')) toc '%PUSH("0: * ',"'",$ins,"'",' Instance")%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:Associated Oracle Home")%' toc '%INCLUDE("',${CUR.GROUP},'_IREQ_',replace($tid,'_OI','_OH'),'.toc",1)%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:Instance Home")%' toc '%INCLUDE("',${CUR.GROUP},'_IREQ_',$tid,'.toc")%' toc '%POP3%' } =head1 ORACLE WEBLOGIC SERVER INFORMATION Includes the Oracle WebLogic Server reports generated by the WREQ module for the associated Oracle WebLogic Server domain. =cut if ?${BIPL_DOM_REQ_DOMAIN} {var $dom = basename(last) toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_BIPL_TOP.toc")%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:',"'",$dom,"'",' Domain")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_BIPL_DOM.toc")%' toc '%POP2%' } } unpretoc =head1 SEE ALSO L, L, L =begin credits =over 10 =item RDA 4.23: Linda Klein, Mitra Veluri. =item RDA 4.24: Greg Cook, Andrew Salt. =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