How to monitor JMX

Hi,

I would like to know how can we monitor JMX (Java Management Extensions) on CMK Raw Version.

I see this information:

But mention this:

If server is stated in the bakery rule {{JMX monitoring of Java JVMs using Jolokia}} the related configuration was wrong and an AttributeError occured while executing the agent plugin {{mk_jolokia}}. You have to bake the related rules and deploy the plugin and configuration file again.

And i can find the configurations on CMK app:

Can some one can explain me if the monitoring is possible and how can i monitor?

Thank you.

I ended up just using the check_jmx nagios plugin.

Hi, yo mean the mk_jolokia.py ?

Hi, no I mean the standalone nagios plugin available from here:
https://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/check_jmx/details
I then just use MRPE via the Check MK monitoring agent to run it.

I know the core of the Raw version is Nagios, but this is new to me, you can use these kind of plugins on check_mk and were do you install?

Thank you for your time.

@Gustavo
If you want to monitor jmx you need two additional files on the client. Configuration jolokia.cfg in /etc/check_mk and mk_jolokia.py plugin in /usr/lib/check_mk_agent/plugins. You can find both files in Monitoring Agents section of check_mk server, http://CHECK_MK_SERVER/SITE_NAME/check_mk/wato.py?folder=&mode=download_agents

EDIT:
Forgot to mention, you do need Jolokia activated on the Java process you are trying to monitor

1 Like

Hello @angrybb

Thank you very much for your answer, I want to ask you, regarding the activation of jolokia in the Java process, can you explain to me or perhaps with a link how to perform this task?

Again thank you very much!

The are couple of ways to activate jolokia. You did not mention where and how is your java application running. Standalone or inside application server?
More info here: Jolokia – Agents

1 Like

Hi @angrybb

Thank you for response, to be honest, at the moment i dontk now if the application is running as standalone or inside, i need to check first, just one last question, could you please show me the information that you can see in CMK with this configuration ?

Thank you very much-

You get some default stuff like JVM Uptime, Threads, Memory etc. And you can add your own custom stuff manually.
Here example of what you get by default on Karaf and two Custom defined Camel routes properties:

1 Like

Thank you for your time @angrybb

SOP

The Java Management Extensions (JMX) framework was introduced in Java 1.5 and has found widespread acceptance in the Java developers community since its inception.

It provides an easily configurable, scalable, reliable and more or less friendly infrastructure for managing Java application either locally or remotely. The framework introduces the concept of MBeans for real-time management of applications.

JMX Architecture

JMX architecture follows a three-layered approach:

Instrumentation layer: MBeans registered with the JMX agent through which resources are managed

JMX agent layer: the core component (MbeanServer) which maintains registry of managed MBeans and provides an interface to access them

Remote management layer: usually client side tool like JConsole

Configuration

If you want to monitor JMX you need two additional files on the client:

jolokia.cfg in /etc/check_mk

and

mk_jolokia.py plugin in /usr/lib/check_mk_agent/plugins.

You can find both files in Monitoring Agents section of check_mk server:

Remember you need Jolokia activated on the Java process you are trying to monitor.

They are couple of ways to activate jolokia. We need to know how your java application is running. Standalone or inside application server.

Various agents are available for providing Jolokia services in different environments:

WAR Agent: for deployment as web application in a Java EE Server.

OSGi Agent: for deployment in an OSGi container. This agent is packaged as a bundle and comes in two flavors (minimal, all-in-one).

JVM Agent: which can be used with any Oracle/Sun based JVM, Version 6 or later.

Mule Agent: for usage within a Mule ESB.

More Info here: Jolokia – Agents

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.