I am trying to use the JMX Exporter to get some MBean metrics exposed from inside a JVM application. I wanted to get only one metric for now, so I created this config file:
lowercaseOutputLabelNames: true
lowercaseOutputName: true
blacklistObjectNames: ["*:*"]
rules:
- pattern: 'jvm_buffer_pool_used_bytes.*'
However, I get a lot of metrics not matching this pattern:
$ k exec -it my-container -- curl localhost:5000 | grep -v '^#' | head -n10
jvm_classes_currently_loaded 26481.0
jvm_classes_loaded_total 26481.0
jvm_classes_unloaded_total 0.0
jmx_config_reload_failure_total 0.0
process_cpu_seconds_total 73.98
process_start_time_seconds 1.720734328681E9
process_open_fds 2336.0
process_max_fds 1048576.0
process_virtual_memory_bytes 1.6737144832E10
process_resident_memory_bytes 2.793545728E9
I am basically fiddling around using the example files as inspiration, so I guess I am misunderstanding something here… How can I filter only the metric I requested?