AppDynamics Application Intelligence Platform

3.9.x Documentation


Learn by Watching

Doc Maps

Utilizing JMX Metrics - 4:02

This topic describes how to create persistent JMX metrics from MBean attributes.

There are two ways to add MBean metrics:

For background information about creating JMX metrics see Monitor JVMs and Monitor JMX MBeans.

JMX Metric Rules and Metrics

A JMX Metric Rule maps a set of MBean attributes from one or more MBeans into AppDynamics persistent metrics. You configure a metric rule that creates one or more metrics in the AppDynamics system. You may want to create new metrics if the preconfigured metrics do not provide sufficient visibility into the health of your system.

After the MBean attribute is configured to provide a persistent metric in AppDynamics, you can use it to configure health rules. For details see Health Rules.

To view the MBeans that are reporting currently in your managed environment use the Metric Browser.

You can use the JMX Metrics Rules Panel or the MBean Browser to create new metrics. MBean query expressions are supported.

Required User Permissions

To configure new JMX Metrics your user account must have "Configure JMX" permissions for the application.
For information about configuring user permissions for applications, see To Configure the Default Application Permissions.

Using the JMX Metric Rules Configuration Panel

The JMX Metric Rules Panel is the best way to create metrics for multiple attributes based on the same MBean or for complex matching patterns. 

  1. In the left navigation pane, click Configure -> Instrumentation.
  2. Click the JMX tab.
  3. In the JMX Metric Configurations panel, click the Java platform for which you are configuring metrics.
  4. In the JMX Metric Rules panel, click the Add (the + icon). The New Rule # panel opens. The rule is given the next incremented number.
  5. Provide the name and settings for this rule:
    • The Name is the identifier you want to display in the UI.
    • An Exclude Rule is used for excluding existing rules, so leave the default No option.
    • Enabled means that you want this rule to run, so leave it selected.
    • The Metric Path is the category as shown in the Metric Browser where the metrics will be displayed. A metric path groups the metrics and is relative to the Metric Browser node. For example, the following screenshot displays how the JMX Metric Rule "Tomcat_HttpThreadPools" is defined for the ACME Online demo. The metric path is "Web Container Runtime", the category on Metric Browser where all metrics configured under the "Tomcat_HttpThreadPools" Metric Rule will be available.
  6. In the MBeans subpanel, add matching criteria to identify the MBeans that you want to monitor.
    • The Domain name is the Java domain. This property must be the exact name; no wildcard characters are supported.
    • The Object Name Match Pattern is the full object name pattern. The property may contain wildcard characters, such as the asterisk for matching all the name/value pairs. For example, specifying "jmx:type=Hello,*" matches a JMX MBean ObjectName, "jmx:type=Hello,name=hello1,key1=value1".
    • The Instance Identifier is the MBean ID.
    • The Advanced MBean Matching Criteria is optional for more complex matching. Use one of the following:
      • any-substring
      • final-substring
      • equals
      • initial-substring
  7. Click Add Condition
    For example, the following screenshot displays the MBean matching criteria for the "Tomcat_HTTPThreadPools" rule.
  8. For all MBeans that match the preceding criteria, you can define one or more metrics for the attributes of those MBeans.
    In the Attributes panel click Add Attribute to specify the MBean attributes.
  9. Provide the name of the attribute and the metric name. The metric name is used to represent the metric in the Metric Browser.
  10. If needed, specify Advanced properties for the attribute.
    • Metric Getter Chain Expressions can be executed against any value. In addition, getter chains for Strings and Booleans are supported using implicit conversion. See MBean Getter Chains and Support for Boolean and String Attributes.
    • Metric Time Rollup determines how the metric will be aggregated over a period of time. You can choose to either average or sum the data points, or use the latest data point in the time interval.
    • Metric Cluster Rollup defines how the metric will be aggregated for a tier, using the performance data for all the nodes in that tier. You can either average or sum the data.
    • Metric Aggregator Rollup defines how the Agent rolls up multiple individual measurements (observations) into the observation that it reports once a one minute. For performance reasons, Agents report data to the Controller at one minute intervals. Some metrics, such as Average Response Time, are measured (observed) many times in a minute. The Metric Aggregator Rollup setting determines how the Agent aggregates these metrics. You can average or sum observations on the data points or use the current observation. Alternatively you can use the delta between the current and previous observation.
  11. Click Add Attribute to define another metric from the same MBean.
  12. Click Create JMX Rule.
    The following screenshot shows how the MBean attributes configured for the Tomcat_HttpThreadPools rule are displayed in the Metric Browser.

Using the MBean Browser to Add an MBean Attribute

You may know exactly which particular MBean attribute you want to monitor. You can select the attribute in the MBean Browser and create a JMX Metric Rule for it.

To create a metric from an MBean attribute in the MBean Browser

  1. Navigate to the attribute and select it in the MBean Browser.
  2. Click Create Metric.
  3. In the Select JMX Configuration for the Metric Rule window, select the group in which to create the rule from the Select JMX Configuration pulldown. The categories that already exist on your system are listed. This example uses the Tomcat JMX configuration. Click OK.
  4. Alternatively, you can create a new group with an name of your choosing. Click Create New JMX Configuration to make a new category. This is useful if you want to separate out the custom metrics from the out-of-the-box metrics. The Create JMX Metric Rule from an MBean window opens.
  5. Supply the Metric Path, the category as shown in the Metric Browser where the metrics will be displayed. For more discussion of the Metric Path see Step 5 of the previous section.
  6. Review the MBean Matching Criteria and modify it as needed. Since this is the MBean you selected, you probably do not need to change it.
  7. Review the MBean Attribute and Metric Name. This is the MBean attribute you originally selected. By default the name is the same as the attribute. You can change it if you want to be more specific about its use.
  8. Review the Advanced panel rollup criteria and update as needed. For more information about these options see Step 10 of the previous section.
  9. Click Add Attribute to define another metric from the same MBean.
  10. Click Create JMX Rule. The new metric displays in the JMX Metric Browser.

Learn More