Tomcat JVM Overview

Display JMX statistics

Tomcat JVM Overview screenshot 1

This dashboard display multiple JMX metrics from Tomcat. JMX needs to be enabled on the Tomcat instance.

This dashboard use https://github.com/egineering-llc/collectd-fast-jmx plugin. The configuration is a mix between multiple example confiugration files found on Internet:

LoadPlugin java
<Plugin "java">
  JVMARG "-Djava.class.path=/usr/share/collectd/java/collectd-api.jar:/usr/share/collectd/java/collectd-fast-jmx.jar"

LoadPlugin "com.e_gineering.collectd.FastJMX"

<Plugin "FastJMX"> MaxThreads 256 CollectInternal true

&lt;MBean &#34;classes&#34;&gt;
  ObjectName &#34;java.lang:type=ClassLoading&#34;

  &lt;Value &#34;LoadedClassCount&#34;&gt;
    Type &#34;gauge&#34;
    InstancePrefix &#34;loaded_classes&#34;
    PluginName &#34;JVM&#34;
  &lt;/Value&gt;
&lt;/MBean&gt;

# Time spent by the JVM compiling or optimizing.
&lt;MBean &#34;compilation&#34;&gt;
  ObjectName &#34;java.lang:type=Compilation&#34;

  &lt;Value &#34;TotalCompilationTime&#34;&gt;
    Type &#34;total_time_in_ms&#34;
    InstancePrefix &#34;compilation_time&#34;
    PluginName &#34;JVM&#34;
  &lt;/Value&gt;
&lt;/MBean&gt;

# Garbage collector information
&lt;MBean &#34;garbage_collector&#34;&gt;
  ObjectName &#34;java.lang:type=GarbageCollector,*&#34;
  InstancePrefix &#34;gc-&#34;
  InstanceFrom &#34;name&#34;

  &lt;Value &#34;CollectionTime&#34;&gt;
    Type &#34;total_time_in_ms&#34;
    InstancePrefix &#34;collection_time&#34;
    PluginName &#34;JVM&#34;
  &lt;/Value&gt;
&lt;/MBean&gt;

<MBean "memory_pool"> ObjectName "java.lang:type=MemoryPool," InstancePrefix "memory_pool-" InstanceFrom "name" <Value> Type "memory" Table true Attribute "Usage" </Value> </MBean> <MBean "memory-heap"> ObjectName "java.lang:type=Memory" InstancePrefix "memory-heap" <Value> Type "memory" Table true Attribute "HeapMemoryUsage" </Value> </MBean> <MBean "memory-nonheap"> ObjectName "java.lang:type=Memory" InstancePrefix "memory-nonheap" <Value> Type "memory" Table true Attribute "NonHeapMemoryUsage" </Value> </MBean> <MBean "thread"> ObjectName "java.lang:type=Threading" InstancePrefix "threading" <Value> Type "gauge" Table false Attribute "ThreadCount" InstancePrefix "count" </Value> </MBean> <MBean "thread-daemon"> ObjectName "java.lang:type=Threading" InstancePrefix "threading" <Value> Type "gauge" Table false Attribute "DaemonThreadCount" InstancePrefix "count-daemon" </Value> </MBean> ### MBeans by Catalina / Tomcat ### # The global request processor (summary for each request processor) <MBean "catalina/global_request_processor"> ObjectName "Catalina:type=GlobalRequestProcessor," InstancePrefix "catalina_request_processor-" InstanceFrom "name"

  &lt;Value&gt;
    Type &#34;io_octets&#34;
    InstancePrefix &#34;global&#34;
    #InstanceFrom &#34;&#34;
    Table false
    Attribute &#34;bytesReceived&#34;
    Attribute &#34;bytesSent&#34;
  &lt;/Value&gt;

  &lt;Value&gt;
    Type &#34;total_requests&#34;
    InstancePrefix &#34;global&#34;
    #InstanceFrom &#34;&#34;
    Table false
    Attribute &#34;requestCount&#34;
  &lt;/Value&gt;

  &lt;Value&gt;
    Type &#34;total_time_in_ms&#34;
    InstancePrefix &#34;global-processing&#34;
    #InstanceFrom &#34;&#34;
    Table false
    Attribute &#34;processingTime&#34;
  &lt;/Value&gt;
