Use Wildcards in Metric Definitions

Related Pages:

In a Custom Dashboard widget or Health Rule, you can use a wildcard to specify a metric that evaluates across several entities, such as multiple hardware entities or memory pools.

The wildcard feature is supported for metrics in the Mobile, Hardware Resources, JVM, and CLR branches of the metric hierarchy, and custom metrics that are created with a monitoring extension as described in Extensions and Custom Metrics.

To use wildcards:

  1. Define the relative metric path to the metric that you want to display. This involves getting the full metric path in the Metric Browser and then trimming it.
  2. Modify the relative metric path to apply to multiple entities.
  3. Paste the modified relative path in the metric selector for the widget or health rule that you are configuring.

Define the Relative Metric Path

A metric path is a pipe-delineated path to a specific metric. In the Controller UI, hover over a metric in the Metric Browser to get the full metric path. Right-click the metric to view the Copy Full Path option.

To define the relative metric path, truncate the leftmost part of the full metric path.

To know how much to truncate for a particular use case, look at the embedded metric browser in the Metric Selection panel of the widget or health rule configuration that you are setting up. By the time you have reached this selector, you will have configured the application, tiers, or nodes of the metric that you want to select.

Use the category in the Metric Selection panel as the first segment of the relative metric path, truncating everything from the full metric path that comes before that segment. In the example, the first segment would be Analytics Data Collection Time, Analytics Method Evaluation Time, Analytics Stack Trace Capture Time, or Average End to End Latency.

As per the preceding example, the full metric path copied from the Metric Browser is Application Infrastructure Performance|ECommerce Server|Hardware Resources|Disks|dev-dm-1|% CPU Time.

Truncate everything to the left of the category selected in the Metric Selection panel that is, Hardware Resources in this example, as the display in the embedded Metric Browser starts with Hardware Resources.

The relative metric path is: Hardware Resources|Disks|dev-dm-1|% CPU Time.

Consider another example where the full metric path copied from the Metric Browser is: Application Infrastructure Performance|ECommerce Server|Individual Nodes|ECommerceAppNode|Hardware Resources|Disks|dev-dm-1|% CPU Time.

The relative metric path after truncating everything to the left of the Hardware Resources is: Hardware Resources|Disks|dev-dm-1|% CPU Time.

Modify the Relative Metric Path

Replace a single segment in the relative metric path with an asterisk to indicate that the metric should be evaluated for all the entities represented by that segment.

Warning: Multiple asterisks in a single metric path are supported only if you select the Exact match one wildcard * to one level of directory option. Otherwise multiple asterisks in a single metric path are not supported.

For example:

The relative metric path is: Hardware Resources|Disks|dev-dm-1|% CPU Time, and you want to display or create a health rule condition on the % CPU time for all of the disks in that tier or node.

Substitute the asterisk for the disk name as: Hardware Resources|Disks|*|% CPU Time.

Warning: An Asterisk at the end of a relative path is supported only if you select the Exact match one wildcard * to one level of directory option.

Configure the Metric for Multiple Entities

In the Metric Selection panel for the dashboard widget or health rule, you can configure metric for multiple entries.

To configure the metric for multiple entities:

  1. Select Specify Relative Metric Path on the bottom of the Metric Selection panel.
  2. Paste the modified, wild-carded relative metric path and click Select Metric.

Enforce Strict Pattern Matching in Relative Path

In the Metric Selection Panel for a health rule, select the Exact match one wildcard * to one level of directory option to enforce a strict matching pattern in the relative metric path. By default, this option is not selected and the number of pipe symbols in the metric path is not considered. Therefore, all the results are fetched that matches the starting and ending path of the metric.

For example, if you specify the following relative metric:

Custom Metrics| WebsphereMQ-2|*|Status

The * wildcard replaces only one string between the two pipes in the actual metric path. The health rule evaluates only on the following actual metric path:

Custom Metrics| WebsphereMQ-2|UXSOAGWSG51.QM1|Status

and excludes the paths such as:

  • Custom Metrics| WebsphereMQ-2|UXSOAGWSG51.QM1|Channels|SOASG.TLMRP|Status

  • Custom Metrics| WebsphereMQ-2|UXSOAGWSG51.QM2|Channels|SOASG.TLMRP2|OIRDFF.SEEP|Status

By default, you can use a maximum of four wildcards * in the relative metric path. For example, the metric path Hardware *| *|*|* represents the actual path such as Hardware Resources|Network|en0|Outgoing KB.

Note:

For increasing the default number of wildcards allowed in the relative metric path, configure the following flag in the admin.jsp page:

appdynamics.controller.alerting.max.wildcard.entries = 4

Contact Cisco Support to configure the flag.

Examples

The following table list a few examples of the allowed wildcard patterns in the relative path:

Wildcard Pattern Result

Single wildcard:

Hardware Resources|Network|* |Incoming KB/sec

Hardware Resources|Network|en0|Incoming KB/sec

Hardware Resources|Network|utun4|Incoming KB/sec

Consecutive multiple wildcards:

Hardware Resources|Network|*|*|Incoming KB/sec

Hardware Resources|Network|en0|test|Incoming KB/sec

Hardware Resources|Network|utun4|test|Incoming KB/sec

Non-Consecutive multiple wildcards:

Hardware Resources|*|en0|*|Incoming KB/sec

Hardware Resources|test|Network|en0|test|Incoming KB/sec

Hardware Resources|test2|Network|en0|test2|Incoming KB/sec

End of Path wildcard:

Hardware Resources|Network|*

Hardware Resources|Network|Incoming Errors

Hardware Resources|Network|Outgoing KB

Start of path wildcard:

*|Network|Incoming KB/sec

Hardware Resources|Network|Incoming KB/sec Node.js|Network|Incoming KB/sec

As a part of the string:

Hardware *|Network|Incoming KB/sec

Hardware Resources|Network|Incoming KB/sec

Hardware Resources 2|Network|Incoming KB/sec

Four wildcards in the path:

Hardware *| *|*|*

Hardware Resources|Net|work|Incoming KB/sec

Hardware Resources|Network|en0|Outgoing KB

Hardware Resources|Network|en0|Outgoing KB/sec

Hardware Resources|Network|utun4|Incoming KB

Verify the Metric Specification

When you configure a relative metric specification for multiple similar entities in a custom dashboard, multiple metrics display in the widget.

Wildcards Replace Entire Path Segments

An asterisk replaces the entire segment in the path. You cannot use it to replace only a portion of a string because they are used in regular expressions.

For example, the following usage in an attempt to get the ART for all the business transactions beginning with View is not valid and not supported:

Business Transaction Performance|Business Transactions|ECommerce Server|View*|Average Response Time (ms).

Specify Average Response Time (ms) to get ART for all the business transactions on the ECommerce Server.

Colons in the Metric Path

The colon, if any, in the metric path is translated into a pipe. Only one segment is allowed between pipes. The colons and pipes can be used interchangeably.

For example:

The colon in the metric path, Application Infrastructure Performance|ECommerce Server|JVM|Memory:Heap|Committed (MB) is translated to Application Infrastructure Performance|ECommerce Server|JVM|Memory|Heap|Committed (MB).

For the relative metric path, to get metrics for both heap committed and non-heap committed, specify JVM|Memory|*|Committed (MB). Do not specify JVM|*|Committed (MB).