Supported OS Linux Windows Mac OS

インテグレーションバージョン3.3.1

概要

Azure IoT Edge は、クラウドのワークロードをデプロイして、標準コンテナを使って Internet of Things (IoT) Edge デバイスで実行するためのフルマネージド型サービスです。

Datadog-Azure IoT Edge インテグレーションを使用すると IoT Edge デバイスからメトリクスや健全性の状態を収集できます。

: このインテグレーションには、IoT Edge ランタイムバージョン 1.0.10 以降が必要です。

セットアップ

以下の手順に従って、このチェックをデバイスホストで実行中の IoT Edge デバイスにインストール、構成します。

APM に Datadog Agent を構成する

Azure IoT Edge チェックは Datadog Agent パッケージに含まれています。

デバイスに追加でインストールする必要はありません。

コンフィギュレーション

Agent がカスタムモジュールとして実行するよう、IoT Edge デバイスを構成します。Azure IoT Edge のインストール方法およびカスタムモジュールの利用方法について、詳しくは Microsoft のドキュメントで Azure IoT Edge モジュールの実装をご確認ください。

IoT Edge メトリクスの収集を開始するには、下記の手順で IoT Edge デバイス、ランタイムモジュール、そして Datadog Agent を構成します。

  1. Edge Agent ランタイムモジュールを以下のように構成します。

    • イメージバージョンは 1.0.10 以上である必要があります。

    • “Create Options” で、次の Labels を追加します。com.datadoghq.ad.instances ラベルを適宜編集します。使用可能なすべてのコンフィギュレーションオプションについては、azure_iot_edge.d/conf.yaml のサンプル conf.yaml を参照してください。ラベルベースのインテグレーションコンフィギュレーションに関する詳細は、Docker インテグレーションオートディスカバリーのドキュメントをご参照ください。

      "Labels": {
          "com.datadoghq.ad.check_names": "[\"azure_iot_edge\"]",
          "com.datadoghq.ad.init_configs": "[{}]",
          "com.datadoghq.ad.instances": "[{\"edge_hub_prometheus_url\": \"http://edgeHub:9600/metrics\", \"edge_agent_prometheus_url\": \"http://edgeAgent:9600/metrics\"}]"
      }
      
  2. Edge Hub ランタイムモジュールを以下のように構成します。

    • イメージバージョンは 1.0.10 以上である必要があります。
  3. Datadog Agent をカスタムモジュールとしてインストールし、構成します。

    • モジュール名を設定します。(例: datadog-agent)

    • Agent のイメージ URI を設定します。(例: datadog/agent:7)

    • “Environment Variables” で DD_API_KEY を構成します。ここで、追加の Agent コンフィギュレーションを設定することも可能です (Agent の環境変数参照)。

    • “Container Create Options” で、デバイスの OS に基づき以下のコンフィギュレーションを入力します。: NetworkId は、デバイスの config.yaml ファイルに設定されたネットワーク名と一致する必要があります。

      • Linux:
        {
            "HostConfig": {
                "NetworkMode": "default",
                "Env": ["NetworkId=azure-iot-edge"],
                "Binds": ["/var/run/docker.sock:/var/run/docker.sock"]
            }
        }
        
      • Windows:
        {
            "HostConfig": {
                "NetworkMode": "default",
                "Env": ["NetworkId=nat"],
                "Binds": ["//./pipe/iotedge_moby_engine:/./pipe/docker_engine"]
            }
        }
        
    • Datadog Agent カスタムモジュールを保存します。

  4. 変更を保存しデバイスのコンフィギュレーションにデプロイします。

ログの収集

  1. Datadog Agent で、ログの収集はデフォルトで無効になっています。Datadog Agent カスタムモジュールを構成することで、これを有効にします。

    • “Environment Variables” で、DD_LOGS_ENABLED 環境変数を設定します。

      DD_LOGS_ENABLED: true
      
  2. “Create Options” で Edge Agent および Edge Hub モジュールを構成し、以下のラベルを追加します。

    "Labels": {
        "com.datadoghq.ad.logs": "[{\"source\": \"azure.iot_edge\", \"service\": \"<SERVICE>\"}]",
        "...": "..."
    }
    

    環境に合わせて service を変更します。

    ログを収集するカスタムモジュールに、この操作を繰り返します。

  3. 変更を保存しデバイスのコンフィギュレーションにデプロイします。

検証

