Extended Monitoring Guide

  • Docs Home
  • Community Home

4. Monitor Values in TabularData and CompositeData Objects

The Attribute Path input value on the ZenJMX data source allows you to monitor values nested in the TabularData and CompositeData complex open data objects. Using this value you can specify a path to traverse and index into these complex data structures.

If the result of traversing and extracting a value out of the nested open data is a single numeric value then it is automatically mapped to the datapoint in the data source. However, if the value from the open data is another open data object then the data point names from the datasource are used as indexes or keys to map values out of the open data.

The input value is a dot-separated string that represents a path through the object. Non-bracketed values are keys into CompositeData. Bracketed values are indexes into TabularData.

For TabularData indexes with more than one value, use a comma-separated list with no spaces (for example, [key1,key2]).

To specify a column name (needed only when the table has more than two columns) use curly brackets after the table index.

Example

To get the used Tenured Generation memory after the last garbage collection from the Garbage Collector MBean, set the Attribute Name on the datasource to lastGcInfo. Set the Attribute Path to:

memoryUsageAfterGc.[Tenured Gen].{value}.used 

The key memoryUsageAfterGc is evaluated against the CompositeData returned from the lastGcInfo attribute. The evaluation results in a TabularData object. Then, the [Tenured Gen] index is evaluated against the TableData, which returns a row in the table.

Since a row in the table can contain multiple columns, the key value (in curly brackets) is used to pick a column in the row. Lastly, the key used is evaluated against the CompositeData in the column to return the memory value.

In this example, since the index being used for the tabular data is not a multi-value index and so the column name is optional. The Attribute Path can be written as:

memoryUsageAfterGc.[Tenured Gen].used