IoT Agent

Overview

The Datadog IoT Agent is a version of the Agent optimized for monitoring IoT devices and embedded applications. Customers use the IoT Agent to monitor a wide variety of devices from digital displays to security devices running image detection algorithms.

Capabilities

The IoT Agent includes the following system checks. Configuration for IoT devices is identical to other types of hosts.

The IoT Agent also supports:

The IoT Agent does not include the Python interpreter and other integrations pre-packaged with the standard Agent. It also doesn’t support tracing for APM, live process monitoring, or Cloud Network Monitoring.

Setup

Requirements

The IoT Agent is available as DEB and RPM packages for Linux devices running on x64, arm64 (ARMv8), and ARMv7 architectures.

Resources

IoT devices are typically more resource constrained than cloud infrastructure hosts. The IoT Agent is built to have a minimal footprint and consume minimal network bandwidth.

Exact resource requirements depend on usage. Datadog found the following when testing the IoT Agent (v7.20) internally:

  • CPU: 0.5% (on a VM with 2 Intel Xeon VCPUs)
  • Memory: 36 MB
  • Network bandwidth: 237 bps up / 79 bps down
  • Disk: 63 MB

Installation

Automatic

To automatically download and install the correct IoT Agent for your operating system and chipset architecture, use the following command:

DD_API_KEY=<YOUR_DD_API_KEY> DD_SITE="" DD_AGENT_FLAVOR=datadog-iot-agent bash -c "$(curl -L https://install.datadoghq.com/scripts/install_script_agent7.sh)"

Manual

To manually install the IoT Agent on Debian-based operating systems, run the following commands:

  1. Update apt and install apt-transport-https to download through HTTPS and curl and gnupg to obtain the signing keys:

    sudo apt-get update
    sudo apt-get install apt-transport-https curl gnupg
    
  2. Set up the Datadog deb repo on your system and import Datadog’s apt keys:

    sudo sh -c "echo 'deb [signed-by=/usr/share/keyrings/datadog-archive-keyring.gpg] https://apt.datadoghq.com/ stable 7' > /etc/apt/sources.list.d/datadog.list"
    sudo touch /usr/share/keyrings/datadog-archive-keyring.gpg
    
    curl https://keys.datadoghq.com/DATADOG_APT_KEY_CURRENT.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
    curl https://keys.datadoghq.com/DATADOG_APT_KEY_06462314.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
    curl https://keys.datadoghq.com/DATADOG_APT_KEY_C0962C7D.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
    curl https://keys.datadoghq.com/DATADOG_APT_KEY_F14F620E.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
    curl https://keys.datadoghq.com/DATADOG_APT_KEY_382E94DE.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
    
  3. If running Ubuntu 14 or earlier or Debian 8 or earlier, copy the keyring to /etc/apt/trusted.gpg.d:

    sudo cp /usr/share/keyrings/datadog-archive-keyring.gpg /etc/apt/trusted.gpg.d
    
  4. Update apt and install the IoT Agent:

    sudo apt-get update
    sudo apt-get install datadog-iot-agent datadog-signing-keys
    
  5. Copy the example config and plug in your API key:

    DD_API_KEY=<YOUR_DD_API_KEY> ; sudo sh -c "sed 's/api_key:.*/api_key:$DD_API_KEY/' /etc/datadog-agent/datadog.yaml.example > /etc/datadog-agent/datadog.yaml"
    
  6. Set your Datadog site to . Defaults to datadoghq.com.

    sudo sh -c "sed 's/# site:.*/site: <YOUR_DD_SITE>/' /etc/datadog-agent/datadog.yaml > /etc/datadog-agent/datadog.yaml.new && mv /etc/datadog-agent/datadog.yaml.new /etc/datadog-agent/datadog.yaml"
    
  7. Start the IoT Agent:

    sudo systemctl restart datadog-agent.service
    

To manually install the IoT Agent on RPM-based operating systems, run the following commands:

  1. Set up Datadog’s Yum repo on your system by creating /etc/yum.repos.d/datadog.repo with the contents:

    [datadog]
    name = Datadog, Inc.
    baseurl = https://yum.datadoghq.com/stable/7/<HOST_ARCHITECTURE>
    enabled=1
    gpgcheck=1
    repo_gpgcheck=1
    gpgkey=https://keys.datadoghq.com/DATADOG_RPM_KEY_CURRENT.public
           https://keys.datadoghq.com/DATADOG_RPM_KEY_4F09D16B.public
           https://keys.datadoghq.com/DATADOG_RPM_KEY_B01082D3.public
           https://keys.datadoghq.com/DATADOG_RPM_KEY_FD4BF915.public
           https://keys.datadoghq.com/DATADOG_RPM_KEY_E09422B3.public
    

    Note: due to a bug in dnf, use repo_gpgcheck=0 instead of repo_gpgcheck=1 on RHEL/CentOS 8.1.

    The baseurl is dependent on your host OS:

    • x86_64 - https://yum.datadoghq.com/stable/7/x86_64/
    • arm64 - https://yum.datadoghq.com/stable/7/aarch64/
    • ARMv7 - https://yum.datadoghq.com/stable/7/armv7hl/
  2. Update your local yum repo and install the Agent:

    sudo yum makecache
    sudo yum install datadog-iot-agent
    
  3. Copy the example config and plug in your API key:

    DD_API_KEY=<YOUR_DD_API_KEY> ; sudo sh -c "sed 's/api_key:.*/api_key:$DD_API_KEY/' /etc/datadog-agent/datadog.yaml.example > /etc/datadog-agent/datadog.yaml"
    
  4. Set your Datadog site to . Defaults to datadoghq.com.

    sudo sh -c "sed 's/# site:.*/site: <YOUR_DD_SITE>/' /etc/datadog-agent/datadog.yaml > /etc/datadog-agent/datadog.yaml.new && mv /etc/datadog-agent/datadog.yaml.new /etc/datadog-agent/datadog.yaml"
    
  5. Start the IoT Agent:

    sudo systemctl restart datadog-agent.service
    

CLI

The IoT Agent supports the same CLI commands as the standard Agent.

Uninstall

sudo apt-get remove datadog-iot-agent -y

This command removes the Agent, but does not remove:

  • The datadog.yaml configuration file
  • User-created files in the /etc/datadog-agent configuration folder
  • User-created files in the /opt/datadog-agent folder
  • The dd-agent user

If you also want to remove those elements, use this command instead:

sudo apt-get remove --purge datadog-iot-agent -y

Further Reading

Additional helpful documentation, links, and articles: