jmx_exporter icon indicating copy to clipboard operation
jmx_exporter copied to clipboard

can JMX exporter provide http server request statistics?

Open ponson-thankavel opened this issue 3 years ago • 4 comments

Hello Experts,

We are using jmx exporter to export JVM stats for our java application. We recently had a requirement to collect http server request statistics and setup some alert on that. However, it seems like jmx exporter don't provide http server request statistics. We noticed that micrometer provides this out of the box. We want to ensure that this is not possible with jmx exporter before switching. Can anyone please help confirming this?

I posted this to prometheus users group in google groups but didn't get any response

https://groups.google.com/g/prometheus-users/c/xrP4ktdap9I

ponson-thankavel avatar Sep 23 '21 14:09 ponson-thankavel

@ponson-thankavel Please provide specifics. Is this a Java HTTP server? Are you using SpringBoot? Are you creating/registering custom MBeans? etc.

dhoard avatar Dec 22 '21 03:12 dhoard

I think we should register mbean to support this.

 <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-registry-jmx</artifactId>
            <version>${micrometer.version}</version>
        </dependency>

This may help you

qixiaobo avatar Jan 08 '22 09:01 qixiaobo

Micrometer can export metrics for Prometheus directly, using Micrometer's Prometheus registry.

There is no need to convert the metrics to JMX and use the jmx_exporter.

fstab avatar Jan 08 '22 10:01 fstab

Micrometer can export metrics for Prometheus directly, using Micrometer's Prometheus registry.

There is no need to convert the metrics to JMX and use the jmx_exporter.

You're right. But some case like below: We may already use jmx_exporter and do auto-discovery

qixiaobo avatar Jan 10 '22 01:01 qixiaobo

Closing as stale. Please reopen if you would like to continue the discussion.

dhoard avatar Jul 08 '23 03:07 dhoard