Collecting Composite type JMX attributes
In the Agent, the yaml files for the following integrations are all read by JMXFetch:
There are two kinds of JMX attributes that JMXFetch is able to collect (simple and composite).
boolean etc …
Note: Boolean values of true result in 1 and false in 0. Check the list of supported types
You can use the
list commands in order to get an idea of what your current JMX integration is collecting. Here is a snippet of that output showing a Simple attribute:
Matching: x/350. Bean name: java.lang - Attribute name: attribute_1 - Attribute type: java.lang.Integer
That would give you the following configuration:
JMXFetch extracts the attribute value directly and use it as the metric value. See the JMX documentation to learn how to collect it.
These can be seen as an array, a hashmap, or an object composed of ‘simple’ attributes.
Matching: x/350. Bean name: java.lang - Attribute name: HeapMemoryUsage - Attribute type: javax.management.openmbean.CompositeData
In this case, you need to add more details to JMXFetch on how to use this ‘composite’ attribute to create a numerical value for a metric. In order to do this, use a
. to specify the component, i.e.:
How can I get to see the next level of these composite attributes?
The best way to achieve this would be using JMXterm (see below).
java -jar /opt/datadog-agent/agent/checks/libs/jmxterm-1.0-DATADOG-uber.jar -l localhost:<PORT> -u <USER> -p <PASSWORD>
Note, for all versions of Agent v5.32.8 or greater, the
jmxterm JAR is not shipped with the Agent. To download and use
jmxterm, see the upstream project.
Then use the get command to pull up a specific metric.