AppDynamics Application Intelligence Platform
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.
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 Using the MBean Browser to create new metrics. MBean query expressions are supported.
Required User Permissions
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.
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:
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.
For example, the following screenshot displays the MBean matching criteria for the "Tomcat_HTTPThreadPools" rule.
For all MBeans that match the preceding criteria, you can define one or more metrics for the attributes of those MBeans.
7. In the Attributes panel click Add Attribute to specify the MBean attributes.
8. Provide the name of the attribute and the metric name.
The metric name is used to represent the metric in the Metric Browser.
9. If needed, specify Advanced properties for the attribute.
10. Click Add Attribute to define another metric from the same MBean.
11. Click Create JMX Rule.
The following screenshot shows how the MBean attributes configured for the Tomcat_HttpThreadPools rule will be displayed in the Metric Browser.
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.
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.
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.
4. 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.
5. 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.
6. 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.
7. Review the Advanced panel rollup criteria and update as needed. For more information about these options see Step 9 of the previous section.
8. Click Add Attribute to define another metric from the same MBean.
9. Click Create JMX Rule. The new metric displays in the JMX Metric Browser.