====== CHK_ORACLE ====== ^ Author | [[ aecano@gmail.com | Allan Cano ]] | ^ Compatibility | Xymon 4.3 | ^ Requirements | Perl, Ksh, Linux/AIX, Oracle | ^ Download | [[https://drive.google.com/folderview?id=0B-0jQG8vyqaTfjQ3ZldOMDRLQlVQU3dDbzJLNEl6Y2RRbVBuekJKRERnWm93aW5MTWFCZ3M&usp=sharing|Google Share]] | ^ Last Update | 2015-02-18 | ===== Description ===== Fork of xym-oracle which forked from deadcat's bb-moracle.sh. Adapted to xymon server new versions and updated to work in AIX. Also, some bug fixes. Tested with Oracle 11G R2 ===== Installation ===== === Client side === - Edit the parameters in chk_oracle.def with your oracle's settings: ORACLE_HOME=YOUR_ORACLE_HOME; export ORACLE_HOME ORACLE_SIDS=""; export ORACLE_SIDS DB_PASSWORD="YOUR_XYMON_ORACLE_PWD"; export DB_PASSWORD \\ Set ORACLE_SIDS to your oracle sid or space delimited list of sids. \\ If left blank it will default to the sids in your oratab file. - Run the chk_oracle.setup script as an oracle dba account to create an oracle user for xymon monitoring: create user xymon identified by my_passwd default tablespace users; grant connect to xymon; grant alter session, create session, select any table to xymon; grant select on sys.dba_data_files to xymon; grant select on sys.dba_free_space to xymon; grant select on sys.dba_segments to xymon; grant select on sys.v_$backup to xymon; grant select on sys.v_$datafile to xymon; grant select on sys.v_$process to xymon; grant select on sys.v_$session to xymon; grant select on sys.v_$recovery_file_dest to xymon; grant select on sys.v_$sql to xymon; grant select on dba_users to xymon; grant select on dba_objects to xymon; - Add servers to be monitored to chk_oracle.servers hostname.domain.com:/path/to/oracle/home - You can simply run chk_oracle.sh and if the hostname is in the servers file the script will update the clientlaunch.cfg file with the following: # The oracle client task [oracle] ENVFILE /home/xymon/etc/xymonclient.cfg CMD /home/xymon/ext/chk_oracle.sh LOGFILE /home/xymon/logs/chk_oracle.log INTERVAL 10m === Server side === Nothing ===== Source ===== There's a link to the extension at the top of the page! ===== Known Bugs and Issues ===== * Oracle test with all tests enabled each 5 minutes could be heavy to some oracle servers, in this case you can change the execution time to 10m. * If Oracle has usually many open sessions and “USER_CHECK_VERBOSE” is set to “Y” can appears purple reports in oracle test. It happens 'case the output's monitor is too big to hobbit. I suggest to disable this sub-test in this scenario. ===== To Do ===== Javier is updating xym-oracle so this may soon be a dead branch. ===== Credits ===== xym-oracle project at https://sourceforge.net/projects/xymoracle/ This development is under fsf gnu 3.0 licence or better if exists. More info at http://www.gnu.org/licenses/gpl-3.0.html ===== Changelog ===== Changes compared to xym-oracle: - Files _def and _dbtab are now .def and .dbtab - The introduction of chk_oracle.servers. I use a distributed management model so this allows me to push updates to clients without having to determine if they are oracle servers. If the client is in the list monitor. If not ignore - If the hostname is in chk_oracle.servers the script will schedule itself in $XYMONCLIENTHOME/etc/clientlaunch.cfg - All the BB/Hobit reference are removed. - Added a simple Oracle create user script which you can have your DBA run. - I use a locking function which (re)creates a working directory with each run: /tmp/XYMon/chk_oracle Useful in debugging - Lots of other things I find useful like a -x flag for debugging.