Detect status of JBOSS standalone server

2.8k Views Asked by At

I would like to detect the status of the jboss standalone server using the CLI,

jboss-cli.sh --connect --controller=localhost:10499 --command=":read-attribute(name=server-state)"

will return

{
"outcome" => "success",
"result" => "running"
}

If the server is running, but I would like to detect when the server is running "with errors". When I in the log get something like:

JBoss EAP 6.3.0.GA (AS 7.4.0.Final-redhat-19) started (with errors) in 31474ms

The CLI command above returns the same result even if I get that message in the log. Someone know of another command I can use?

0

There are 0 best solutions below