> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Datadog Agents

> Overview of Datadog Agents, their deployment on hosts and Kubernetes, telemetry collection, installation, integrations, authentication, and troubleshooting

In this lesson we explain what Datadog agents are, where they run, and how they collect telemetry (metrics, traces, and logs) from your environment.

An agent is a lightweight software component that runs on a host whose telemetry you want to collect. A host can be a virtual machine (server), a Kubernetes worker node, or a standalone Linux server. The agent runs on that host, gathers metrics/traces/logs and forwards them to Datadog for processing and visualization.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/-k1dojK2a15_2EYD/images/Migrating-to-Datadog/Datadog-Basics/Datadog-Agents/datadog-agent-deployment-kubernetes-diagram.jpg?fit=max&auto=format&n=-k1dojK2a15_2EYD&q=85&s=8dfd416e593f8670e531a6f26e9cbd9e" alt="The image illustrates a diagram showing the deployment of a Datadog Agent on a host and within a Kubernetes cluster, with worker nodes." width="1920" height="1080" data-path="images/Migrating-to-Datadog/Datadog-Basics/Datadog-Agents/datadog-agent-deployment-kubernetes-diagram.jpg" />
</Frame>

## Agent compatibility and integrations

Choose the agent variant that matches the environment where it will run. For example, use the Kubernetes DaemonSet-based Datadog Agent for an EKS cluster (to collect node- and pod-level telemetry) rather than a host-only Linux agent image that isn’t optimized for Kubernetes.

Datadog provides built-in agent integrations for many common platforms and distributions such as Kubernetes, Ubuntu, Docker, Fedora, Red Hat Enterprise Linux, Debian, and SUSE. These integrations simplify setup and enable collection of platform-specific metrics and metadata.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/-k1dojK2a15_2EYD/images/Migrating-to-Datadog/Datadog-Basics/Datadog-Agents/host-integrations-datadog-agent-logos.jpg?fit=max&auto=format&n=-k1dojK2a15_2EYD&q=85&s=e5b3b24b85ca7e1aba3be8ebfc0413c4" alt="The image lists host integrations with Datadog Agent, featuring logos for Kubernetes, Ubuntu, Docker, Fedora, Red Hat, Debian, and SUSE." width="1920" height="1080" data-path="images/Migrating-to-Datadog/Datadog-Basics/Datadog-Agents/host-integrations-datadog-agent-logos.jpg" />
</Frame>

## Prerequisites: API key and authentication

Before installing or configuring an agent you must generate a Datadog API key in the Datadog console. The agent uses this key to authenticate requests to the Datadog backend; telemetry data is accepted only after successful authentication.

<Callout icon="lightbulb" color="#1CB2FE">
  Keep your Datadog API key secret. Do not commit it to source control; store it in a secrets manager or environment variables instead.
</Callout>

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/-k1dojK2a15_2EYD/images/Migrating-to-Datadog/Datadog-Basics/Datadog-Agents/datadog-agent-installation-flowchart.jpg?fit=max&auto=format&n=-k1dojK2a15_2EYD&q=85&s=6d040fe364908ec519d857727210cdee" alt="The image shows a flowchart illustrating the Datadog Agent installation and authentication process. It includes elements labeled &#x22;Sources,&#x22; &#x22;Agent,&#x22; and &#x22;Datadog Site,&#x22; with arrows indicating the flow of information." width="1920" height="1080" data-path="images/Migrating-to-Datadog/Datadog-Basics/Datadog-Agents/datadog-agent-installation-flowchart.jpg" />
</Frame>

## Installing the agent on Linux hosts

