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.

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/ <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:

#To send email SENDMAIL=[yes|no]
#Specify mail address
#To send to zabbix_server SENDZABBIX=[yes|no]
#full path for mutt
#Configure Zabbix Sender
#NOTIFY[HIGH|WARNING|INFO|AVERAGE]= [yes|no] to notify every level
#if you want receive anyway email for each level

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/
so every 10 minutes the script is executed

the home of this project is:

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: , , , , ,

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.