This script was made  to monitor errors on oracle alert log.
This script just look on alert log of eache instance monitor  and if find an error send an appropriate email, with the error in attach.

Installation
———–
To install this script add in /etc/fstab one line like thisone:

//<SERVERNAME>.<DOMAIN>/c$/oracle/product/10.2.0/admin /mnt/oracle/<SERVERNAME>  cifs domain=<DOMAIN>,user=<USERNAME>,pass=<PASSWORD>,ro

With this i suppose that oracle run on Windows server and the monitoring script on a linux machine. Otherwise if you run Oracle inside a Linux server you need mount locally the location that contain the alertlog file.
and run this script as:
/opt/oralog_analyzer/analyzer.sh <INSTANCENAME> <INSTANCENAME> /mnt/oracle/<SERVERNAME>/<INSTANCENAME>/bdump/alert_<INSTANCENAME>.log
Is fundamental that this script run with a fully qualified path because he get his own configuration parameter on cfg/global file that is included.
As you can see in this file you are going to find:

#GLOBAL CONFIGURATION FILE
#To send email SENDMAIL=[yes|no]
SENDMAIL=yes
#Specify mail address
MAILADDRESS=errormail@domain.com
#To send to zabbix_server SENDZABBIX=[yes|no]
SENDZABBIX=no
#full path for mutt
MUTT=/usr/bin/mutt
#Configure Zabbix Sender
SENDER=”/usr/local/sbin/zabbix_sender”
#NOTIFY[HIGH|WARNING|INFO|AVERAGE]= [yes|no] to notify every level
NOTIFYHIGH=yes
NOTIFYINFO=yes
NOTIFYWARNING=yes
NOTIFYAVERAGE=yes
LINEBEFORE=8
LINEAFTER=8
#if you want receive anyway email for each level
SENDANYWAY=no

in each file contained inside cfg you will find the error-list that is trapped by this script.

to run this script after configured email address
add a line like thisone in crontab
# check log oracle
*/10 * * * * /opt/oralog_analyzer/analyze_log.sh
so every 10 minutes the script is executed

the home of this project is:

https://sourceforge.net/projects/loganalizer/

i’ve called this project just loganalyzer because now is ready to monitor Oracle alert log, but is really easy to modify to check  other kind of log

Tags: , , , , ,

admin on November 27th, 2009

With this script you are going to monitor your own instances of Oracle Databases, in dataguard.
This is more than a simple script it’s a structure ready to host plugin and other monitoring script.
The good way is that is wrote to monitor two Instance of databases configured ad dataguard.
The first plug-in/external command created is made to monitor archive log gap between two instances.
Oracle Grid Control don’t have a similar warning, for this reason i’ve wrote this one 😀
obviously in GPL
download at
https://sourceforge.net/projects/dataguardcheck/files/
by now this script monitor just oracle data guard gap and send mail if gap is greather than 50

 

Tags: , , , , ,

admin on November 26th, 2009

The “easy” to monitor Oracle with zabbix is using this plug-in wrote from me.

Everyone can read the full story of this plugin here: http://www.zabbix.com/forum/showthread.php?t=13666

Requirements:

  • a working sqlplus on zabbix server with configured tnsnames, and tnsping utility too. I’ve installed a complete client and not simply the instantclient, because tnsping is not included inside instant-client.
  • an user on every oracle instances

Installation steps

  • create an user with this oracle script:

CREATE USER ZABBIX
IDENTIFIED BY <REPLACE WITH PASSWORD>
DEFAULT TABLESPACE SYSTEM
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT
ACCOUNT UNLOCK;
— 2 Roles for ZABBIX
GRANT CONNECT TO ZABBIX;
GRANT RESOURCE TO ZABBIX;
ALTER USER ZABBIX DEFAULT ROLE ALL;
— 5 System Privileges for ZABBIX
GRANT SELECT ANY TABLE TO ZABBIX;
GRANT CREATE SESSION TO ZABBIX;
GRANT SELECT ANY DICTIONARY TO ZABBIX;

  • untar in /etc/zabbix/externalscripts check_ora.tar.gz
  • write your credentials /username/password and instance etc..) inside /etc/zabbix/externalscripts/check_ora/credentials
  • import my template
  • schedule on crontab
    */5 * * * * /etc/zabbix/externalscripts/check_ora_cron.sh

Then the last thing to do is add an host with the same name of SID.
an you’ll have a lot of graphs about performaces etc.. in the picture you’ll see some graphs

Sourcecode, plugin scripts ecc can be downloaded here: https://sourceforge.net/projects/checkora/

Tags: , , ,

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this. To know all the policy detais click here.

Close