Both sides previous revision Previous revision Next revision | Previous revision |
monitors:chk_oracle [2015/02/26 13:15] – [My Monitor (CHANGEME)] aecano | monitors:chk_oracle [2015/02/26 14:42] (current) – [Source] aecano |
---|
====== My Monitor (CHANGEME) ====== | ====== CHK_ORACLE ====== |
| |
^ Author | [[ aecano@gmail.com | Allan Cano ]] | | ^ Author | [[ aecano@gmail.com | Allan Cano ]] | |
=== Client side === | === Client side === |
| |
* Edit the parameters in chk_oracle.def with your oracle's settings:<code> | - Edit the parameters in chk_oracle.def with your oracle's settings:<code> |
ORACLE_HOME=YOUR_ORACLE_HOME; export ORACLE_HOME | ORACLE_HOME=YOUR_ORACLE_HOME; export ORACLE_HOME |
ORACLE_SIDS=""; export ORACLE_SIDS | ORACLE_SIDS=""; export ORACLE_SIDS |
DB_PASSWORD="YOUR_XYMON_ORACLE_PWD"; export DB_PASSWORD | DB_PASSWORD="YOUR_XYMON_ORACLE_PWD"; export DB_PASSWORD |
</code> | </code> \\ 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. |
Set ORACLE_SIDS to your oracle sid or space delimited list of sids. | - Run the chk_oracle.setup script as an oracle dba account to create an oracle user for xymon monitoring:<code> |
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:<code> | |
create user xymon identified by my_passwd default tablespace users; | create user xymon identified by my_passwd default tablespace users; |
grant connect to xymon; | grant connect to xymon; |
grant select on dba_objects to xymon; | grant select on dba_objects to xymon; |
</code> | </code> |
* Add servers to be monitored to chk_oracle.servers<code> | - Add servers to be monitored to chk_oracle.servers<code> |
hostname.domain.com:/path/to/oracle/home | hostname.domain.com:/path/to/oracle/home |
</code> | </code> |
* 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:<code> | - 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:<code> |
# The oracle client task | # The oracle client task |
[oracle] | [oracle] |
| |
=== Server side === | === Server side === |
| |
Nothing | Nothing |
| |
===== Source ===== | ===== Source ===== |
There's a link to the extention at the top of the page! | There's a link to the extension at the top of the page! |
| |
===== Known Bugs and Issues ===== | ===== Known Bugs and Issues ===== |
Changes compared to xym-oracle: | Changes compared to xym-oracle: |
| |
* Files _def and _dbtab are now .def and .dbtab | - 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 | - 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<code> | - If the hostname is in chk_oracle.servers the script will schedule itself in<code> |
$XYMONCLIENTHOME/etc/clientlaunch.cfg | $XYMONCLIENTHOME/etc/clientlaunch.cfg |
</code> | </code> |
* All the BB/Hobit reference are removed. | - All the BB/Hobit reference are removed. |
* Added a simple Oracle create user script which you can have your DBA run. | - 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:<code> | - I use a locking function which (re)creates a working directory with each run:<code> |
/tmp/XYMon/chk_oracle | /tmp/XYMon/chk_oracle |
</code> | </code> Useful in debugging |
Useful in debugging | - Lots of other things I find useful like a -x flag for debugging. |
* Lots of other things I find useful like a -x flag for debugging. | |