views:

3117

answers:

3

I am working on writing a Highly Available agent for JBOSS to run on Solaris Open HA Cluster. As I don't know much of JBOSS, can someone please tell me how can I probe the status of the JBOSS server.

I want to know the health of JBOSS server, ie, whether it is currently running or not.

-Abhishek

+1  A: 

Out of the box, JBoss has a JMX console that provides information about the modules loaded into the micro-kernel and the services that are running. This application is usually available at http://hostname:8080/jmx-console, and you could conceivably use its presence or absence as an indicator of whether your JBoss server is running.

In the context of an HA cluster, you probably have a load balancing switch or other layer4-7 aware device in front of the nodes. If you want to detect the status of each node in the cluster, you'll need to make sure your using the node's local IP address.

Of course, most of the processes that run in the micro-kernel are JMX enabled ... if you want to know the status of an individual process, just ask it!

Steve Moyer
A: 

Thanks for the answer.

One way to check for the status of the JBOSS server would be to probe the JBOSS port (it can be port of any essential service, eg. like JNDI service) with a TCP socket request. If port is busy means JBOSS is up else otherwise.

This, I figured out, is more programmable way of checking the status. :P Specially in case of Solaris OHAC, where JBOSS would reside on a global filesystem.

krabhishek
A: 

If you are interested in monitoring JBoss's state along with the status of your overall system/cluster I recommend checking out Hyperic.

They have an excellent JBoss/Tomcat monitoring plugin and can monitor the status of your databases, operating systems and network connections within your cluster. The client-side monitor is Java-based and whilst I haven't tested it on Solaris, I believe it works.

Compared to other system monitoring tools Hyperic is relatively straight-forward to setup, especially if you are familiar with JBoss & Java.

The nice thing is that Hyperic monitors your JBoss's internal and external status via JMX. With this you can construct complex actions based on conditions within the JBoss server and the underlying infrastructure of the cluster.

i.e. If X & Y conditions are met do this, and if it is still a problem do this...

David Harrison