Freitag, 23. Oktober 2009

Monitoring Your Cluster with Mod Status

So you have set up your Railo cluster using Apache and Tomcat as described in the Clustering Railo with Tomcat and Apache article and as far as you know the cluster is performing exactly as expected, or is it? The problem is unless you actually check the tomcat instances you really don’t have a clue if one of the Tomcat instances are down. Luckily there is a relatively simple way to set up a monitor to monitor your cluster.

Mod_status

According to the Apache documentation this "module allows a server administrator to find out how well their server is performing. A HTML page is presented that gives the current server statistics in an easily readable form." Sounds exactly what we are looking for, we now just need to set it up in our conf file.

Setting up a Monitor

In your httpd.conf file in that big long list of LoadModule entries near the bottom you should find the entry "#LoadModule status_module modules/mod_status.so" uncomment this line (remove the #) and save the file.

Add the following tag block to your vhosts.conf, you can add it after the


<Location /balancer-manager>
SetHandler balancer-manager
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Location>


If you want to be able to see the status of your cluster from any other machine than local host you will need to add additional IP addresses to the Allow from area in the location tag. Once you have added the location save your conf file and restart Apache.

Results

You should now be able to access the balancer-manager at http://railo.local:8080/balancer-manager (following on with the host file entry made in from the first post).

The balancer manger should display something similar to:

Keine Kommentare: