What is the best way for tomcat monitoring in check_mk

HI i m testing check_mk2.2

i just wish to know, what is the best way we can monitor the tomcat in check_mk?
i basically looking for monitoring , tomcat all memory (Heap / non Heap ), Garbage collection , and thread analysis, session replication ,etc .

The jokokia plugin. (Filler for 20 chars)

Download the jolokia agent from jolokia.org and add it to yout tomcat (attention: the current jolokia agent (1.7) does not work with tomcat 10. it is still unclear if and when jolokia 2.0 will be available for tomcat 10. if you have a tomcat 10+ mayby this workaround can help : Tomcat 10.x throws java.lang.NoClassDefFoundError on javax.servlet.* - Stack Overflow).

If jolokia is running within your tomcat you can query the metrics and mbean with the mk_jolokia plugin. The Jolokia Check includes autodiscovery for the most common metrics. Other mbean can be added with custome queries.

As an alternative, the metrics can also be queried directly via nagios check_jmx plugin. But this is much more complex as each metric has to be configured manually.

2 Likes

Hi

i can see https://jolokia.org/ , released 2.0.3.
what exactly we nee to do , to monitor tomcat (specially for memory,Threads, GC etc, )

Depending on the Tomcat version, the 2.x or 1.x Jolokia agent must be used. For the installation of Jolokia in a Tomcat please read the Jolokia manual (unfortunately I am not so familiar with Tomcat). I think for Tomcat you can deploy the WAR agent or load Jolokia as a JVM agent with “-javaagent:…”
https://jolokia.org/tutorial.html

Then you can deploy the mk_jolokia plug-in on the host and configure it as required with the “JMX monitoring of Java JVMs using Jolokia” Rule. If everything works, Checkmk will display several JVM services in the GUI after detection, which than can be parameterized accordingly via rules.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.