Vincent Zurczak created KARAF-4850: -------------------------------------- Summary: Be able to specify several object names for the JMX collector Key: KARAF-4850 URL: https://issues.apache.org/jira/browse/KARAF-4850 Project: Karaf Issue Type: Improvement Components: decanter Affects Versions: decanter-1.3.0, decanter-1.2.0 Reporter: Vincent Zurczak Priority: Minor
When using the JMX collector, there is a property called *object.name*, which can be a query for MBeans. However, the syntax of ObjectName is too poor IMO. And gathering all the MBeans information can result in sending too much data to the appender (e.g. ElasticSearch). It would be very convenient if one could customize which MBeans are retrieved exactly, as a list, in the same configuration file. Example: {quote} object.name = \ java.lang:type=Memory,name=HeapMemoryUsage |\ java.lang:type=Memory,name=NonHeapMemoryUsage |\ java.lang:type=OperatingSystem,name=SystemLoadAverage |\ java.lang:type=OperatingSystem,name=SystemCpuLoad |\ java.lang:type=OperatingSystem,name=ProcessCpuLoad |\ java.lang:type=OperatingSystem,name=FreePhysicalMemorySize |\ java.lang:type=Threading,name=ThreadCount {quote} I suggest to use the pipe character as a separator. Or, we could use the base property as a prefix. {quote} object.name.1=java.lang:type=Memory,name=HeapMemoryUsage object.name.2=java.lang:type=Memory,name=NonHeapMemoryUsage object.name.3=java.lang:type=OperatingSystem,name=SystemLoadAverage object.name.4=java.lang:type=OperatingSystem,name=SystemCpuLoad object.name.5=java.lang:type=OperatingSystem,name=ProcessCpuLoad object.name.6=java.lang:type=OperatingSystem,name=FreePhysicalMemorySize object.name.7=java.lang:type=Threading,name=ThreadCount {quote} In terms of performance, it should not have a major impact with respect to the current implementation. We need to parse the list of values and iterate over it to fullfill the set of ObjectNames. Obviously, this could be achieved by creating several CFG files. But you would have to copy the JMX settings over and over again. IMO, it is better to have one configuration file per JMX configuration. I could work on it and submit a patch if necessary. -- This message was sent by Atlassian JIRA (v6.3.4#6332)