# How to enable JMX monitoring for a process

**URL:** <https://community.dynatrace.com/t/how-to-enable-jmx-monitoring-for-a-process/13767>\
**Category:** Open Q&A\
**Tags:** java\
**Created:** [July 16, 2018, 7:10am UTC](https://community.dynatrace.com/t/how-to-enable-jmx-monitoring-for-a-process/13767 "2018-07-16T07:10:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![suresh230591](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suresh230591/32/280_2.png) [@suresh230591](https://community.dynatrace.com/u/suresh230591)\
**Post date:** [July 16, 2018, 7:10am UTC](https://community.dynatrace.com/t/how-to-enable-jmx-monitoring-for-a-process/13767/1 "2018-07-16T07:10:32Z")

</div>

Hi All,

I have oneAgent installed on the host. For few Java processes JMX are enabled by default but for few processes Dcom.sun.management.jmxremote 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.

Thanks

Suresh

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [July 16, 2018, 8:53am UTC](https://community.dynatrace.com/t/how-to-enable-jmx-monitoring-for-a-process/13767/2 "2018-07-16T08:53:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![suresh230591](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suresh230591/32/280_2.png) [@suresh230591](https://community.dynatrace.com/u/suresh230591)\
**Post date:** [July 16, 2018, 9:53am UTC](https://community.dynatrace.com/t/how-to-enable-jmx-monitoring-for-a-process/13767/3 "2018-07-16T09:53:52Z")

</div>

[@Julius L.](https://answers.dynatrace.com/users/16467/view.html)

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 Dcom.sun.management.jmxremote =9999 for broker process .

For consumer and producer , this parameter is Dcom.sun.management.jmxremote

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [July 16, 2018, 10:01am UTC](https://community.dynatrace.com/t/how-to-enable-jmx-monitoring-for-a-process/13767/4 "2018-07-16T10:01:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Enrico\_F](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/enrico_f/32/23774_2.png) [@Enrico\_F](https://community.dynatrace.com/u/Enrico_F)\
**Post date:** [July 17, 2018, 8:42am UTC](https://community.dynatrace.com/t/how-to-enable-jmx-monitoring-for-a-process/13767/5 "2018-07-17T08:42:44Z")

</div>

How can I access the beta?

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

---

<div class="post-metadata">

**Author:** ![suresh230591](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suresh230591/32/280_2.png) [@suresh230591](https://community.dynatrace.com/u/suresh230591)\
**Post date:** [July 17, 2018, 8:57am UTC](https://community.dynatrace.com/t/how-to-enable-jmx-monitoring-for-a-process/13767/6 "2018-07-17T08:57:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Enrico\_F](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/enrico_f/32/23774_2.png) [@Enrico\_F](https://community.dynatrace.com/u/Enrico_F)\
**Post date:** [July 17, 2018, 10:10am UTC](https://community.dynatrace.com/t/how-to-enable-jmx-monitoring-for-a-process/13767/7 "2018-07-17T10:10:58Z")

</div>

I don’t think this is what [@Julius L.](https://answers.dynatrace.com/users/16467/view.html) 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?

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [July 17, 2018, 10:57am UTC](https://community.dynatrace.com/t/how-to-enable-jmx-monitoring-for-a-process/13767/8 "2018-07-17T10:57:47Z")

</div>

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:

> **[Dynatrace Blog](https://www.dynatrace.com/news/blog/)**
>
> Stay updated on the latest news on observability, automation, AI, and app security. Look here for actionable insights for optimizing your digital ecosystem.

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.

---

<div class="post-metadata">

**Author:** ![sarath\_koduru](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@sarath\_koduru](https://community.dynatrace.com/u/sarath_koduru)\
**Post date:** [November 13, 2018, 9:44am UTC](https://community.dynatrace.com/t/how-to-enable-jmx-monitoring-for-a-process/13767/9 "2018-11-13T09:44:47Z")

</div>

Hi all,

please share the info for creating json file for adding metrics

---

<div class="post-metadata">

**Author:** ![suresh230591](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suresh230591/32/280_2.png) [@suresh230591](https://community.dynatrace.com/u/suresh230591)\
**Post date:** [November 13, 2018, 10:52am UTC](https://community.dynatrace.com/t/how-to-enable-jmx-monitoring-for-a-process/13767/10 "2018-11-13T10:52:11Z")

</div>

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

> **[JMX extensions](https://docs.dynatrace.com/docs/ingest-from/extend-dynatrace/extend-metrics/ingestion-methods/jmx-extensions)**
>
> Learn how to extend Dynatrace monitoring to include applications you've instrumented with JMX.
