Skip to content

Instantly share code, notes, and snippets.

@AKSarav
Created December 21, 2017 21:18
Show Gist options
  • Save AKSarav/c743de5138a89b4e2e1d2d8b09876090 to your computer and use it in GitHub Desktop.
Save AKSarav/c743de5138a89b4e2e1d2d8b09876090 to your computer and use it in GitHub Desktop.
get_wls_appstate.py
connect('weblogic','Bea@h0me','t3://ulweblogic04.wil.csc.local:33011')
myapps=cmo.getAppDeployments()
print " -------------------------------------------------- "
print " WLS APPLICATION STATUS REPORTER "
print " -------------------------------------------------- "
print " APPLICATION NAME\t\t\tSTATUS \t"
print " -------------------------------------------------- "
for app in myapps:
bean=getMBean('/AppDeployments/'+app.getName()+'/Targets/')
targetsbean=bean.getTargets()
for target in targetsbean:
domainRuntime()
cd('AppRuntimeStateRuntime/AppRuntimeStateRuntime')
appstatus=cmo.getCurrentState(app.getName(),target.getName())
print " ",app.getName(),"\t\t",appstatus,"\t"
serverConfig()
print " -------------------------------------------------- "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment