# S374BAM.def: Collects Business Activity Monitoring Information # $Id: S374BAM.def,v 1.2 2009/02/24 20:39:54 mschenke Exp $ # ARCS: $Header: /u02/webapps/workbench/cvs/RDA_4/src/scripting/lib/modules/S374BAM.def,v 1.2 2009/02/24 20:39:54 mschenke Exp $ # # Change History # 20090224 DEM Improve event log detection. =head1 NAME S374BAM - Collects Business Activity Monitoring Information =head1 DESCRIPTION This module collects Business Activity Monitoring-related information. The following reports can be generated and are regrouped in C: =cut echo tput('bold'),'Processing BAM module ...',tput('off') # Initialization var $BAM_ROOT_DIR = getSetting('BAM_ROOT_DIR') var $BAM_LOG_DIR = getSetting('BAM_LOG_DIR') var $BAM_AGE = getSetting('BAM_AGE') var $ORACLE_HOME = getSetting('SOA_ORACLE_HOME',getSetting('ORACLE_HOME','')) var $TAIL = getSetting('RDA_TAIL',1000) var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' pretoc '1:Business Activity Monitoring' # Load the common macros run library() =head2 root_dir - Root Directory Displays the content of the Business Activity Monitoring root directory. =cut debug ' Inside BAM module, processing BAM Root Directory' report root_dir prefix write '---+!! BAM Root Directory Content' call statDir('an',$BAM_ROOT_DIR) if hasOutput(true) {write $TOP toc '2:[[',getFile(),'][rda_report][Root Directory]]' } =head2 Configuration Files Collects the configuration files from the Business Activity Monitoring root directory. =cut debug ' Inside BAM module, getting the configuration files' pretoc '2:Configuration Files' call sort_files(\ 3,$TAIL,grepDir($BAM_ROOT_DIR,'\.config$','ip'),\ grepDir(catDir($BAM_ROOT_DIR,'config'),'\.(properties|xml)$','ip')) unpretoc =head2 Log Files Collects the Business Activity Monitoring log files from the log directory. =cut debug ' Inside BAM module, getting the log files' pretoc '2:Log Files' call sort_files(3,$TAIL,grepDir($BAM_LOG_DIR,'\.log$','ip')) unpretoc =head2 events - Events Displays the details of all the events related to Business Activity Monitoring services from the application event log. Note: Applicable to Windows platform only. =cut if isWindows() {debug ' Inside BAM module, obtaining the BAM events' if getEnv('SYSTEMROOT') var $dir = last else var ($dir) = command('echo %SystemRoot%') if or(testDir('r',catDir($dir,'system32')),\ testDir('r',catDir($dir,'Sysnative'))) var ($flg,$sys) = (false,lastDir()) else {var ($flg,$sys) = (false,catDir($dir,'system32')) if grepDir(getSetting('RDA_CWD','.'),'^cmd\.exe$','fp') {var $cmd = quote(last,'x') var $flg = grepCommand(concat($cmd,' /c if exist mode.com echo 32to64'),\ '^32to64') } } # Get the event file var $fil = catFile($sys,'config','AppEvent.Evt') if and($flg,not(testFile('r',$fil))) {var $fil = getTemp('evt','.evt') call system(concat($cmd,' /c copy ',\ catCommand($sys,'config','AppEvent.Evt'),' ',\ quote($fil,'x'),' >NUL 2>NUL')) } # Extract the BAM events if testFile('r',$fil) {report events write '---+!!Business Activity Monitoring Events' if !writeEvents($fil,'\b[Bb][Aa][Mm]\b',$BAM_AGE) write '**No Business Activity Monitoring events found.**%BR%' toc '2:[[',getFile(),'][rda_report][Events]]' } if $flg call unlinkTemp('evt') } unpretoc =head1 SEE ALSO L =begin credits =over 10 =item RDA 4.15: Marcus Lachmanez. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002-2009, Oracle. All rights reserved. =head1 TRADEMARK NOTICE Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. =cut