Agent がデバイスにデプロイされたら、Agent の status サブコマンドを実行し、Checks セクションで azure_iot_edge を探します。

収集データ

メトリクス

azure.iot_edge.edge_hub.gettwin_total
(count)
Total number of GetTwin calls.
azure.iot_edge.edge_hub.messages_received_total
(count)
Total number of messages received from clients.
azure.iot_edge.edge_hub.messages_sent_total
(count)
Total number of messages sent to clients of upstream.
azure.iot_edge.edge_hub.reported_properties_total
(count)
Total reported property updates calls.
azure.iot_edge.edge_hub.message_size_bytes.count
(gauge)
Count of message size from clients.
azure.iot_edge.edge_hub.message_size_bytes.sum
(gauge)
Sum of message size from clients.
Shown as byte
azure.iot_edge.edge_hub.message_size_bytes.quantile
(gauge)
Quantile of message size from clients.
Shown as byte
azure.iot_edge.edge_hub.gettwin_duration_seconds.count
(gauge)
Count of time taken for get twin operations.
azure.iot_edge.edge_hub.gettwin_duration_seconds.sum
(gauge)
Sum of time taken for get twin operations.
Shown as second
azure.iot_edge.edge_hub.gettwin_duration_seconds.quantile
(gauge)
Quantile of time taken for get twin operations.
Shown as second
azure.iot_edge.edge_hub.message_send_duration_seconds.count
(gauge)
Count of time taken to send a message.
azure.iot_edge.edge_hub.message_send_duration_seconds.sum
(gauge)
Sum of time taken to send a message.
Shown as second
azure.iot_edge.edge_hub.message_send_duration_seconds.quantile
(gauge)
Quantile of time taken to send a message.
Shown as second
azure.iot_edge.edge_hub.message_process_duration_seconds.count
(gauge)
Count of time taken to process a message from the queue.
azure.iot_edge.edge_hub.message_process_duration_seconds.sum
(gauge)
Sum of time taken to process a message from the queue.
Shown as second
azure.iot_edge.edge_hub.message_process_duration_seconds.quantile
(gauge)
Quantile of time taken to process a message from the queue.
Shown as second
azure.iot_edge.edge_hub.reported_properties_update_duration_seconds.count
(gauge)
Count of time taken to update reported properties.
azure.iot_edge.edge_hub.reported_properties_update_duration_seconds.sum
(gauge)
Sum of time taken to update reported properties.
Shown as second
azure.iot_edge.edge_hub.reported_properties_update_duration_seconds.quantile
(gauge)
Quantile of time taken to update reported properties.
Shown as second
azure.iot_edge.edge_hub.direct_method_duration_seconds.count
(gauge)
Count of time taken to resolve a direct message.
azure.iot_edge.edge_hub.direct_method_duration_seconds.sum
(gauge)
Sum of time taken to resolve a direct message.
Shown as second
azure.iot_edge.edge_hub.direct_method_duration_seconds.quantile
(gauge)
Quantile of time taken to resolve a direct message.
Shown as second
azure.iot_edge.edge_hub.direct_methods_total
(count)
Total number of direct messages sent.
azure.iot_edge.edge_hub.queue_length
(gauge)
Current length of Edge Hub's queue for a given priority.
azure.iot_edge.edge_hub.messages_dropped_total
(count)
Total number of messages removed because of reason.
azure.iot_edge.edge_hub.messages_unack_total
(count)
Total number of messages unack because of storage failure.
azure.iot_edge.edge_hub.offline_count_total
(count)
Total number of times Edge Hub went offline.
azure.iot_edge.edge_hub.offline_duration_seconds.count
(gauge)
Count of time Edge Hub was offline.
azure.iot_edge.edge_hub.offline_duration_seconds.sum
(gauge)
Sum of time Edge Hub was offline.
Shown as second
azure.iot_edge.edge_hub.offline_duration_seconds.quantile
(gauge)
Quantile of time Edge Hub was offline.
Shown as second
azure.iot_edge.edge_hub.operation_retry_total
(count)
Total number of times Edge operations were retried.
azure.iot_edge.edge_hub.client_connect_failed_total
(count)
Total number of times clients failed to connect to Edge Hub.
azure.iot_edge.edge_agent.total_time_running_correctly_seconds
(gauge)
The amount of time the module module_name was specified in the deployment and was in the running state.
azure.iot_edge.edge_agent.total_time_expected_running_seconds
(gauge)
The amount of time the module module_name was specified in the deployment.
azure.iot_edge.edge_agent.module_start_total
(count)
Number of times the Edge Agent asked Docker to start the module module_name.
azure.iot_edge.edge_agent.module_stop_total
(count)
Number of times the Edge Agent asked Docker to stop the module module_name.
azure.iot_edge.edge_agent.command_latency_seconds.count
(gauge)
Count of how long it took for Docker to execute the given command. Possible commands are: create, update, remove, start, stop, restart.
azure.iot_edge.edge_agent.command_latency_seconds.sum
(gauge)
Sum of how long it took for Docker to execute the given command. Possible commands are: create, update, remove, start, stop, restart.
Shown as second
azure.iot_edge.edge_agent.command_latency_seconds.quantile
(gauge)
Quantile of how long it took for Docker to execute the given command. Possible commands are: create, update, remove, start, stop, restart.
Shown as second
azure.iot_edge.edge_agent.iothub_syncs_total
(count)
Total number of times the Edge Agent attempted to sync its twin with IoT Hub, both successful and unsuccessful. Includes both Edge Agent requesting a twin, and IoT Hub notifying of a twin update.
azure.iot_edge.edge_agent.unsuccessful_iothub_syncs_total
(count)
Total number of times the Edge Agent failed to sync its twin with IoT Hub.
azure.iot_edge.edge_agent.deployment_time_seconds.count
(gauge)
Count of amount of time it took to complete a new deployment after receiving a change.
azure.iot_edge.edge_agent.deployment_time_seconds.sum
(gauge)
Sum of amount of time it took to complete a new deployment after receiving a change.
Shown as second
azure.iot_edge.edge_agent.deployment_time_seconds.quantile
(gauge)
Quantile of amount of time it took to complete a new deployment after receiving a change.
Shown as second
azure.iot_edge.edge_agent.direct_method_invocations_count
(count)
Total number of times a built-in Edge Agent direct method is called, such as Ping or Restart.
azure.iot_edge.edge_agent.host_uptime_seconds
(gauge)
How long the host has been running.
Shown as second
azure.iot_edge.edge_agent.iotedged_uptime_seconds
(gauge)
How long iotedged has been running.
Shown as second
azure.iot_edge.edge_agent.available_disk_space_bytes
(gauge)
Amount of space left on the disk `disk_name.
Shown as byte
azure.iot_edge.edge_agent.total_disk_space_bytes
(gauge)
Size of the disk `disk_name.
Shown as byte
azure.iot_edge.edge_agent.used_memory_bytes
(gauge)
Amount of RAM used by all processes in module module_name.
Shown as byte
azure.iot_edge.edge_agent.total_memory_bytes
(gauge)
Total amount of RAM available to module module_name.
Shown as byte
azure.iot_edge.edge_agent.used_cpu_percent.count
(gauge)
Count of percent of CPU used by all processes in module module_name.
azure.iot_edge.edge_agent.used_cpu_percent.sum
(gauge)
Sum of percent of CPU used by all processes in module module_name.
Shown as percent
azure.iot_edge.edge_agent.used_cpu_percent.quantile
(gauge)
Quantile of percent of CPU used by all processes in module module_name.
Shown as percent
azure.iot_edge.edge_agent.created_pids_total
(gauge)
Total number of processes the module module_name has created.
azure.iot_edge.edge_agent.total_network_in_bytes
(count)
Total amount of bytes received from the network by module module_name.
Shown as byte
azure.iot_edge.edge_agent.total_network_out_bytes
(count)
Total amount of bytes sent to the network by module module_name.
Shown as byte
azure.iot_edge.edge_agent.total_disk_read_bytes
(count)
Total amount of bytes read from the disk by module module_name.
Shown as byte
azure.iot_edge.edge_agent.total_disk_write_bytes
(count)
Total amount of bytes written to the disk by module module_name.
Shown as byte

イベント

Azure IoT Edge には、イベントは含まれません。

サービスのチェック

azure.iot_edge.edge_agent.prometheus.health
Returns CRITICAL if the Agent is unable to reach the Edge Agent metrics Prometheus endpoint. Returns OK otherwise.
Statuses: ok, critical

azure.iot_edge.edge_hub.prometheus.health
Returns CRITICAL if the Agent is unable to reach the Edge Hub metrics Prometheus endpoint. Returns OK otherwise.
Statuses: ok, critical

トラブルシューティング

ご不明な点は、Datadog のサポートチームまでお問合せください。

その他の参考資料