Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to enable JMX monitoring for a process


Hi All,

I have oneAgent installed on the host. For few Java processes JMX are enabled by default but for few processes is set without port number.

How to expose JMX metric for any processes.Where we need to make configuration changes in order to expose JMX.




DynaMight Legend
DynaMight Legend

No, you don't have to expose JMX publicly on a port to collect metrics using JMX. Dynatrace Oneagent does not work this way (collecting through TCP connection). You don't have to do any changes on monitored application to allow metrics data collection.

On Dynatrace side, you need to write the plugin (actually a JSON file) describing metrics to be collected. You can also use the JMX plugin editor that will allow you to do it interactively within Dynatrace UI.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

@Julius L.

I uploaded the plugin (Kafka plugin) on Dynatrace but still not able to find the metrics. What support team said is I have to find the producer and consumer processes and then expose the JMX on them.Then only it will capture the required metrics. I could see Broker process metrics only , in the command line argument I could see =9999 for broker process .

For consumer and producer , this parameter is

There can be many reasons for that. The best way is to use the builtin JMX Plugin Editor, which enables you remotely browse JMX attributes on Java processes within your environment and build the plugin.

If you don't have this tool in you Dynatrace environment yet (should be public beta by now), you can try to run jconsole as the same user (or as root user) on the monitored server and see if those JMX attributes are there.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

How can I access the beta?

My UI says it's 1.149.113 - should I be able to use the JMX Plugin editor?

Its available from version 1.35 onward. Go to Setting> Monitored technologies>custom plugin>select your uploaded plugin>click on Add Metrics

I don't think this is what @Julius L. referred to as the "builtin JMX Plugin Editor". Just to be clear: I would like to avoid writing a JSON file containing the MBean domain names and keys and upload that as a custom plugin. Rather, I want to be able to discover what's available in a running JVM and pick whatever JMX metric might be appropriate for the purpose and possibly generating a JMX plugin as a result - at least that's my expectation of what I would get from a "builtin JMX Plugin Editor"- but maybe I'm totally wrong?

Enrico F. 

correct. I was talking about the editor, which does exactly as you expect. It's called JMX/PMI plugin editor

If you don't see it in your environment (yet), then you probably don't have that feature enabled. See more in this blog post:

I can see the editor in recent new Dynatrace Managed tenants, so I think it is globally available already. If you don't see it, you should contact your sales representative.


Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Hi all,

please share the info for creating json file for adding metrics

If it is a JMX plugin then the process is fairly straight forward . Use inbuilt plugin editor

Featured Posts