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

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