jmx_exporter icon indicating copy to clipboard operation
jmx_exporter copied to clipboard

QA:Do jmx_prometheus_httpserver scrapy data from jmx server proactively when without prometheus?

Open hanson2021 opened this issue 2 years ago • 5 comments
trafficstars

When i only start jmx_prometheus_httpserver ,whether it will proactively scrapy data or not? If it will, is there any configure to control frequency?

hanson2021 avatar Sep 12 '23 06:09 hanson2021

No, it's just callbacks waiting for the Prometheus server to scrape. If the metrics endpoint is not called, nothing will happen.

fstab avatar Sep 12 '23 06:09 fstab

Can we have an option to enable active scraping at certain intervals? That way we can remove the dependency on the Prometheus server and jmx_exporter be used as a standalone tool.

mustajibmk avatar Sep 12 '23 08:09 mustajibmk

I think I don't understand your question. What are you trying to achieve? You need a Prometheus server to do Prometheus monitoring, right?

fstab avatar Sep 12 '23 09:09 fstab

Most of the time, yes we would have a Prometheus server which would do it for us. I was referring to the case where jmx_exporter was not being called by the Prometheus server but rather by custom Java code/application.

mustajibmk avatar Sep 12 '23 14:09 mustajibmk

The JMX exporter exposes a REST API to collect metrics from JMX MBeans. Each REST API call collects metrics and returns a metrics response.

The application (Prometheus, custom application, etc.) calling the REST API doesn't matter.

The scraping interval is a function of the application calling the REST API.

dhoard avatar Sep 12 '23 15:09 dhoard