Weblogic monitoring shell script

HI,

I'm new in unix. I would like to know if you have a ready script for monitoring the weblogic and managed servers. I want to have a script that checks the weblogic once in a while if it's up and running. if not running, will send an email to me. any idea?

please help me. i will appreciate that very much.

thanks,

One of the better (free) answers to your question(s).

I belive a grep will do for finding the weblogic server/services and you can use mailx command to send an email when it is not running..

Soemthing like this..

while :
do
[[ ps -ef | grep -q 'weblogic' ]] || { mailx "Web logic not running!!" abc@abc.com; break; }
sleep 5
done

This is great. But most of these Application Servers do wind up running, but 'not responding' from time to time. This usually requires actually formulating a test query of some sort, and checking that you get the answer you require.

I am not going to write the exact script for you but in order for a robust script you need to take care of many steps:

  1. Check the process related to "weblogic" is running.
  2. ping to the host (admin and managed servers) to make sure they are alive.
  3. Now even if (1) above returns the process, many times the servers are just hung, so use "weblogic.Admin" command line utility to do a weblogic PING.
    E.g java weblogic.Admin -url AdminHost:7001 -username weblogic
    -password weblogic PING 10
  4. If (3) is alive and returns good, then u r good.