概要

ICMP テストを使用すると、ホストの可用性を監視し、ネットワーク通信の問題を診断できます。Datadog は、エンドポイントへの 1 つ以上の ICMP ping から受信した値をアサートすることにより、接続の問題、ラウンドトリップ時間のクォータを超えるレイテンシー、セキュリティファイアウォールコンフィギュレーションの予期しない変更を検出するのに役立ちます。テストでは、ホストに接続するために必要なネットワークホップ (TTL) の数を追跡し、traceroute の結果を表示して、パスに沿った各ネットワークホップの詳細を検出することもできます。

ICMP テストは、ネットワークの外部または内部のどちらからエンドポイントへの ICMP ping をトリガーするかに応じて、管理ロケーションおよびプライベートロケーションの両方から実行できます。ICMP テストは、定義されたスケジュールで、オンデマンドで、または CI/CD パイプライン内から実行できます。

: Windows プライベートロケーションは ICMP テストの実行をサポートしていません。

ブラウザトラブルシューティング

ICMP テストの作成を選択した後、テストのリクエストを定義します。

リクエストを定義する

  1. テストを実行するドメイン名または IP アドレスを指定します。
  2. Track number of network hops (TTL) (ネットワークホップ数 (TTL) の追跡) を選択または選択解除します。このオプションを選択すると、“traceroute” プローブをオンにして、ホストの宛先へのパスに沿ったすべてのゲートウェイを検出します。
  3. テストセッションごとにトリガーする Number of Pings (Ping の数) を選択します。 デフォルトでは、ping の数は 4 に設定されています。この数値は、減らすか最大 10 まで増やすかを選択できます。
  4. ICMP テストに名前を付けます。
  5. ICMP テストに env タグとその他のタグを追加します。次に、これらのタグを使用して、Synthetic Monitoring & Continuous Testing ページで Synthetic テストをフィルタリングできます。
ICMP リクエストを定義する

Test URL をクリックして、リクエストのコンフィギュレーションをテストします。画面の右側に応答プレビューが表示されます。

アサーションを定義する

アサーションは、期待されるテスト結果が何であるかを定義します。Test URL をクリックすると、latencypacket losspacket received の基本的なアサーションが追加されます。テストで監視するには、少なくとも 1 つのアサーションを定義する必要があります。

タイプ集計演算子値の型
レイテンシーavgmaxmin または stddev (別名 jitter)is less thanis less than or equal
isis more thanis more than or equal
整数 (ms)
パケットロス-is less thanis less than or equalisis more thanis more than or equalパーセント (%)
受信したパケット-is less thanis less than or equalisis more thanis more than or equalinteger
ネットワークホップ-is less thanis less than or equalisis more thanis more than or equalinteger

New Assertion を選択するか、応答プレビューを直接選択することで、API テストごとに最大 20 個のアサーションを作成できます。

ICMP テストが成功または失敗するためのアサーションを定義する

テストがレスポンス本文にアサーションを含まない場合、本文のペイロードはドロップし、Synthetics Worker で設定されたタイムアウト制限内でリクエストに関連するレスポンスタイムを返します。

テストがレスポンス本文に対するアサーションを含み、タイムアウトの制限に達した場合、Assertions on the body/response cannot be run beyond this limit というエラーが表示されます。

ロケーションを選択する

ICMP テストを実行するロケーションを選択します。ICMP テストは、ネットワークの外部または内部のどちらから ICMP ping をトリガーするかの好みによって、管理ロケーションとプライベートロケーションの両方から実行できます。

Datadog’s out-of-the-box managed locations allow you to test public-facing websites and endpoints from regions where your customers are located.

AmericasAPACEMEA
Canada Central (AWS)Hong Kong (AWS)Cape Town (AWS)
Northern California (AWS)Mumbai (AWS)Frankfurt (AWS)
Northern Virginia (AWS)Seoul (AWS)Ireland (AWS)
Ohio (AWS)Singapore (AWS)London (AWS)
Oregon (AWS)Sydney (AWS)Paris (AWS)
São Paulo (AWS)Tokyo (AWS)Stockholm (AWS)
Virginia (Azure)Osaka (AWS)Milan (AWS)
Jakarta (AWS)Bahrain (AWS)

The Datadog for Government site (US1-FED) uses the following managed location:

Americas
US-West

テストの頻度を指定する

