What do you monitor with JMX in your production Java application?

topchef picture topchef · Nov 5, 2009 · Viewed 9.8k times · Source

This question is not about how JMX works or what JMX does. This question is about applications of JMX in a standard application server environment in production. It is not for specific server either.

What do you monitor with JMX in production environment that runs standard stack of Java EE services: database access (JDBC and JPA), session EJBs, JMS, web server, web services, AJAX-enabled services?

Answer

Cyrille Le Clerc picture Cyrille Le Clerc · Nov 23, 2010

At the JVM level, I monitor the garbage collection duration per minute,

At the Servlet Container level, I monitor the number of requests, number of exceptions (4xx & 5xx codes) , sum of request duration per minute,

At the SOAP level, I monitor the number of invocations, number of exceptions & sum of invocations per operation and per minute,

At the Web MVC Framework level, I monitor the number of invocations, number of exceptions & sum of invocations per action and per minute,

For the pools (datasource,thread pool / executor service), I monitor the active count,

For the JMS connections, I monitor the number of sent & received messages per minute, and the number of active receivers,

For EhCache, I monitor the number of entries in the cache, the number of hits & miss per minute,

At the business application level, I developped an @Profiled annotation to monitor the number of invocations, number of exceptions and total duration per minute.

If you are interested in such kind of metrics, we developed many JMX extras (dbcp, util.concurrent, jms, @profiled annotation) and packaged all this with Spring XML namespace based configuration, Hyperic HQ plugins, monitoring jsp pages, etc

The details are here : http://code.google.com/p/xebia-france/wiki/XebiaManagementExtras .

All this code is licensed under the business friendly Open Source Apache Software License 2, deployed on Maven Central Repository, downloadable as a jar and available on a Google Code Subversion server to be integrated the way you want.

Hope this helps,

Cyrille (Xebia)