メトリック定義でのワイルドカードの使用
関連ページ:
Custom Dashboard ウィジェットまたは Health Rule では、ワイルドカードを使用して、複数のハードウェアエンティティやメモリプールなど、複数のエンティティにまたがって評価するメトリックを指定できます。
メトリック階層のモバイル、Hardware Resources、JVM、CLR の各ブランチ内のメトリックと、「拡張機能とカスタムメトリック」で説明されているモニタリング拡張機能を使用して作成されたカスタムメトリックは、ワイルドカード機能に対応しています。
ワイルドカードを使用するには、以下を行います。
- 表示したいメトリックの相対メトリックパスを定義します。そのためには、メトリックブラウザから完全なメトリックパスを取得してそのパスを切り取る必要があります。
- 相対メトリックパスに変更を加えて複数のエンティティに適用します。
- 構成しているウィジェットまたは正常性ルールのメトリックセレクタに、変更を加えた相対パスを貼り付けます。
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.
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.
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:
- Select Specify Relative Metric Path on the bottom of the Metric Selection panel.
- 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.
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:
|
|
|
Consecutive multiple wildcards:
|
|
|
Non-Consecutive multiple wildcards:
|
|
|
End of Path wildcard:
|
|
|
Start of path wildcard:
|
|
|
As a part of the string:
|
|
|
Four wildcards in the path:
|
|
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).