$('a[name]').remove(); $('#ic-homepage__footer').before('
'); $("#tabs").tabs({ selected: 1 }); $("#ic-homepage__ic-tips").append( quickTipHTML() ); unhideOneProductTip(); $("#ic-homepage__product-tips").wrapInner('
'); $("#ic-homepage__feed-tips").wrapInner('
'); });
IBM Tivoli Monitoring > Version 6.3 > User's Guides > Agent Builder User's Guide > Monitor Java Management Extensions (JMX) MBeans IBM Tivoli Monitoring, Version 6.3
Specific fields for Java Management Extensions (JMX) MBeans
The syntax of the metric name for a JMX Attribute group must follow certain rules when specified on the Attribute Information window.
Figure 1. Attribute Information page
The syntax of the metric name for a JMX Attribute group consists of tokens that are separated by a period. The tokens form primary values and optionally secondary values:
- Primary value: a value that is obtained directly from the MBean or Notification in a specific row of the table. Primary values from an MBean are obtained either from an MBean attribute or from the invocation of an MBean operation (method call). Primary values from a Notification are obtained from a field or invocation of a method on the Notification object. Primary values can be primitive types, or can be Java objects.
- Secondary value: a value that is obtained by further processing a primary value or other secondary value. Secondary values are processed internally to the engine and do not involve calls to the JMX server. If the primary (or other secondary value) is a Java object, a secondary value is the result of fetching a public field from that object. A secondary value can also be the result of a method call on that object. Such secondary values are obtained by using Java introspection of the primary (or other secondary) Java object. If the primary (or other secondary) value is a Java String in the form of an MBean name, the secondary value can be the domain. The secondary value can also be any of the properties that make up the MBean name.
The following syntax describes the format for the Metric name field:
Metric Name = PrimaryValue [ .SecondaryValue ] PrimaryValue = Attribute.attributeName | Method.methodName | Domain | Property.propertyName | Field.fieldName | Name SecondaryValue = Field.fieldName | Method.methodName | Domain | Property.propertyName | Explode | ElementCount
propertyName = the name of a key property in an MBean ObjectName attributeName = the name of an MBean attribute methodName = a zero-argument operation of an MBean or a zero-argument method of a Notification or other Java object. methodName(argument) = A single-argument operation of an MBean or a single-argument method of a Notification or other Java object. The argument will be passed to the method as a string. fieldName = the name of a public instance variable in a Notification or other Java object notificationMethod = the name of a public zero-argument method of a Notification objectBy including only a primary value in the metric name definition, the data that is collected can be any of the following items:
- MBean domain
- MBean string value
- Key property from the MBean name
- Numeric or string attribute value on an MBean attribute (including the full name of another MBean). A numeric or string return value from an operation of a MBean.
- Value of a numeric or string public instance variable in a Notification object
- Numeric or string return value from an operation of a Notification.
By adding a secondary value to the definition of a metric, you can drill down into the primary value of a Java object. Also, you can start a public method or fetch a public instance variable.
By adding a secondary value to another secondary value in the definition of the metric, you can drill down into a secondary value object. You can continue as deeply as objects are nested inside an MBean or a Notification.
Tokens that make up primary and secondary values are either keywords or names. In most cases, a keyword token is followed by a name token. The following table shows some examples:
Metric name sample Attribute group type Description of the data returned Domain MBean The domain portion of the MBean (the part before the colon). Name MBean The full string representation of the MBean. Attribute.serverVendor MBean MBean attribute serverVendor. Method.getHeapSize MBean The value that is returned by the getHeapSize() on the MBean. Property.j2eeType MBean The value of j2eeType is extracted from the MBean name. Field.Message Event (Notification) The Message field in a notification.
The keywords Attribute, Method, and Field can return Java objects which contain other data. You can run operations on those objects by appending secondary value definitions. More examples:
Metric name sample Attribute group type Description of the data returned Attribute.deployedObject.Method.getName MBean Takes the deployedObject attribute from the MBean and gets the result of the getName() method. Attribute.eventProvider.Method.
getException.Method.getDescriptionMBean Goes 3 deep: an attribute named eventProvider is presumed to be an object which has a getException() method. This method returns an object with a getDescription() method. That method is called and the return value is put in the column. Attribute.HeapMemoryUsage.Method.
get(used)MBean Takes the HeapMemoryUsage attribute from the MBean and gets the result of the get(String value) method. The string that is used is passed to the method as the argument. Only 1 argument can be provided and it must be a literal string value. Shows how you can collect data from an open MBean composite data structure.
Domain and Property can be used as keywords in secondary values if the previous value returned a String in the format of an MBean name. For example:
Metric name sample Attribute group type Description of the data returned Attribute.jdbcDriver.Property.name MBean The attribute jdbcDriver returns an MBean name, and the key property, name, is extracted from the MBean name. Attribute.jdbcDriver.Domain MBean The attribute jdbcDriver returns an MBean name, and the domain is extracted from the MBean name.
The ElementCount and Explode keywords run operations on arrays or collections of data.
- ElementCount – returns the number of elements in an array.
- Explode – explodes a row into several rows, one new row for each element of an array.
Examples of each of the keywords:
Metric name sample Attribute group type Description of the data returned Attribute.deployedObjects.ElementCount MBean The MBean attribute deployedObjects is an array, and this column contains the number of elements in the array. Attribute.deployedObjects.Explode.
MBean.Property.j2eeTypeMBean Causes the table to have 1 row for each element in deployed objects. This column contains the j2eeType of the deployed Object. Attribute.SystemProperties.Method.
values.Explode.Method.get(key)MBean Causes you to get one new row for each entry in an open MBean tabular data structure. Each tabular data structure contains a composite data structure with an item named key, which is returned.
Parent topic:
Monitor Java Management Extensions (JMX) MBeans