Skip to content

Latest commit

 

History

History

azure_iot_edge

Agent Check: Azure IoT Edge

Overview

Azure IoT Edge is a fully managed service to deploy Cloud workloads to run on Internet of Things (IoT) Edge devices using standard containers.

Use the Datadog-Azure IoT Edge integration to collect metrics and health status from IoT Edge devices.

Note: This integration requires IoT Edge runtime version 1.0.10 or above.

Setup

Follow the instructions below to install and configure this check for an IoT Edge device running on a device host.

Installation

The Azure IoT Edge check is included in the Datadog Agent package.

No additional installation is needed on your device.

Configuration

Configure the IoT Edge device so that the Agent runs as a custom module. Follow the Microsoft documentation on deploying Azure IoT Edge modules for information on installing and working with custom modules for Azure IoT Edge.

Follow the steps below to configure the IoT Edge device, runtime modules, and the Datadog Agent to start collecting IoT Edge metrics.

  1. Configure the Edge Agent runtime module as follows:

    • Image version must be 1.0.10 or above.

    • Under "Create Options", add the following Labels. Edit the com.datadoghq.ad.instances label as appropriate. See the sample azure_iot_edge.d/conf.yaml for all available configuration options. See the documentation on Docker Integrations Autodiscovery for more information on labels-based integration configuration.

      "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. Configure the Edge Hub runtime module as follows:

    • Image version must be 1.0.10 or above.
  3. Install and configure the Datadog Agent as a custom module:

    • Set the module name. For example: datadog-agent.

    • Set the Agent image URI. For example: datadog/agent:7.

    • Under "Environment Variables", configure your DD_API_KEY. You may also set extra Agent configuration here (see Agent Environment Variables).

    • Under "Container Create Options", enter the following configuration based on your device OS. Note: NetworkId must correspond to the network name set in the device config.yaml file.

      • 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"]
            }
        }
    • Save the Datadog Agent custom module.

  4. Save and deploy changes to your device configuration.

Log collection

  1. Collecting logs is disabled by default in the Datadog Agent, enable it by configuring your Datadog Agent custom module:

    • Under "Environment Variables", set the DD_LOGS_ENABLED environment variable:

      DD_LOGS_ENABLED: true
  2. Configure the Edge Agent and Edge Hub modules: under "Create Options", add the following label:

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

    Change the service based on your environment.

    Repeat this operation for any custom modules you'd like to collect logs for.

  3. Save and deploy changes to your device configuration.

Validation

Once the Agent has been deployed to the device, run the Agent's status subcommand and look for azure_iot_edge under the Checks section.

Data Collected

Metrics

See metadata.csv for a list of metrics provided by this check.

Events

Azure IoT Edge does not include any events.

Service Checks

See service_checks.json for a list of service checks provided by this integration.

Troubleshooting

Need help? Contact Datadog support.

Further Reading