Writing and deploying a WLST script for a WebLogic domain is about one hour, installation of WLSDM is one minute...
You are able to write WLST script to monitor WebLogic server (JVM) "health status" for WebLogic server (JVM), data source, deployment and JMS resources.
Use WLSDM instead. Because you are going to have additional features.
White Paper: Native WebLogic FMW Performance Monitoring and Diagnostics
You are able to write WLST script to monitor WebLogic server (JVM) "states" for WebLogic server (JVM), data source, deployment and JMS resources.
Use WLSDM instead. Because you are going to have additional features.
"SHUTDOWN", "STARTING", "RUNNING", "STANDBY", "SUSPENDING", "FORCE_SUSPENDING", "RESUMING", "SHUTTING_DOWN", "FAILED", "UNKNOWN", "SHUTDOWN_PENDING", "SHUTDOWN_IN_PROCESS", "FAILED_RESTARTING", "ACTIVATE_LATER", "FAILED_NOT_RESTARTABLE", "FAILED_MIGRATABLE", "DISCOVERED", "ADMIN", "FORCE_SHUTTING_DOWN", "INITIALIZING", "STATE_UPDATE_PENDING", "NEW" "INSTALLED", "ACTIVE"
White Paper: Native and Central WebLogic FMW Performance Monitoring
# Node Manager needs to be running to run this script. import thread import time def checkHealth(serverName): while 1: slBean = getSLCRT(serverName) status = slBean.getState() print 'Status of Managed Server is '+status if status != "RUNNING": print 'Starting server '+serverName start(serverName, block="true") time.sleep(5) def getSLCRT(svrName): domainRuntime() slrBean = cmo.lookupServerLifecycleRuntime(svrName) return slrBean checkHealth("myserver")
Reference: https://docs.oracle.com/middleware/1221/wls/WLSTG/monitoring.htm#WLSTG231
Q: How to monitor Oracle WebLogic Server health and states?
A: WLSDM has health dashboard and you are able to monitor every detail about WebLogic health details:
Reference: https://wlsdm.com/docs/document-index
waitTime=180000 THRESHOLD=300000000 uname = "adminusername" pwd = "adminpassword" url = "t3://localhost:7001" def monitorJVMHeapSize(): connect(uname, pwd, url) while 1: serverNames = getRunningServerNames() domainRuntime() for name in serverNames: print 'Now checking '+name.getName() try: cd("/ServerRuntimes/"+name.getName()+"/JVMRuntime/"+name.getName()) heapSize = cmo.getHeapSizeCurrent() if heapSize > THRESHOLD: # do whatever is neccessary, send alerts, send email etc print 'WARNING: The HEAPSIZE is Greater than the Threshold' else: print heapSize except WLSTException,e: # this typically means the server is not active, just ignore # pass print "Ignoring exception " + e.getMessage() java.lang.Thread.sleep(waitTime) def getRunningServerNames(): # only returns the currently running servers in the domain return domainRuntimeService.getServerRuntimes() if __name__== "main": monitorJVMHeapSize()
Reference: https://docs.oracle.com/middleware/1221/wls/WLSTG/monitoring.htm#WLSTG232
Q: How to monitor WebLogic Managed Server, Admin Server JVM instances?
A:Go to "Smart Dashboards > JVM System Resource" page. You can monitor below WebLogic metrics easily on WLSDM.
Reference: https://wlsdm.com/docs/document-index
############################################################################# # # @author Copyright (c) 2010 - 2011 by Middleware Magic, All Rights Reserved. # ############################################################################# connect('weblogic','welcome1','t3://localhost:7001') allServers=domainRuntimeService.getServerRuntimes(); if (len(allServers) > 0): for tempServer in allServers: jdbcServiceRT = tempServer.getJDBCServiceRuntime(); dataSources = jdbcServiceRT.getJDBCDataSourceRuntimeMBeans(); if (len(dataSources) > 0): for dataSource in dataSources: print 'ActiveConnectionsAverageCount ' , dataSource.getActiveConnectionsAverageCount() print 'ActiveConnectionsCurrentCount ' , dataSource.getActiveConnectionsCurrentCount() print 'ActiveConnectionsHighCount ' , dataSource.getActiveConnectionsHighCount() print 'ConnectionDelayTime ' , dataSource.getConnectionDelayTime() print 'ConnectionsTotalCount ' , dataSource.getConnectionsTotalCount() print 'CurrCapacity ' , dataSource.getCurrCapacity() print 'CurrCapacityHighCount ' , dataSource.getCurrCapacityHighCount() print 'DeploymentState ' , dataSource.getDeploymentState() print 'FailedReserveRequestCount ' , dataSource.getFailedReserveRequestCount() print 'FailuresToReconnectCount ' , dataSource.getFailuresToReconnectCount() print 'HighestNumAvailable ' , dataSource.getHighestNumAvailable() print 'HighestNumUnavailable ' , dataSource.getHighestNumUnavailable() print 'LeakedConnectionCount ' , dataSource.getLeakedConnectionCount() print 'ModuleId ' , dataSource.getModuleId() print 'Name ' , dataSource.getName() print 'NumAvailable ' , dataSource.getNumAvailable() print 'NumUnavailable ' , dataSource.getNumUnavailable() print 'Parent ' , dataSource.getParent() print 'PrepStmtCacheAccessCount ' , dataSource.getPrepStmtCacheAccessCount() print 'PrepStmtCacheAddCount ' , dataSource.getPrepStmtCacheAddCount() print 'PrepStmtCacheCurrentSize ' , dataSource.getPrepStmtCacheCurrentSize() print 'PrepStmtCacheDeleteCount ' , dataSource.getPrepStmtCacheDeleteCount() print 'PrepStmtCacheHitCount ' , dataSource.getPrepStmtCacheHitCount() print 'PrepStmtCacheMissCount ' , dataSource.getPrepStmtCacheMissCount() print 'Properties ' , dataSource.getProperties() print 'ReserveRequestCount ' , dataSource.getReserveRequestCount() print 'State ' , dataSource.getState() print 'Type ' , dataSource.getType() print 'VersionJDBCDriver ' , dataSource.getVersionJDBCDriver() print 'WaitingForConnectionCurrentCount ' , dataSource.getWaitingForConnectionCurrentCount() print 'WaitingForConnectionFailureTotal ' , dataSource.getWaitingForConnectionFailureTotal() print 'WaitingForConnectionHighCount ' , dataSource.getWaitingForConnectionHighCount() print 'WaitingForConnectionSuccessTotal ' , dataSource.getWaitingForConnectionSuccessTotal() print 'WaitingForConnectionTotal ' , dataSource.getWaitingForConnectionTotal() print 'WaitSecondsHighCount ' , dataSource.getWaitSecondsHighCount()
Reference: http://middlewaremagic.com/weblogic/?page_id=8252
Q: How to monitor WebLogic Managed Server(s), Data Sources, Deployments, JMS Servers?
A: WLSDM has below inbox smart dashboards with ALERT/CLEAR alarm setups:
Reference: https://wlsdm.com/docs/document-index
connect('weblogic','weblogic','t3://localhost:7001') cd ('AppDeployments') myapps=cmo.getAppDeployments() for appName in myapps: domainConfig() cd ('/AppDeployments/'+appName.getName()+'/Targets') mytargets = ls(returnMap='true') domainRuntime() cd('AppRuntimeStateRuntime') cd('AppRuntimeStateRuntime') for targetinst in mytargets: curstate4=cmo.getCurrentState(appName.getName(),targetinst) print '-----------', curstate4, '-----------', appName.getName()
Reference: http://middlewaremagic.com/weblogic/?page_id=8252
Q: How to monitor Oracle WebLogic Server health and states?
A: WLSDM has health dashboard and you are able to monitor every detail about WebLogic health details:
Reference: https://wlsdm.com/docs/document-index
print '#############################################################################' print '#' print '# @author wlsdm.com, All Rights Reserved.' print '#' print '#############################################################################' connect('weblogic', 'welcome1', 't3://localhost:7001') domainRuntime() cd('ServerRuntimes') serverRuntimes=ls(returnMap='true') for serverRuntime in serverRuntimes: cd('/ServerRuntimes/' + serverRuntime) print '****************************************' print 'Server Name: ' + cmo.getName() print 'OpenSocketsCurrentCount: ' + String.valueOf(cmo.getOpenSocketsCurrentCount()) print 'SocketsOpenedTotalCount: ' + String.valueOf(cmo.getSocketsOpenedTotalCount())
Reference: https://wlsdm.com
Q: How to monitor WebLogic Managed Server(s), Data Sources, Deployments, JMS Servers?
A: WLSDM has below inbox smart dashboards with ALERT/CLEAR alarm setups:
Reference: https://wlsdm.com/docs/document-index
10000+ Downloads... Monitors more than 4000+ WebLogic domains.
Take advantage of WLSDM and increase your service quality now!
Your WLSDM experience = Zero Downtime and Continuous Best Performance
Increase your WebLogic and FMW domain performance then deliver L1/L2 operational excellence.
…ISVs, Fortune 500 companies use WLSDM.
Best, easiest and strongest way to create a success story in your company.
Read Emerson Electric Co.'s success story here!