Any better way to Monitor DB server & Listener?
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Any better way to Monitor DB server & Listener?

  1. #1
    Join Date
    Feb 2004
    Location
    NYC
    Posts
    39

    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

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    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
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  3. #3
    Join Date
    Sep 2003
    Location
    over the hill and through the woods
    Posts
    995
    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

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    It's specific for my environment. Its not a general tool.
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  5. #5
    Join Date
    Feb 2004
    Location
    NYC
    Posts
    39
    Thank you, Jeff, I will take your way.

  6. #6

    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.

  7. #7
    Join Date
    Apr 2003
    Posts
    353
    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.

  8. #8
    Join Date
    Aug 2000
    Location
    Jolo, Sulu
    Posts
    639
    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

  9. #9
    Join Date
    Sep 2003
    Location
    over the hill and through the woods
    Posts
    995

    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

  10. #10
    Join Date
    Feb 2003
    Location
    Leeds, UK
    Posts
    367
    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
  •  


Click Here to Expand Forum to Full Width