How to monitor Java Management extensions (JMX)?
You can use the jvm_monitor probe for JMX
jvm_monitor probe is capable fetching JMX metrics off JAVA application.
You need to grant JMX port accessibility remotely on target JAVA application.
Typical parameter is as follows:
-Dcom.sun.management.jmxremote.port=<port> -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
How to proactively monitor heap space usage:
JMX interface allow us to access heap space metric.
It is possible to enable JMX (in JAVA probes) with additional Java parameters.
The approach remain probe independent while section required to modify is probe dependent.
Here is an example for vmware probe.
1. Open vmware probe via Raw Configure, and find Java startup parameter section.
In the vmware probe, the following configuration key can be found in the (startup) section.
-Xms(XX)m -Xmx(YY)m
2. Append JMX parameters to enable JMX. The whole setting should look like this in this example.
-Xms(XX)m -Xmx(YY)m -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9050 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
3. Restart the probe. The specified port (9050 in this example) come accessible.
4. You are able to monitor Java resources using third party tool (like JDK Jconsole).
Here is steps if you want to use UIM probe - jvm_monitor
[Resource Name] Any value
[Hostname or IP Address] IP Address / Hostname
[Port] JMX port (specified with -Dcom.sun.management.jmxremote.port)
as below example it's 9050
No username / password required.
5. Save to make it work.
6. Go back to jvm_monitor GUI and select the added resource in left pane.
Then select the required monitor item. Select as ResoureName > java.lang > memory > name > HeapMemoryUsagecheck committed and set the threshold for it.