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

How to configure JMX mBeans operations?

godwin_shrimal
Newcomer

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?

 

14 REPLIES 14

Jakub_Mierzewsk
Inactive

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?


@Jakub M. 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)

kaidwnflmnfrvem
Newcomer

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?

dave_mauney
Dynatrace Champion
Dynatrace Champion

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

Thanks for the information.

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

Hi,

Maybe you can try this one: 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

Mike

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

sjivan
Frequent Guest

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

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 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 😅

Mizső
DynaMight Leader
DynaMight Leader

Hi Folks,

 

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

 

Thanks in advance.

 

Br, Mizső

Dynatrace Community RockStar 2024, Certified Dynatrace Professional

JB
Helper

Hello all,

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

 

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  dataSource.setRegisterMbeans(true); This could also be done in the yaml file

Also make sure your yaml file has 

spring:
    jmx:
       enabled: true

datasource:

    hikari:
        minimum-idle: 3
        register-mbeans: true

 

And then used the plugin script

Here are the results:

https://share.cleanshot.com/dyNBK3Gp

https://share.cleanshot.com/vDmLv6H1

 

 

 

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 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.

 


 

@sanjivj 

Hello and thanks for your help. But i need more information. 
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

Observability and monitoring

Featured Posts