メトリック定義でのワイルドカードの使用

関連ページ:

カスタムのダッシュボードウィジェットまたは正常性ルールでは、ワイルドカードを使用して、複数のハードウェアエンティティやメモリプールなど、複数のエンティティにまたがって評価するメトリックを指定できます。

メトリック階層のモバイル、Hardware Resources、JVM、CLR の各ブランチ内のメトリックと、「拡張機能とカスタムメトリック」で説明されているモニタリング拡張機能を使用して作成されたカスタムメトリックは、ワイルドカード機能に対応しています。

ワイルドカードを使用するには、以下を行います。

  1. 表示したいメトリックの相対メトリックパスを定義します。そのためには、メトリックブラウザから完全なメトリックパスを取得してそのパスを切り取る必要があります。
  2. 相対メトリックパスに変更を加えて複数のエンティティに適用します。
  3. 構成しているウィジェットまたは正常性ルールのメトリックセレクタに、変更を加えた相対パスを貼り付けます

相対メトリックパスの定義

メトリックパスは、特定のメトリックのパイプで区切られたパスです。コントローラ UI では、メトリックブラウザでメトリックにカーソルを合わせると完全なメトリックパスが表示されます。メトリックを右クリックすると、[フルパスのコピー(Copy Full Path)] オプションが表示されます。

相対メトリックパスを定義するには、完全なメトリックパスの左端部分を切り取ります。

特定のユースケースに対する切り取りの程度を確認するには、セットアップしているウィジェットまたは正常性ルール構成の [メトリックの選択(Metric Selection)] パネルで、埋め込みメトリックブラウザを確認します。このセレクタに到達する時点までに、選択したいメトリックのアプリケーション、ティア、またはノードは構成されているはずです。

相対メトリックパスの最初のセグメントとして [メトリックの選択(Metric Selection)] パネルのカテゴリを使用し、完全なメトリックパスのうち、そのセグメントより前に来るすべての部分を切り取ります。この例では、最初のセグメントは [分析データ収集時間(Analytics Data Collection Time)]、[分析方法評価時間(Analytics Method Evaluation Time)]、[分析スタックトレースキャプチャ時間(Analytics Stack Trace Capture Time)]、または [平均絵ンドツーエンド遅延(Average End to End Latency)] になります。

メトリックの選択

前出の例に従うと、メトリックブラウザからコピーした完全なメトリックパスは Application Infrastructure Performance|ECommerce Server|Hardware Resources|Disks|dev-dm-1|% CPU Time です。

埋め込みメトリックブラウザでの表示は [ハードウェアリソース(Hardware Resources)] から始まるため、[メトリックの選択(Metric Selection)] パネルで選択されているカテゴリ(この例では [ハードウェアリソース(Hardware Resources)])より左に来るすべての部分を切り取ります。

相対メトリックパスは、Hardware Resources|Disks|dev-dm-1|% CPU Time です。

メトリックブラウザからコピーした完全なメトリックパスが Application Infrastructure Performance|ECommerce Server|Individual Nodes|ECommerceAppNode|Hardware Resources|Disks|dev-dm-1|% CPU Time である別の例を考えます。

Hardware Resources の左に来るすべての部分を切り取った後の相対メトリックパスは、Hardware Resources|Disks|dev-dm-1|% CPU Time です。

相対メトリックパスの修正

相対メトリックパスの単一のセグメントをアスタリスクに置換して、そのセグメントによって表されるすべてのエンティティに対してメトリックが評価されるべきであることを示します。

警告: 単一のメトリックパスに複数のアスタリスクを使用することはできません。

例:

相対メトリックパスが Hardware Resources|Disks|dev-dm-1|% CPU Time で、その階層またはノードのすべてのディスクについて CPU 時間の割合の正常性ルール条件を表示または作成したいとします。

ディスク名をアスタリスクに置き換えます。例:Hardware Resources|Disks|*|% CPU Time

注: 相対パスの末尾のアスタリスクはサポートされていません。たとえば、"Hardware Resources|Disks|C|*" はサポートされていません。

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.

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).