# DCses.ctl:335:Collects Oracle Secure Enterprise Search Information # $Id: DCses.ctl,v 1.8 2015/07/03 12:04:44 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/DCses.ctl,v 1.8 2015/07/03 12:04:44 RDA Exp $ # # Change History # 20150703 MSC Improve the documentation. =head1 NAME OFM:DCses - Collects Oracle Secure Enterprise Search Information =head1 DESCRIPTION This module collects Oracle Secure Enterprise Search-related information. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),'Processing OFM.SES module ...',tput('off') # Initialization var $ORACLE_HOME = ${D_ORACLE_HOME/P:''} var $TAIL = ${N_TAIL:1000} if !$WLS = ${B_REQ_WREQ:false} {var $CRAWLER_LOG = ${D_CRAWLER_LOG:''} var $HOST = ${T_HOST} } var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' pretoc '1:Oracle Secure Enterprise Search' # Load the common macros run RDA:library() =head1 ORACLE HOME COLLECTIONS =head2 abbr - Abbreviations Displays the RDA abbreviations defined for the Oracle home collection. =cut debug ' Inside SES module, collecting defined abbreviations' report abbr prefix {write '---+ Oracle Home Abbreviations' write '|*Abbreviation*|*Location*|' } var %hsh = getSymbols() loop $key (keys(%hsh)) write '|',$key,' |',$hsh{$key},' |' if isCreated(true) toc '2:[[',getFile(),'][rda_report][Abbreviations]]' =head2 build - Build Information Collects build information when the F command is available. =cut if ?findCommand('unzip') {var $cmd = last debug ' Inside SES module, gathering build information' report build prefix write '---+!! Oracle Secure Enterprise Search Build Information' var $fil = catFile($ORACLE_HOME,'search','lib','search_query.jar') if ?testFile('r',$fil) call writeCommand(concat($cmd,' -p ',quote($fil),\ ' "oracle/search/query/buildinfo.properties"')) if isCreated(true) toc '2:[[',getFile(),'][rda_report][Build Information]]' } =head2 status - Status Collects Oracle Secure Enterprise Search status. It uses URLs for collecting information unless the C attribute is set to C in the F file. =cut debug ' Inside SES module, gathering searchctl status information' report status title '---+!! Status Information' title $TOC prefix {write '---+ Searchctl Status' write '---## Using: $ORACLE_HOME/bin/searchctl status' } call writeCommand(concat(catCommand($ORACLE_HOME,'bin','searchctl'),' status')) if hasOutput(true) write $TOP # Derive host and port information for Oracle WebLogic install if $WLS {var $DOM = ${MOD.WREQ_OFM_SES_DOM/i}->get_first('I_DOMAIN') if ?testFile('fr',\ catFile($DOM->get_first('D_DOMAIN_HOME'),'config','config.xml')) {var $obj = xmlLoadFile(last,xmlDisable(xmlParser(),'BCDEPR')) loop $xml (xmlFind($obj,'domain/server')) {next !compare('eq',xmlData(xmlFind($xml,'name')),'search_server1') var $HOST = xmlData(xmlFind($xml,'listen-address')) if !length($HOST) var $HOST = 'localhost' var $prt = xmlData(xmlFind($xml,'listen-port')) break } } } else {var $xml = xmlLoadFile(catFile($ORACLE_HOME,'oc4j','j2ee','OC4J_SEARCH',\ 'config','http-web-site.xml')) var ($obj) = xmlFind($xml,'.../web-site') var $prt = xmlValue($obj,'port') var $sec = xmlValue($obj,'secure') } if !compare('eq',$sec,'true') {write '---+ Secure Enterprise Search Status' write '|*URL*|*Status*|*Message*|' # Use http://server:port/monitor/check.jsp var $url = concat('http://',$HOST,':',$prt,'/monitor/check.jsp') var $req = createRequest('GET',$url) debug ' Inside SES module, requesting ',$url var $rsp = submitRequest($req) if isSuccess($rsp) {var $htm = htmlLoadResponse($rsp,htmlDisable(htmlParser(),'R')) var @arr = htmlTable($htm) if grep(@arr,'Oracle Secure Enterprise Search instance is up') write '|',$url,' |Pass| |' else write '|',$url,' |Fail|',join('%BR%',@arr),' |' } else write '|',$url,' |Fail|',\ join(',',getRspCode($rsp)),' - ',getRspMessage($rsp),' |' # Use http://server:port/search/admin/index.jsp var $url = concat('http://',$HOST,':',$prt,'/search/admin/index.jsp') debug ' Inside SES module, requesting ',$url var $req = createRequest('GET',$url) var $rsp = submitRequest($req) if isSuccess($rsp) write '|',$url,' |Pass| |' else write '|',$url,' |Fail|',\ join(',',getRspCode($rsp)),' - ',getRspMessage($rsp),' |' # Use http://server:port/search/query/search var $url = concat('http://',$HOST,':',$prt,'/search/query/search') debug ' Inside SES module, requesting ',$url var $req = createRequest('GET',$url) var $rsp = submitRequest($req) if isSuccess($rsp) write '|',$url,' |Pass| |' else write '|',$url,' |Fail|',\ join(',',getRspCode($rsp)),' - ',getRspMessage($rsp),' |' write $TOP } if isCreated(true) toc '2:[[',getFile(),'][rda_report][Status]]' =head2 plugins - Plug-ins Lists plug-ins from the F<$ORACLE_HOME/search/lib/plugins> directory. =cut debug ' Inside SES module, gathering plugins information' report plugins var $dir = catDir($ORACLE_HOME,'search','lib','plugins') prefix {write '---+!! Contents of plugins Directory' write '---## Information Taken from ',encode($dir) write $TOC } loop $fil ($dir,grepDir($dir,'^\.+$','drv')) {if ?testDir('d',$fil) {write '---++ Contents of ',encode($fil) call statDir('an',$fil) write $TOP } } if isCreated(true) toc '2:[[',getFile(),'][rda_report][Plug-ins]]' =head2 Configuration Files Collects configuration files. =cut if !$WLS {debug ' Inside SES module, gathering configuration files' pretoc '2:Configuration Files' call sort_files(3,0,\ catFile($ORACLE_HOME,'search','webapp','config','search.properties'),\ catFile($ORACLE_HOME,'search','config','searchctl.conf'),\ catFile($ORACLE_HOME,'search','data','config','crawler.dat'),\ catFile($ORACLE_HOME,'oc4j','j2ee','OC4J_SEARCH','config',\ 'http-web-site.xml')) unpretoc } =head2 Log Files Collects log files. =cut debug ' Inside SES module, gathering log files' var @tbl = () if $WLS {var $top = $DOM->get_prime('I_MW_HOME')->get_first('D_MW_HOME') call push(@tbl,\ grepDir(catDir($top,'logs','crawler','crawler'),'\.(raw|log)$','p')) } else call push(@tbl,\ catFile($ORACLE_HOME,'oc4j','j2ee','OC4J_SEARCH','log','oc4j.log'),\ grepDir($CRAWLER_LOG,'^i1ds.*\.log$','p')) pretoc '2:Log Files' call sort_files(3,$TAIL,@tbl) unpretoc =head1 ORACLE WEBLOGIC SERVER DOMAIN COLLECTIONS Includes the Oracle WebLogic reports generated by the L module. =cut if $WLS {toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("OFM_WREQ_OFM_SES_WH_TF.toc")%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Domain")%' toc '%INCLUDE("OFM_WREQ_OFM_SES_DOM_TF.toc")%' toc '%POP2%' } unpretoc =head1 SEE ALSO L, L =begin credits =over 10 =item RDA 4.17: Sitaramanjaneyulu Kondabolu. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2016, 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