Tomcat – Which JMX statistics to watch out for in Catalina/Tomcat

jmxmonitoringtomcat

I have configured OpenNMS to collect all kinds of numeric data coming out of tomcat7 jmx. There are a lot of things. I am interested in monitoring this tomcat instance so that I can avoid down time and lockups. What metrics should I be watching out for?

I am already monitoring things like CPU, Memory, Network via SNMP. With this JMX connection the things that I find interesting are

  • Catalina:type=GlobalRequestProcessor,name="ajp-bio-/a.b.c.d-XXXX"
    • RequestsCount so far.
  • Catalina:type=Manager,context=/myApp,host=localhost
    • Active sessions and its maximum so far

Best Answer

For Tomcat 6, I monitored thread pools using: Catalina:type=ThreadPool,*

Not sure whether you need application level statistics - if yes, some of the MBeans you might find interesting are:

  • Servlet Activity: Catalina:j2eeType=Servlet,* (I am sure there is one for JSP as well)
  • DataSource: Catalina:type=DataSource,*
  • Cache hits: Catalina:type=Cache,*

Note: I assume these object names are the same in Tomcat 7