Kibana version: 7.7.1
Elasticsearch version: 7.7.1
APM Server version: 7.7.1
APM Agent language and version: Java, 1.17
Browser version: not relevant
Original install method (e.g. download page, yum, deb, from source, etc.) and version: download
Fresh install or upgraded from other version? fresh install
Is there anything special in your setup? no, plain "quick setup" installation
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
The Java agent does not capture JMX metrics as defined like this in JBoss EAP 7.3.0:
capture_jmx_metrics=object_name[jboss.as:subsystem=datasources,data-source=NomTDS_Pool,statistics=pool] attribute[AvailableCount] attribute[ActiveCount] attribute[InUseCount] attribute[TimedOut] attribute[WaitCount]
Also tried with wildcard for the pool name:
capture_jmx_metrics=object_name[jboss.as:subsystem=datasources,data-source=*,statistics=pool] attribute[AvailableCount] attribute[ActiveCount] attribute[InUseCount] attribute[TimedOut] attribute[WaitCount]
The only logs that appear can be seen below. JBoss/Wildfly creates the ObjectName at runtime when it discovers the various data sources in the standalone.xml configuration. See screenshot from JConsole, the MBean is available with all the attributes defined:
Steps to reproduce:
- Start JBoss with Agent via --javagent (standalone.conf.bat)
- Use configuration above
Provide logs and/or server output (if relevant):
These are the only logs related to "jmx" in JBoss:
2020-06-23 17:14:35.172 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - capture_jmx_metrics: 'object_name[jboss.as:subsystem=datasources,data-source=NomTDS_Pool,statistics=pool] attribute[AvailableCount] attribute[ActiveCount] attribute[InUseCount] attribute[TimedOut] attribute[WaitCount]' (source: C:\Server\JBoss_NomT\bin/elasticapm.properties)
2020-06-23 17:14:36.414 [main] DEBUG co.elastic.apm.agent.jmx.JmxMetricTracker - Deferring initialization of JMX metric tracking until log manager is initialized
2020-06-23 17:19:12.350 [elastic-apm-jmx-init] DEBUG co.elastic.apm.agent.jmx.JmxMetricTracker - Init JMX metric tracking with server com.sun.jmx.mbeanserver.JmxMBeanServer@402f88d
2020-06-23 17:19:12.356 [elastic-apm-jmx-init] DEBUG co.elastic.apm.agent.jmx.JmxMetricTracker - Found mbeans for object name jboss.as:subsystem=datasources,data-source=NomTDS_Pool,statistics=pool