Monitoring JBoss with Monitis – Part 3

Monitis-Logo-Small-1In the last post of the series, we saw how to use the Monitis JMX agent to collect JDBC connection pool metrics from JBoss. While the connection pool performance is often the most important thing to monitor, there are a multitude of other metrics available in JBoss that are worth exploring.

AJP vs HTTP Connectors

As you probably know, JBoss contains a built-in HTTP request processor to enable it to serve HTTP requests. In production environments however, the application server usually does not handle HTTP requests directly. This task falls on a dedicated web server – most often Apache. This division of labor allows Apache to serve static content (think large image files) and do the heavy-lifting for HTTPS, while letting your app server concentrate on what it does best – generating dynamic content and business logic processing. Apache and JBoss communicate via the AJP protocol – which involves a separate listener in JBoss (actually in JBoss Web – a version of Tomcat, which serves as a web container for JBoss). The AJP processor is very similar to the HTTP one – which is hardly surprising given how similar AJP and HTTP are.

Monitoring an AJP Connector with Monitis

As with other JMX-related metrics, it is very easy to set up a JMX monitor for AJP Connectors.

Step 1. Make sure the Monitis HTTP connector is deployed as described as described here

Step 2. Navigate to the JMX Monitor URL and log on with your Monitis credentials

Login1 - Monitoring JBoss with Monitis – Part 3

Step 3. After entering an agent name, click on “Add Test” link from the navigation bar, enter the JMX parameters and click “Submit”. The agent will then connect to the JMX server. (By  default the JMX port in JBoss 6.x is 1090, the username and password are blank – I certainly hope you are not running with these defaults in production!)

JMX params - Monitoring JBoss with Monitis – Part 3

Step 4. Select “jboss.web” from the drop-down and navigate to the GlobalRequestProcessor class:


Step 5. Give the monitor a meaningful name, select appropriate interval (in minutes), select MBean attributes (all except modellerType) and click “Add Monitor”:

JMX create monitor - Monitoring JBoss with Monitis – Part 3

Your monitor should now be up an running. When you log on to your Monitis account, you should be able to find it and add it to your dashboard. After allowing some time for monitoring data to accumulate, you can graph the data:

JMX AJP bytes sent - Monitoring JBoss with Monitis – Part 3

JMX AJP error count - Monitoring JBoss with Monitis – Part 3

JMX AJP processing time - Monitoring JBoss with Monitis – Part 3

JMX AJP request count - Monitoring JBoss with Monitis – Part 3

The same steps could be followed to set up a monitor for an HTTP Request processor – it exposes the same metrics as the AJP processor, the only difference being the naming of the MBean.

In another installment we will look at per-application metrics provided by SessionManager MBean. Until then, happy monitoring!


You might also like