monitors:chk_oracle

Error loading plugin struct
ParseError: syntax error, unexpected 'fn' (T_STRING), expecting :: (T_PAAMAYIM_NEKUDOTAYIM)
More info is available in the error log.

CHK_ORACLE

Author Allan Cano
Compatibility Xymon 4.3
Requirements Perl, Ksh, Linux/AIX, Oracle
Download Google Share
Last Update 2015-02-18

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

Client side

  1. 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.

  2. 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;
  3. Add servers to be monitored to chk_oracle.servers
    hostname.domain.com:/path/to/oracle/home
  4. 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

There's a link to the extension at the top of the page!

  • 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.

Javier is updating xym-oracle so this may soon be a dead branch.

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

Changes compared to xym-oracle:

  1. Files _def and _dbtab are now .def and .dbtab
  2. 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
  3. If the hostname is in chk_oracle.servers the script will schedule itself in
    $XYMONCLIENTHOME/etc/clientlaunch.cfg
  4. All the BB/Hobit reference are removed.
  5. Added a simple Oracle create user script which you can have your DBA run.
  6. I use a locking function which (re)creates a working directory with each run:
    /tmp/XYMon/chk_oracle

    Useful in debugging

  7. Lots of other things I find useful like a -x flag for debugging.
  • monitors/chk_oracle.txt
  • Last modified: 2015/02/26 14:42
  • by aecano