Elastic APM Java Agent JMX

Hi @aravind0910 ,

The syntax is not correct in your configuration properties, it should be replaced by:

capture_jmx_metrics=object_name[java.lang:type=Memory] attribute[HeapMemoryUsage:metric_name=heap]

Also, for extra clarity I suggest using the multi-line syntax when there are multiple objects and attributes:

capture_jmx_metrics=\
object_name[java.lang:type=Memory] \
attribute[HeapMemoryUsage:metric_name=heap] \
attribute[NonHeapMemoryUsage:metric_name=nonheap] \
, \
object_name[java.lang:type=Threading] \
attribute[ThreadCount:metric_name=thread_count] \

1 Like