&lt;/MBean&gt;

&lt;MBean &#34;catalina/threadpool&#34;&gt;
  ObjectName &#34;Catalina:type=ThreadPool,*&#34;
  InstancePrefix &#34;catalina_threadpool-&#34;
  InstanceFrom &#34;name&#34;

  &lt;Value&gt;
    Type &#34;gauge&#34;
    Table false
    Attribute &#34;maxThreads&#34;
    InstancePrefix &#34;threadpool-maxThreads&#34;
  &lt;/Value&gt;
  &lt;Value&gt;
    Type &#34;gauge&#34;
    Table false
    Attribute &#34;connectionCount&#34;
    InstancePrefix &#34;threadpool-connectionCount&#34;
  &lt;/Value&gt;
&lt;/MBean&gt;

&lt;MBean &#34;tomcat_manager&#34;&gt;
     ObjectName &#34;Catalina:type=Manager,context=*,host=*&#34;
     InstanceFrom &#34;context&#34;
     &lt;Value&gt;
        Type &#34;gauge&#34;
        InstancePrefix &#34;manager-active_sessions&#34;
        Table false
        Attribute &#34;activeSessions&#34;
    &lt;/Value&gt;
&lt;/MBean&gt;

&lt;MBean &#34;jvm_runtime&#34;&gt;
  ObjectName &#34;java.lang:type=Runtime&#34;
  &lt;Value&gt;
    Type &#34;counter&#34;
    InstancePrefix &#34;runtime-uptime&#34;
    Table false
    Attribute &#34;Uptime&#34;
  &lt;/Value&gt;
&lt;/MBean&gt;

 &lt;MBean &#34;jvm_system&#34;&gt;
   ObjectName &#34;java.lang:type=OperatingSystem&#34;
   &lt;Value&gt;
     Type &#34;gauge&#34;
     InstancePrefix &#34;os-open_fd_count&#34;
     Table false
     Attribute &#34;OpenFileDescriptorCount&#34;
   &lt;/Value&gt;
   &lt;Value&gt;
     Type &#34;counter&#34;
     InstancePrefix &#34;os-process_cpu_time&#34;
     Table false
     Attribute &#34;ProcessCpuTime&#34;
   &lt;/Value&gt;
 &lt;/MBean&gt;
&lt;Connection&gt;
  ServiceURL &#34;service:jmx:rmi:///jndi/rmi://myserver:9090/jmxrmi&#34;
  Host &#34;myserver&#34;
  User &#34;myuser&#34;
  Password &#34;mypassword&#34;
  IncludePortInHostname true
  Collect &#34;classes&#34;
  Collect &#34;thread&#34;
  Collect &#34;thread-daemon&#34;
  Collect &#34;compilation&#34;
  Collect &#34;garbage_collector&#34;
  Collect &#34;memory_pool&#34;
  Collect &#34;memory-heap&#34;
  Collect &#34;memory-nonheap&#34;
  Collect &#34;catalina/global_request_processor&#34;
  Collect &#34;catalina/threadpool&#34;
  Collect &#34;jvm_system&#34;
  Collect &#34;jvm_runtime&#34;
  Collect &#34;tomcat_manager&#34;
&lt;/Connection&gt;

</Plugin> </Plugin>

Revisions
RevisionDescriptionCreated
Apache Tomcat

Apache Tomcat

by Grafana Labs
Grafana Labs solution

Easily monitor Apache Tomcat, an open source web server and servlet container that can run Java-based web applications, with Grafana Cloud's out-of-the-box monitoring solution.

Learn more

Get this dashboard

Import the dashboard template

or

Download JSON

Datasource
Dependencies