JMX Metric Settings
The general settings for adding instrumentation for an MBean are:
- The Name is the identifier you want to display in the UI for the MBean.
- An Exclude Rule excludes matched MBeans that would otherwise be included by other rules. See Exclude MBean Attributes.
- Enabled means that you want this rule to be applied.
-
The Metric Path determines where the metric appears in the metric browser. For example, in the screenshot below, the metric path is "JDBC Connection Pools" for JMX metric "Tomcat_JDBCConnectionPools".
Note: Make sure that you do not use the full path in Metric Path. For example, useWeb Container Runtime
instead ofApplication Infrastructure Performance|account-services|JMX|Web Container Runtime.
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.
Instance Identifier is a field in the JMX Object pattern that can be used to categorize the runtime context of MBean category that has the same set of attributes. For example, the user category has two HTTP ports: 8090 and 8181. But attributes such as
currentThreadsBusy
andmaxThreads
are the same. If a JMX pattern has both HTTP and AJP, but the user is interested in monitoring only HTTP and not AJP thread pool, then the user uses an identifier, a name that matches HTTP so that only HTTP ports related MBean data is collected. - Advanced MBean Matching Criteria is an optional control for matching against attribute values. Identify the attribute name and value to test, along with matching criteria, such as a substring match.
Without any instance identifier specified, a tree of resources or attributes is shown on the JMX Metric browser that matches the Object Name Match Pattern.
Example1
JMX --> ConnectionPoolModules ConnectionPoolA PoolSize ConnectionPoolB PoolSize
If you specify an instanceIdentifier
like instance identifier = path2
, it will show the second level attributes on the top level also.
The above tree will be shown as in the following example. The PoolSize
, which is in the second level, also appears in the top level.
JMX --> ConnectionPoolModules PoolSize ConnectionPoolA PoolSize ConnectionPoolB PoolSize
For example, this screenshot displays the MBean matching criteria for the GCJMXMetric
rule.
To add a JMX metric rule:
- Select JBoss (top level) because you are adding a rule to the JMX metric group.
- Click .
- In the Advanced MBean Matching section, specify attribute(s) that exactly match the MBean attribute(s) (case sensitive).
For all matched MBeans, you can define one or more metrics for the attributes of those MBeans:
- 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.
- 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.
For example, the maxThreads MBean attribute is mapped to the Maximum Threads metric in the JMX metrics browser as shown here:
Example2
For instance, in a JBoss you get get the active count property from the following mbean:
jboss.as:subsystem=datasources,data-source=MyDatasource_01,statistics=pool
Define the metric rule:
Object name Match Pattern:jboss.as:subsystem=datasources,*,statistics=pool
Instance identifier: data-source
Attribute: ActiveCount
In the Object Name Match Patern, you can even use the wildcard to replace several branches, which is, if it were "jboss.as:subsystem=datasources,whatever=another_level,whatever=another_level,data-source=MyDatasource_01,statistics=pool" you can use "jboss.as:subsystem=datasources,*,statistics=pool".
The Instance Identifier is the instanced element that is separated:
jboss.as:subsystem=datasources,data-source=MyDatasource_01,statistics=pool
jboss.as:subsystem=datasources,data-source=MyDatasource_02,statistics=pool
...
jboss.as:subsystem=datasources,data-source=MyDatasource_07,statistics=pool
Therefore, you must use data-source as the instance identifier.