Capturing all JMX attributes for an object (wildcard support in attribute)?

I am trying to use the Elastic APM Java agent to capture JMX metrics for a JBoss application server.

If I set the capture_jmx_metrics property to
object_name[jboss.as:subsystem=datasources,xa-data-source=myDb, statistics=pool] attribute[ActiveCount]
I receive metrics with jvm.jmx.ActiveCount in Kibana:

.

However, now I would like to collect all (30+) attributes of this object.

The documentation states:

The name of the JMX attribute. The JMX value has to be either a Number or a composite where the composite items are numbers. This element can be defined multiple times. An attribute can contain optional properties. The syntax for that is the same as for ObjectName .
[...]
The JMX object name pattern supports wildcards.

When I change my property to include a wildcard for the attribute, however, I don't see any metrics:
object_name[jboss.as:subsystem=datasources,xa-data-source=myDb, statistics=pool] attribute[*]

Which makes me wondering whether wildcards are actually supported or not. Maybe I just misunderstood the documentation?

Thanks!

Yes,

The syntax for that is the same as for ObjectName

is misleading...
It means that you can use : and = similar to the ObjectName syntax, but you cannot use * for the attribute name (which would be the matching object name domain).

You will have to add all attributes that you are interested at in the configuration (the syntax supports multiple attribute entries).

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.