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

関連ページ:

Custom Dashboard ウィジェットまたは Health Rule では、ワイルドカードを使用して、複数のハードウェアエンティティやメモリプールなど、複数のエンティティにまたがって評価するメトリックを指定できます。

メトリック階層のモバイル、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 です。

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.

警告: 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.

警告: 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.

相対パスでの厳密なパターン一致の強制

正常性ルールの [Metric Selection] パネルで [Exact match one wildcard * to one level of directory] オプションを選択して、相対メトリックパスで厳密な一致パターンを強制します。デフォルトではこのオプションは選択されておらず、メトリックパスのパイプ記号の数は考慮されません。したがって、メトリックの開始パスと終了パスに一致するすべての結果が取得されます。

たとえば、次の相対メトリックを指定したとします。

Custom Metrics| WebsphereMQ-2|*|Status

* ワイルドカードは、実際のメトリックパスの 2 つのパイプ間の 1 つの文字列のみを置き換えます。正常性ルールは、次の実際のメトリックパスのみ評価します。

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

次のようなパスは除外されます。

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

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

デフォルトでは、相対メトリックパスに最大 4 つのワイルドカード * を使用できます。たとえば、メトリックパス Hardware *| *|*|*Hardware Resources|Network|en0|Outgoing KB などの実際のパスを表します。

注:

相対メトリックパスで許可されるワイルドカードのデフォルト数を増やすには、admin.jsp ページで次のフラグを設定します。

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

次の表に、相対パスで許可されるワイルドカードパターンの例をいくつか示します。

ワイルドカードパターン 結果

単一のワイルドカード:

Hardware Resources|Network|* |Incoming KB/sec

Hardware Resources|Network|en0|Incoming KB/sec

Hardware Resources|Network|utun4|Incoming KB/sec

連続する複数のワイルドカード:

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

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

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

連続しない複数のワイルドカード:

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

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

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

パスの末尾のワイルドカード:

Hardware Resources|Network|*

Hardware Resources|Network|Incoming Errors

Hardware Resources|Network|Outgoing KB

パスの最初のワイルドカード:

*|Network|Incoming KB/sec

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

文字列の一部として:

Hardware *|Network|Incoming KB/sec

Hardware Resources|Network|Incoming KB/sec

Hardware Resources 2|Network|Incoming KB/sec

パス内の 4 つのワイルドカード:

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