|
I will make the assumption this is on unix and you can write a shell
script. Here is a skeleton of the code. You can put your own checks
it.
EXAMPLE
>>>>>>>>>>>>>>>>>>>>>>>>>>>
#!/bin/ksh
tail -1f alert_xxxxx.log | while read line
do #### any other code you want here.
echo $line | grep ORA-
if [ $? -eq 0 ] ; then ( error=`echo $line | sed 's=:.*=='` echo "To: [EMAIL PROTECTED]" echo "Subject: `uname -n` $error" echo "`uname -n` alert_log" echo $prevline | sed 's=:=-=' echo $line | sed 's=:=-=' ) | mail [EMAIL PROTECTED] fi prevline=$line
done
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
This will run perpetually and check every line the alert log writes.
You can test for any messages you want and send messages to whatever. Note
the sed command changes ':' to '-' because mail has a problem with colons in the
text body sometimes. Also, some mail servers cannot handle it properly
without the extra "To:".
Obviously, this is just a snippet of code. You need to customize it
for your own needs. You may need to write other scripts to query the
database to get number of connections and active connections if you need
that.
HTH,
John Carlson
>>> [EMAIL PROTECTED] 02/22/01 03:15PM >>> I am looking at a solution of sending a email/paging/Mobilephone alerts in case of a problem on the database that is reported in the alert.log file. like tablespace full,no. of processes exceeded,instance going down etc. I want a solution other than OEM.What are the other ways of sending such alert to notify the person who takes care of the database. Thanks -Ravindra -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Ravindra Basavaraja INET: [EMAIL PROTECTED] |
- Email/Paging/Mobile Phone alerts Ravindra Basavaraja
- Re: Email/Paging/Mobile Phone alerts Joseph S. Testa
- Re: Email/Paging/Mobile Phone alerts John Carlson
- Re: Email/Paging/Mobile Phone alerts Paul Drake
- Re: Email/Paging/Mobile Phone alerts Bjorn Naessens
- RE: Email/Paging/Mobile Phone alerts Mark Leith
- Re: Email/Paging/Mobile Phone alerts Bjorn Naessens
- Re: Email/Paging/Mobile Phone alerts jkstill
- Re: Email/Paging/Mobile Phone alerts Joseph S. Testa
- RE: Email/Paging/Mobile Phone alerts Ravindra Basavaraja