On Linux, select the installation instructions that match your distribution (for example, Ubuntu or RHEL) and follow the distro-specific steps in the Datadog docs. After installing and configuring the agent (including setting the API key and enabling any integrations), the agent starts sending telemetry to Datadog.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/-k1dojK2a15_2EYD/images/Migrating-to-Datadog/Datadog-Basics/Datadog-Agents/datadog-agent-linux-installation-steps.jpg?fit=max&auto=format&n=-k1dojK2a15_2EYD&q=85&s=6e75f2e0f8b34199dca3f0f1d826601f" alt="The image outlines steps for installing the Datadog Agent on a Linux host, including selecting a Linux distribution, following installation steps, and running the agent to send data to Datadog." width="1920" height="1080" data-path="images/Migrating-to-Datadog/Datadog-Basics/Datadog-Agents/datadog-agent-linux-installation-steps.jpg" />
</Frame>

For detailed distro-specific installation instructions, see the Datadog Agent documentation: [https://docs.datadoghq.com/agent/](https://docs.datadoghq.com/agent/)

## Datadog Agents in Kubernetes

In Kubernetes environments there are two complementary agent types:

| Agent Type                 | Runs As                      | Primary Responsibility                                      | Typical Configuration                                    |
| -------------------------- | ---------------------------- | ----------------------------------------------------------- | -------------------------------------------------------- |
| Datadog Cluster Agent      | Deployment                   | Cluster-wide telemetry, coordination, and API aggregation   | Set replicas appropriately for cluster size and workload |
| Datadog Agent (Node Agent) | DaemonSet (one pod per node) | Node- and application-level telemetry for pods on each node | Deploy Cluster Agent + Node Agent for full coverage      |

Each agent has distinct responsibilities; configure both so you get complete telemetry coverage (cluster-level and node/pod-level).

<Callout icon="warning" color="#FF6B6B">
  Ensure the Cluster Agent has sufficient replicas for your cluster size and telemetry volume. Underprovisioning can overload instances; overprovisioning wastes resources. Monitor resource usage and scale replicas accordingly.
</Callout>

## Troubleshooting and debugging tools

Datadog agents include built-in debugging tools you can run inside the agent container (or on the host) to inspect configuration, check status, validate connectivity, and create diagnostic bundles for Datadog Support.

Common steps:

* Exec into a Datadog agent container (adjust namespace and selector to match your deployment):

```bash theme={null}
kubectl -n datadog exec -it $(kubectl -n datadog get pods -l app=datadog -o jsonpath='{.items[0].metadata.name}') -- bash
```

* Check agent status:

```bash theme={null}
datadog-agent status
```

* Generate a diagnostic bundle (flare) for Datadog support:

```bash theme={null}
datadog-agent flare
```

These commands can quickly surface configuration issues, integration failures, and connectivity problems.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/-k1dojK2a15_2EYD/images/Migrating-to-Datadog/Datadog-Basics/Datadog-Agents/datadog-agent-internal-functioning-diagram.jpg?fit=max&auto=format&n=-k1dojK2a15_2EYD&q=85&s=f9d4aec8664ab6d79b9358cab5842870" alt="The image describes the internal functioning of a Datadog Agent with two steps: running commands on the agent, and verifying its configuration and status." width="1920" height="1080" data-path="images/Migrating-to-Datadog/Datadog-Basics/Datadog-Agents/datadog-agent-internal-functioning-diagram.jpg" />
</Frame>

## Summary and next steps

* Datadog Agents run on hosts or in Kubernetes to collect metrics, traces, and logs, and forward them to Datadog.
* Choose the correct agent variant for your environment (Linux distro vs Kubernetes DaemonSet/Deployment).
* Keep your API key secure and follow Datadog’s distro-specific installation steps.
* Use the built-in debugging commands to validate agent status and create diagnostic bundles when needed.

References and further reading:

* Datadog Agent documentation: [https://docs.datadoghq.com/agent/](https://docs.datadoghq.com/agent/)
* Datadog console (API keys): [https://app.datadoghq.com/account/settings#api](https://app.datadoghq.com/account/settings#api)

That’s it for this lesson — hope you found it useful.

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/migrating-to-datadog/module/10421186-d141-4fde-9847-73ea4e4e675a/lesson/bfa65100-db9e-44de-90c3-9968676e7a86" />
</CardGroup>
