#Triple D Consulting #Network Attached Device Diagnostic System #README File Agent Name: chk_oracle Agent Agent Version: Version 1.6 Agent Author: Dustin Downs Agent Date: 2003-Apr-15 Agent Purpose: Agent makes a connection to specified Oracle DB instance and reports result, success or fail. Agent How Does It work: User must set oracle home in $BCNUHOME/etc/chk_oracle.conf. Tries to connect to all dbs in param list. Uses oracle sqlclient. checks exit status of grep (on the output of the sqlclient connect statement) to determine success of attempt. Warning is thrown if file to grep is not found, or if non standard error occurs. Ok status given if all DB connections succede. Error status given if any DB connection fails. NOTE: See above! User must create and edit conf file for agent. Set oracle home there. If ANY of the connection attempts fail, bcnu will throw an error warning to the summary page. However, each connection attempt is evaluated independantly and will be listed in the detailed report. ALL connections must succede to send an OK status message. Agent History: First revision used all hardcoded info. Second main revision used params for user, pass and sid. Third revision setup oracle home in the script, and set oraenv properly.Fourth revision fixed Oraenv usage and cleaned up output to webpage. Fifth revision resolved issues by including a configuration file. Sixth revision fixed datestamp for sorting and made more verbose data backup messages. Agent Installation Instructions: Place agent in the agent directory within the $BCNUHOME directory. Add into $BCNUHOME/etc/agents file. Usual calling syntax. Agent call example: agent:chk_oracle:0-24:15:8:enabled:user=pass=sid: eg. agent:chk_oracle:0-24:2:5:enabled:RestrictedUser=myPasswd=mySID: Agent Operating Dependancies: Linux (Tested on Redhat 7.3) Very limited user acct setup for bcnu to use Kernel used - 2.4.18-27.7.x Agent Application Dependancies: BCNU v1.22 Oracle sqlclient available Features To Add: -Improve ouput -----------------TESTING-------------------------- Tested by: Dave Blizard Date Tested: April 15, 2003 Testing platform: Redhat 7.3, Oracle 9i sqlclient, BCNU v1.22 Testing methodology: Force errors by: testing non existant SID's, using bad passwords and wrong username. All variations on forced errors responded as expected. Warn condtions: File to grep status from does not exist (ie was not created) or other grep error (return status is not 0,1 or 2). Expected response: agent will report a warning. Actual response: as expected (did not find a way to test "other grep error" warning sample output: not obtained Error condtions: sqlclient connect fails Expected response: agent will report an error if sqlclient fails to connect for any reason Actual response:yes it works. sample output: ERROR - Connection to NFIS04 failed ERROR: ORA-12154: TNS:could not resolve service name Successful conditions: ALL of the connection attempts succeded. Expected response: Reports Ok! Actual response: Works. sample output: OK - Connection to NFIS01 successful