Installing the Datadog Agent on Linux - Five Things to Decide First and Where You Get Stuck
This article organizes the five things to decide before putting the Datadog Agent on a Linux server (destination site / how to pass the API key / installation method / tags / proxy) and the order of checks for the six typical patterns of getting stuck right after installation. The procedure itself is left to the official docs; the focus is on what to decide and where to look to be able to say "it is running."
Is a One-Liner Install Acceptable? - Five Things to Decide First
Installing the Datadog Agent on a Linux server is itself finished, as the official documentation shows, by running the script generated in the UI once on the host (as of September 2026; source: Linux (Agent)). Even so, there are five items you want to decide before installing on a production host, and every later fix brings an Agent restart and the hassle of data looking different before and after the fix.
| Item to decide | Options | If installed without deciding |
|---|---|---|
Destination site (site) | Match your organization's login URL (datadoghq.com / datadoghq.eu / ap1.datadoghq.com, etc.) | Data is sent to a different site, and the host does not appear on your screen |
How to pass the API key (api_key) | Write it in datadog.yaml / write it from a configuration management tool's variable | Nothing can be sent without the key. With another organization's key, data goes to that organization |
| Installation method | UI-generated script / package manager / Ansible | Update and removal procedures do not line up as the host count grows |
Host tags (tags) | Decide key:value pairs such as team and env in advance | If added afterward, data filtering splits between before and after they were added |
Proxy (proxy) | Confirm whether outbound HTTPS can get out directly | The Agent starts but nothing arrives |
The destination site and API key are items that "do not work unless decided"; the remaining three are items that "cause trouble later unless decided." The meaning of each key is left to the datadog.yaml glossary page, and what it means to choose AP1, located in Japan, is left to the Datadog Site glossary page; this article focuses on the options and the places where you get stuck. For the decision of whether to adopt at all, read the Adoption Checklist first.
Generated Script, Package Manager, or Ansible - Which One to Install With
The official procedure as of September 2026 is to run a script generated by following the in-app Fleet Automation screen on the target host (source: Linux (Agent)). For one to a few hosts, there is nothing to hesitate over here. What is worth knowing is that even when installed through this route, the actual artifact is each distribution's datadog-agent package, and the official removal procedure is likewise shown for the three families yum / apt-get / zypper. For distributing to dozens of hosts or more, there is a route that passes the variable datadog_api_key to the Ansible collection role datadog.dd.agent and calls it from a playbook, with Ansible v2.10 or later as the prerequisite (source: Ansible (Agent)).
| Route | Suitable host count | How the key and site are passed | Later updates |
|---|---|---|---|
| UI-generated script | 1 to a few hosts | Generated according to selections in the UI | Package manager or Fleet Automation |
| Package manager (yum / apt-get / zypper) | Environments with existing distribution rules | Distribute datadog.yaml yourself | Same as the OS update procedure |
Ansible role datadog.dd.agent | Dozens of hosts or more | Variable datadog_api_key | Re-run the playbook |
Whichever route you take, Fleet Automation handles tracking and remote updates after installation. Choosing the route by "how to keep the second and later runs consistent" rather than "how to install the first time" reduces backtracking.
Where to Write the Key and Site
The configuration of an Agent installed on a host is gathered in a single YAML file, /etc/datadog-agent/datadog.yaml (as of September 2026; source: Agent Configuration Files). The official Linux page lists api_key / site / proxy as the connection information to write here, along with default tags and the log level. The minimal form is about this much.
api_key: <YOUR_API_KEY>
site: ap1.datadoghq.com
tags:
- team:infra
- <TAG_KEY>:<TAG_VALUE>A sample with comments for every key, /etc/datadog-agent/datadog.yaml.example, is in the same location, and key names can be copied from it. A restart is required after editing. Issuing keys and their permissions are left to the API Key glossary page, and the meaning of the basic keys to the datadog.yaml glossary page.
Six Patterns of Getting Stuck Right After Installation, and the Order of Checks
The official troubleshooting guide urges you to start with seven self-questions before running the status command (as of September 2026; source: Agent Troubleshooting). Rearranged into a form you can look up by symptom, the stuck points right after installation fit into the following six patterns.
| Symptom | Cause | Where to check |
|---|---|---|
| The host does not appear on the screen even after waiting several minutes | Outbound traffic can only get out through a proxy | proxy in datadog.yaml, and whether the host can reach outside over HTTPS |
| Same as above | The API key differs from the organization's | Cross-check the API Keys screen in Organization Settings against api_key |
| Same as above | The site differs from the organization's | Cross-check the beginning of the login URL against site |
| A value was fixed but nothing changes | Not restarted after editing the YAML | sudo systemctl restart datadog-agent |
| Values for the same host appear doubled | Two Agents are running | Keep only one Agent per host |
| Stops right after starting (when run in a container) | Hostname detection failed | The official hostname troubleshooting |
The top three have the same symptom despite different causes, so the quick path is to eliminate them in the order proxy, key, site. In a state where you cannot get outside, neither the key nor the site can be verified. Only once you can answer yes to all of them does datadog-agent status come into play, and if you still cannot tell, hand diagnostic information to support with a Flare.
What Has to Be Visible to Say "It Is Running"
Verification has three stages. The first stage is whether the service is alive or dead; on Linux, look at sudo systemctl status datadog-agent. The second stage is the Agent's self-report; the following command brings up the status page (as of September 2026; source: Agent Commands).
sudo datadog-agent statusIn the Running Checks section, correctly configured checks are listed with no warnings or errors, together with counts such as Total Runs and Metric Samples. The third stage is the screen on the Datadog side: search for datadog.agent.started or datadog.agent.running in the Metrics Summary, and if you can see your host's value, the path through to sending is working (source: Getting Started with the Agent).
- 1. Service - The process is up in
systemctl status - 2. The Agent's self-report - No warnings / errors under Running Checks in
datadog-agent status - 3. Datadog side -
datadog.agent.startedarrives in the Metrics Summary with the default host and version tags attached - 4. Finishing touch - Your host appears in the Infrastructure host list and can be filtered by the tags you decided on
Once you pass the fourth stage, the host is treated the same as any other host on the Infrastructure Monitoring screens.
Tags and Load - Two Things That Take Effect After Installation
Host tags written under tags in datadog.yaml are attached to all metrics / events / logs / traces / service checks emitted from that host (as of September 2026; source: Getting Started with the Agent). They are merged with tags from the environment variable DD_EXTRA_TAGS, so you can split them into common tags in the file and individual tags in distribution-time variables. A restart is needed for them to take effect, and if you can see tags other than host / version in the datadog.agent.started panel, it succeeded. The reason to decide them first is that tags are the foundation of filtering (for design, see Tag and Tagging). The official docs also give numbers as a load guideline: CPU usage in the early stage of adoption averages around 0.08%, and disk is roughly 880MB to 1.3GB (source: Getting Started with the Agent). These increase when you add logs or APM, so read them as the floor for the bare state.
Once the Agent Is Running, What to Touch Next
Once the host is visible, the next thing to touch is /etc/datadog-agent/conf.d/. There is an <INTEGRATION>.d/ directory for each integration, and renaming the conf.yaml.example inside it to conf.yaml and filling it in enables that check (as of September 2026; source: Agent Configuration Files). For what can be integrated, see the Integrations explanation. The other fork is logs: the Agent does not collect logs / traces / processes by default, and logs_enabled is installed as false (source: Getting Started with the Agent). Decide how to collect them after getting the overall picture from the Log Management explanation.
- 1. Write
conf.d/<INTEGRATION>.d/conf.yamlto enable the integration's check - 2. See that the integration is listed without warnings under Running Checks in
datadog-agent status - 3. Before setting
logs_enabledto true, decide which files and how many GB you will send - 4. As the host count grows, look at version and configuration spread in Fleet Automation
Rather than feeling done after the one-line install, calling the installation complete only once you have confirmed in status that the five decided points are reflected in the configuration is the line that saves trouble later.