Hi,
I am going to share WLSDM DevOps MBean scripts to monitor WebLogic environments and trigger auto actions. Hope other users will use this topic and share their scripts and let us see what can be done for WebLogic automation.

Here is the first: (alsoa available on http://www.wlsdm.com/docs/README )


#Author: M.Fevzi Korkutata | 2017

#Variables
_dbStatus=0
#0:DB_DOWN,1:DB_UP

#start DB Ping
_startTime=$(($(date +%s%N)/1000000))
_pingResult=java -cp weblogic.jar utils.dbping ORACLE_THIN $YOUR_USER_NAME $YOUR_PASSWORD $YOUR_IP:$YOUR_PORT/$YOUR_SERVICE_NAME
_endTime=$(($(date +%s%N)/1000000))
_dbResponseTime=expr $_endTime - $_startTime

if [[ "$_pingResult" == "Success!!!" ]]; then
_dbStatus=1
#echo "Database connection SUCCESS!!!"
#DB_UP
echo DatabaseStatus=$_dbStatus
else
_dbStatus=0
#echo "Database connection FAILURE!!!"
#DB_DOWN
echo DatabaseStatus=$_dbStatus
fi
echo DatabaseResponseTime=$_dbResponseTime