jmx_exporter
jmx_exporter copied to clipboard
How to expose mbean with specific attribute(s)
Hi there,
I've been struggling with selective choose the attribute that I want to expose under a single mbean. The reason is that some mbeans have way too many attributes which I don't use, exposing all of them will fill up the capacity if many services are deployed.
Currently I'm having the following config to expose jmx metrics.
lowercaseOutputName: false
whitelistObjectNames:
- "kafka.producer:type=producer-metrics,client-id=*"
......
As you can see that I'm exposing the kafka.producer mbean, but I'm only interested in the request-latency-avg
attribute. Is it possible to expose this mbean with one or more attributes that I chose?
Thanks in advance.
Same issue here, I couldn't find a way to expose a specific attribute. Does JMX Exporter offer this capability?
Currently, there is no per MBean attribute filtering. This sounds like a great enhancement!
@AttitudeL @dalbani I just create a PR (https://github.com/prometheus/jmx_exporter/pull/870) to allow MBean attribute exclusion filtering.
Can you all review the enhancement to see if it satisfies your requirements?
@AttitudeL @dalbani I just create a PR (https://github.com/prometheus/jmx_exporter/pull/870) to allow MBean attribute exclusion filtering.
Can you all review the enhancement to see if it satisfies your requirements?
Wow thank you so much for adding this great enhancement. When I'm back home I will review the change.
Adding code to allow attribute filtering by ObjectName and attribute name.