jmxtrans / jmxtrans

jmxtrans
MIT License
1.71k stars 502 forks source link

Extracting keys from composite data #691

Open Navgeet opened 6 years ago

Navgeet commented 6 years ago

I'm trying to extract LastGcInfo.GcThreadCount from java.lang:type=GarbageCollector,name=*. I see there's an option called keys in Query model, but it extracts all the keys, not just the one I specify.

How can I extract just the one key I want?

NatGuyton commented 5 years ago

I'm struggling with the exact same thing. I want to get the GcThreadCount and duration, but not the memoryUsageAfterGc map that includes a bunch of stuff I don't want.

NatGuyton commented 5 years ago

Looks like it's under "MBean Composite Data attribute" on https://github.com/jmxtrans/jmxtrans-agent/blob/master/README.md for jmxtrans-agent... not sure about for jmxtrans, though - parameters are different.

NatGuyton commented 5 years ago

An inelegant solution, for now I am making use of carbon's blacklist feature, blocking LastGcInfo_memory.*