-
Any better way to Monitor DB server & Listener?
Hi DBAs,
I wrote a script to monitor my DB listener(as below), if the listener is down, send an email to me.
I am going to use the same way to monitor DB server process, such as "ora_smon_dev".
Does anyone has better idea to monitor your DB server and listener?
Thanks!
Betty
Check_lsnr.sh
------------------
#!/bin/sh
cd /opt/oracle/scripts
/bin/rm -f lsnr.exist
ps -ef | grep LISTENER | grep -v grep > lsnr.exist
if [ ! -s lsnr.exist ]
then
echo "." | mailx -s "ALERT!!! Oracle listener on `hostname` is down since `date`" name@xyz.com
/opt/oracle/product/9.2.0/bin/lsnrctl start
fi
-
We've talked about this a couple times on this forum. IMHO, monitoring each individual process does not give you adequate enough information to determine whether your database is accessible or not. For example, you may have a pmon process but your database is only in mount mode. All your background processes may be up, but your log_archive_dest is full.
I believe (as do several others) that the best way to monitor connectivity is to actually login to the database. If you login, great. If you can't, you get an error which will indicate what you should do.
To accomplish this task for my environment, I wrote a perl script that tries to login to the database. If I login, great, I just log out and go to sleep for N seconds. If I get an error, I know what to do about it. If the connection attempt takes longer than X seconds, I timeout and know what to do about it.
Jeff Hunter
-
Care to share this super genius script with us Mr. Wyle E. Coyote?
Oracle it's not just a database it's a lifestyle!
--------------
BTW....You need to get a girlfriend who's last name isn't .jpg
-
It's specific for my environment. Its not a general tool.
Jeff Hunter
-
Thank you, Jeff, I will take your way.
-
Nagios
There is a plugin for the Nagios monitoring system that will attempt a dummy login. It uses a bogus name and password and returns 'OK' if the DB errors with access denied. Any other error indicates a problem.
Here is a link to the check_oracle.sh script.
Last edited by jhmartin; 03-30-2005 at 08:18 PM.
-
We have written an insert command with
insertion of current time into a table
and it will be called from our oem.
This script is executed every five minutes by OEM scheduling and
the same output will be mailed.
-
Hi huns,
Do you have features in your cellphones where the messages can be
textd or e-mailed and make your cell beep? Or you just log-in to ur
PC and check e-mail.
Thanks
-
In Trouble
HEY JHMARTIN! I RAN THAT CHECK_ORACLE.SH SCRIPT AGAINST MY PRODUCTION DATABASE AND IT CRASHED MY ENTIRE SERVER AND WE CAN'T GET IT BACK UP. IT'S COSTING US $200K PER HOUR IT'S DOWN.
I AM IN CONTACT WITH THE ADMINISTRATION OF THIS FORUM. YOUR COMPANY CAN EXPECT A PHONE CALL FROM OUR LAWYERS.
Oracle it's not just a database it's a lifestyle!
--------------
BTW....You need to get a girlfriend who's last name isn't .jpg
-
Do you have features in your cellphones where the messages can be
textd or e-mailed and make your cell beep? Or you just log-in to ur
PC and check e-mail
Yep, we have a piece of software called Telalert that will send SMS or pages. Basically there is a standalone binary called telalertc that will send messages to the Telalert server which texts or pages. You can run telalertc from OS scripts or hook it up to Grid Control/OpenView or whatever.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|