weblogic监控
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了weblogic监控相关的知识,希望对你有一定的参考价值。
#!/bin/sh
URL="156.12.19.56:8001" #节点的ip:port
USER_NAME="weblogic" #weblogic控制台账户
PASS_WORD="Sxds121954#" #weblogic控制台密码
DOMAIN_NAME="sssl_domain" #域名字
SERVER_NAME="sssSvr5601" #节点名字
STATE_ALL=$(/usr/java/jdk1.6.0_45/bin/java -cp /weblogic/wlserver_10.3/server/lib/weblogic.jar weblogic.Admin -url $URL -username $USER_NAME -password $PASS_WORD get -pretty -mbean "$DOMAIN_NAME:Location=$SERVER_NAME,Name=$SERVER_NAME,Type=ServerRuntime")
CURRENT_TIME=date +%F" "%H:%M:%S
NUM1=echo "$STATE_ALL" | grep "State:HEALTH_OK"|wc -l
if [ $NUM1 -eq 2 ]; then
echo " $CURRENT_TIME $URL $DOMAIN_NAME $SERVER_NAME running status is OK" >>/weblogic/user_projects/domains/sssldomain/logs/AutoRestart5601date +%Y%m%d
.log
else
echo "$CURRENT_TIME $URL $DOMAIN_NAME $SERVER_NAME running status is not OK" >>/weblogic/user_projects/domains/sssldomain/logs/AutoRestart5601date +%Y%m%d
.log
/weblogic/user_projects/domains/sssl_domain/restartssl5601.sh
echo "$CURRENT_TIME $URL $DOMAIN_NAME $SERVER_NAME restart succese!" >>/weblogic/user_projects/domains/sssldomain/logs/AutoRestart5601date +%Y%m%d
.log
fi
以上是关于weblogic监控的主要内容,如果未能解决你的问题,请参考以下文章
Redhat+Weblogic 远程Jconsole监控java程序运行
monitor weblogic server ,Very simple to use, weblogic监控巡检故障简单小工具