ICMP テストは次の頻度で実行できます。

  • On a schedule: 最も重要なサービスにユーザーが常にアクセスできるようにします。Datadog で ICMP テストを実行する頻度を選択します。
  • Within your CI/CD pipelines
  • On-demand: チームにとって最も意味のあるときにいつでもテストを実行します。

Define alert conditions

Set alert conditions to determine the circumstances under which you want a test to fail and trigger an alert.

Alerting rule

When you set the alert conditions to: An alert is triggered if any assertion fails for X minutes from any n of N locations, an alert is triggered only if these two conditions are true:

  • At least one location was in failure (at least one assertion failed) during the last X minutes;
  • At one moment during the last X minutes, at least n locations were in failure.

Fast retry

Your test can trigger retries X times after Y ms in case of a failed test result. Customize the retry interval to suit your alerting sensibility.

Location uptime is computed on a per-evaluation basis (whether the last test result before evaluation was up or down). The total uptime is computed based on the configured alert conditions. Notifications sent are based on the total uptime.

Configure the test monitor

A notification is sent by your test based on the alerting conditions previously defined. Use this section to define how and what to message your team.

  1. Similar to how you configure monitors, select users and/or services that should receive notifications either by adding an @notification to the message or by searching for team members and connected integrations with the dropdown menu.

  2. Enter the notification message for your test. This field allows standard Markdown formatting and supports the following conditional variables:

    Conditional VariableDescription
    {{ #is_alert }}Show when the test alerts.
    {{ ^is_alert }}Show unless the test alerts.
    {{ #is_recovery }}Show when the test recovers from alert.
    {{ ^is_recovery }}Show unless the test recovers from alert.
    {{ #is_renotify }}Show when the monitor renotifies.
    {{ ^is_renotify }}Show unless the monitor renotifies.
    {{ #is_priority }}Show when the monitor matches priority (P1 to P5).
    {{ ^is_priority }}Show unless the monitor matches priority (P1 to P5).
  3. Specify how often you want your test to re-send the notification message in case of test failure. To prevent renotification on failing tests, leave the option as Never renotify if the monitor has not been resolved.

  4. Click Create to save your test configuration and monitor.

For more information, see Using Synthetic Test Monitors.

Variables

Create local variables

To create a local variable, click Create a Local Variable. You can select one of the following available builtins to add to your variable string:

{{ numeric(n) }}
Generates a numeric string with n digits.
{{ alphabetic(n) }}
Generates an alphabetic string with n letters.
{{ alphanumeric(n) }}
Generates an alphanumeric string with n characters.
{{ date(n unit, format) }}
Generates a date in one of Datadog’s accepted formats with a value corresponding to the UTC date the test is initiated at + or - n units.
{{ timestamp(n, unit) }}
Generates a timestamp in one of Datadog’s accepted units with a value corresponding to the UTC timestamp the test is initiated at +/- n units.
{{ uuid }}
Generates a version 4 universally unique identifier (UUID).

To obfuscate local variable values in test results, select Hide and obfuscate variable value. Once you have defined the variable string, click Add Variable.

変数を使用する

ICMP テストの URL およびアサーションで、Settings ページで定義されたグローバル変数を使用できます。

変数のリストを表示するには、目的のフィールドに {{ と入力します。

テストの失敗

テストが 1 つ以上のアサーションを満たさない場合、またはリクエストが途中で失敗した場合、テストは FAILED と見なされます。場合によっては、エンドポイントに対するアサーションをテストせずにテストが実際に失敗することがあります。

これらの理由には以下が含まれます。

DNS
テスト URL に対応する DNS エントリが見つかりませんでした。原因としては、テスト URL の誤構成や DNS エントリの誤構成が考えられます。

ヘルプ

デフォルトでは、Datadog 管理者および Datadog 標準ロールを持つユーザーのみが、Synthetic ICMP テストを作成、編集、削除できます。Synthetic ICMP テストの作成、編集、および削除のアクセス権を取得するには、ユーザーのロールをこれら 2 つのデフォルトのロールのいずれかにアップグレードしてください。

カスタムロール機能を使用している場合は、synthetics_read および synthetics_write 権限を含むカスタムロールにユーザーを追加します。

アクセス制限

アカウントにカスタムロールを使用しているお客様は、アクセス制限が利用可能です。

組織内の役割に基づいて、ICMP テストへのアクセスを制限することができます。ICMP テストを作成する際に、ユーザーに加えてどのロールがあなたのテストを読み取りおよび書き込むことができるかを選択します。

テストの権限の設定

その他の参考資料