简体   繁体   中英

get status of a remote web logic server which is on remote machine

Our project runs on web-logic server(10.3.6) which is installed remote machine and we need to check the status of that server and related (node manager,admin server, data source)from our local desktop machines/laptops by using some automated script and then send that report in auto-generated email. Though watch or notifications can enabled in web-logic we need to customize the report. The second requirement was to re-direct the domain log of web-logic server and our application log to other machines to keep track of them as live logs, ie to say if our application users performs certain operations within the applications then those logs needs to be re-directed to a different machine which can be viewed by the user as live logs.

I am very new to web(-logic) servers, so i would like to know if our requirements can be accomplished?

You can use the new REST APIs or the older JMX APIs to automate the monitoring of your servers ( https://docs.oracle.com/middleware/1213/wls/NOTES/whatsnew.htm#NOTES353 ).

As far as redirecting the logs, I've had good experiences using logstash ( http://logstash.net/ ) with WebLogic.

You can write a WLST script to monitor your server status like:

connect("username","password","t3://localhost:8001")
# First enable the Administration Port. This is Not a requirement.
edit()
startEdit()
cmo.setAdministrationPortEnabled(1)
activate(block="true")
# check the state of the server
state("myserver")
# now move the server from RUNNING state to ADMIN
suspend("myserver", block="true")
# check the state
state("myserver")
# now resume the server to RUNNING state
resume("myserver",block="true")
# check the state
state("myserver")
# now take a thread dump of the server
threadDump("./dumps/threadDumpAdminServer.txt")
# finally shutdown the server
shutdown(block="true")

As for your second problem. Why not edit the Servers -> <server name> -> Logging settings to output the file to a shared area that your remote servers can see?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM