# How to configure JMX mBeans operations?

**URL:** <https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031>\
**Category:** Extensions\
**Tags:** jmx, extensions, java\
**Created:** [July 20, 2018, 3:33pm UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031 "2018-07-20T15:33:37Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![godwin\_shrimal](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@godwin\_shrimal](https://community.dynatrace.com/u/godwin_shrimal)\
**Post date:** [July 20, 2018, 3:33pm UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031/1 "2018-07-20T15:33:37Z")

</div>

I could create a JMX plugin using JMX plugin editor and its working fine and I can see the JMX stats. My problem is I have few mMbeans which has operations, not attributes. JMX plugin editor not support for operators. Is there any way to add JMX operators?

---

<div class="post-metadata">

**Author:** ![Jakub\_Mierzewsk](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jakub_mierzewsk/32/36350_2.png) [@Jakub\_Mierzewsk](https://community.dynatrace.com/u/Jakub_Mierzewsk)\
**Post date:** [August 21, 2018, 9:15am UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031/2 "2018-08-21T09:15:53Z")

</div>

Why do you want to monitor operations? What exactly you wan to get name of operation? Could you send us your mBeans tree with market data which you want to gather?

---

<div class="post-metadata">

**Author:** ![kaidwnflmnfrvem](https://avatars.discourse-cdn.com/v4/letter/k/48db29/32.png) [@kaidwnflmnfrvem](https://community.dynatrace.com/u/kaidwnflmnfrvem)\
**Post date:** [September 23, 2020, 1:44pm UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031/3 "2020-09-23T13:44:18Z")

</div>

I am also having the same question. When we are using JConsole, we can manage the application by executing the MBean operations (eg: restart() ← this will restart the application.). Does Dynatrace possess such a capability?

---

<div class="post-metadata">

**Author:** ![kaidwnflmnfrvem](https://avatars.discourse-cdn.com/v4/letter/k/48db29/32.png) [@kaidwnflmnfrvem](https://community.dynatrace.com/u/kaidwnflmnfrvem)\
**Post date:** [September 23, 2020, 1:48pm UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031/4 "2020-09-23T13:48:22Z")

</div>

[@Jakub M.](https://answers.dynatrace.com/users/40542/view.html) I think your understanding is wrong. What is specifically highlighted in this question is whether we can execute MBean operation via Dynatrace. (Which is a possible task in JConsole)

---

<div class="post-metadata">

**Author:** ![dave\_mauney](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dave_mauney/32/27784_2.png) [@dave\_mauney](https://community.dynatrace.com/u/dave_mauney)\
**Post date:** [September 23, 2020, 2:10pm UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031/5 "2020-09-23T14:10:17Z")

</div>

We allow accessing JMX metrics for monitoring purposes, and do not allow invocation of JMX operations.

---

<div class="post-metadata">

**Author:** ![kaidwnflmnfrvem](https://avatars.discourse-cdn.com/v4/letter/k/48db29/32.png) [@kaidwnflmnfrvem](https://community.dynatrace.com/u/kaidwnflmnfrvem)\
**Post date:** [September 24, 2020, 8:50am UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031/6 "2020-09-24T08:50:40Z")

</div>

Thanks for the information.

---

<div class="post-metadata">

**Author:** ![pankajraverkar](https://avatars.discourse-cdn.com/v4/letter/p/d78d45/32.png) [@pankajraverkar](https://community.dynatrace.com/u/pankajraverkar)\
**Post date:** [October 19, 2021, 7:00am UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031/7 "2021-10-19T07:00:00Z")

</div>

Hello Dave,

My problem is we would like to get Hikari Connections pool metrics on Dynatrace but we are not able to see the Hikari Connection pool metrics (Active , Pending, Acquired, Idle, Threads awaiting connections, usage etc). Hikari metrics we are able to see on Springboot admin page but we can’t get those on Dynatrace. Will you be able to provide any lead what is going wrong. In sprint boot admin we can see below metrics:

hikaricp.connections  
hikaricp.connections.acquire  
hikaricp.connections.active  
hikaricp.connections.creation  
hikaricp.connections.idle  
hikaricp.connections.max  
hikaricp.connections.min  
hikaricp.connections.pending  
hikaricp.connections.timeout  
hikaricp.connections.usage

Structure of microservice is , Docker --\> Having One Agent and Microservice code, Hikari pool jar is in side lib.

Regards,

Pankaj Raverkar

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [October 19, 2021, 7:26am UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031/8 "2021-10-19T07:26:37Z")

</div>

Hi,

Maybe you can try this one:&nbsp;[GitHub - chulderman/Dynatrace-HikariCP-Plugin · GitHub](https://github.com/chulderman/Dynatrace-HikariCP-Plugin). If it doesn’t work directly have a look at the json to see what it picks up.

Mike

---

<div class="post-metadata">

**Author:** ![pankajraverkar](https://avatars.discourse-cdn.com/v4/letter/p/d78d45/32.png) [@pankajraverkar](https://community.dynatrace.com/u/pankajraverkar)\
**Post date:** [October 19, 2021, 7:29am UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031/9 "2021-10-19T07:29:09Z")

</div>

Thanks a lot Mike, We tried this extension also but no luck.

---

<div class="post-metadata">

**Author:** ![sjivan](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@sjivan](https://community.dynatrace.com/u/sjivan)\
**Post date:** [November 20, 2021, 5:57pm UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031/10 "2021-11-20T17:57:50Z")

</div>

Same here, tried this plugin but it did not work. Hikari metrics are not picked up. Any suggestions?

---

<div class="post-metadata">

**Author:** ![urs\_fischer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/urs_fischer/32/7896_2.png) [@urs\_fischer](https://community.dynatrace.com/u/urs_fischer)\
**Post date:** [July 7, 2022, 2:51pm UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031/11 "2022-07-07T14:51:54Z")

</div>

is there a solution for hikari to see the pool-metrics. We also trying to instrument this, but no luck at the moment. We tried&nbsp;[https://micrometer.io/docs/registry/dynatrace](https://micrometer.io/docs/registry/dynatrace) but it did not work. It would be great if dynatrace supports hikari pool stuff out of the box&nbsp;😅

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [August 30, 2022, 12:06pm UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031/12 "2022-08-30T12:06:07Z")

</div>

Hi Folks,

Is there any change&nbsp; regarding this topic? My client would like collect the Hikaripool metrics also from Springboot under Openshift.

Thanks in advance.

Br, Mizső

---

<div class="post-metadata">

**Author:** ![JB](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@JB](https://community.dynatrace.com/u/JB)\
**Post date:** [August 16, 2023, 9:23pm UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031/13 "2023-08-16T21:23:44Z")

</div>

Hello all,

Is there any progress on this topic? I also have a client that would like to collect the Hikari connection pool metrics.

---

<div class="post-metadata">

**Author:** ![sanjivj](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@sanjivj](https://community.dynatrace.com/u/sanjivj)\
**Post date:** [August 16, 2023, 9:52pm UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031/14 "2023-08-16T21:52:10Z")

</div>

I was able to set this up successfully using Hikari exposed in Dynatrace. My memory is a bit fuzzy but what I did in my Spring boot app was create a Datasource setting&nbsp;&nbsp;dataSource.setRegisterMbeans(true); This could also be done in the yaml file

Also make sure your yaml file has

spring:&nbsp; &nbsp; jmx:  
&nbsp; &nbsp; &nbsp; &nbsp;enabled: true

datasource:

hikari:  
&nbsp; &nbsp; &nbsp; &nbsp; minimum-idle: 3  
&nbsp; &nbsp; &nbsp; &nbsp; register-mbeans: true

And then used the plugin script

Here are the results:

> **[Screenshot](https://cleanshot.com/share/dyNBK3Gp)**
>
> Screenshot

DataSource getDataSource(String url, String username, String password) {  
HikariDataSource dataSource = DataSourceBuilder  
.create()  
.type(HikariDataSource.class)  
.driverClassName(driver)  
.url(url)  
.username(username)  
.password(password)  
.build();

dataSource.setMinimumIdle(minimumIdle);  
dataSource.setMaximumPoolSize(maximumPoolSize);  
dataSource.setRegisterMbeans(true);  
return dataSource;  
}

> [@JB](https://community.dynatrace.com/user/49882)&nbsp;wrote:
> 
> Hello all,
> 
> Is there any progress on this topic? I also have a client that would like to collect the Hikari connection pool metrics.

---

<div class="post-metadata">

**Author:** ![CarlosCarrascoR](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/carloscarrascor/32/1925_2.png) [@CarlosCarrascoR](https://community.dynatrace.com/u/CarlosCarrascoR)\
**Post date:** [February 13, 2024, 12:46pm UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031/15 "2024-02-13T12:46:57Z")

</div>

[@sanjivj](https://community.dynatrace.com/user/63582)

Hello and thanks for your help. But i need more information.&nbsp;  
Can you help me understand where you made that configuration?  
questions  
Is it only necessary to have that configuration in a yaml file?  
Is it configured at the configmap level?

Could you give us the configuration step by step please.

thank you

---

<div class="post-metadata">

**Author:** ![shohebakthar](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@shohebakthar](https://community.dynatrace.com/u/shohebakthar)\
**Post date:** [May 23, 2025, 11:04am UTC](https://community.dynatrace.com/t/how-to-configure-jmx-mbeans-operations/14031/16 "2025-05-23T11:04:21Z")

</div>

Is this possible with a custom EF2.0 extension?
