IBM Support

ITM Agent Insights: Gathering CompositeData MBean attributes with custom JMX monitoring agent

Technical Blog Post


Abstract

ITM Agent Insights: Gathering CompositeData MBean attributes with custom JMX monitoring agent

Body

IBM Tivoli Monitoring Agent Builder allows for the creation of custom monitoring agents using a JMX data source.  JMX data sources gather attribute metrics based on MBean data.  By default, custom agent attributes will not dig into a "CompositeData" MBean.  This post will explain how to define custom agent  attributes to gather the details for CompositeData MBeans by specifying the "Name" value for a sub-attribute to be passed to the "get" method.

 

For general example of creating a JMX monitoring agent with Agent Builder, refer to DCF 1963798.
JMX custom agent built with Agent Builder for WAS
http://www-01.ibm.com/support/docview.wss?uid=swg21963798

 

An example of a CompositeData MBean is the HeapMemoryUsage and NonHeapMemoryUsage objects.

Attribute.HeapMemoryUsage.Method.get(committed)
Attribute.HeapMemoryUsage.Method.get(used)
Attribute.NonHeapMemoryUsage.Method.get(committed)
Attribute.NonHeapMemoryUsage.Method.get(used)

"Heap Memory Usage" values as seen through jconsole:

image

"Heap Memory Usage" MBean definition as seen through jconsole:

image

In Agent Builder, first create an attribute group by browsing for the CompositeData MBean, in this example browse for MBeans with type=Memory:

image

After adding the MBean that contains the CompositeData, go to "Data Sources" tab and highlight the attribute group for the CompositeData MBean, in this example "Memory (JMX)":

image

Either "Add to Selected" and respond when prompted for attribute information. 

IBM Tivoli Monitoring Agent Component Wizard -> Attribute Information:

image

Alternately, edit an existing attribute and change the value in the "JMX Attribute Information" tab for the "Metric name" to include the get method and the sub-attribute name:

image

image

After adding the attributes using the "get" method and the sub-attribute values from the CompositeData MBean, highlight the attribute group - in this example "Memory (JMX)"

image

Then click on the "Test" button and verify the attributes created for the sub-attribute values populate with valid information:

image

After verifying that the Composite Mbean attribute definitions allow the metrics to be gathered, proceed to build / generate the custom agent as with any other custom agent in Agent Builder.

Keywords:

drd401709
5724C04BR  
5725U05AB

 

 

Additional ITM Agent Insights series of IBM Tivoli Monitoring Agent blogs are indexed under ITM Agent Insights: Introduction.

 

Tutorials Point

Subscribe and follow us for all the latest information directly on your social feeds:

 

imageimageimage

Check out all our other posts and updates:

Academy Blogs
Academy Videos
Academy Google+
Academy Twitter

image

 

[{"Business Unit":{"code":"BU004","label":"Hybrid Cloud"},"Product":{"code":"","label":""},"Component":"","Platform":[{"code":"","label":""}],"Version":"","Edition":""}]

UID

ibm11083111