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.

Five things to decide before installation, and what happens if you install without deciding them
Item to decideOptionsIf 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 variableNothing can be sent without the key. With another organization's key, data goes to that organization
Installation methodUI-generated script / package manager / AnsibleUpdate 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 advanceIf added afterward, data filtering splits between before and after they were added
Proxy (proxy)Confirm whether outbound HTTPS can get out directlyThe Agent starts but nothing arrives
Source: the configuration items listed under Configure the Agent in Linux (Agent), rearranged from the standpoint of decisions

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)).

Choosing among the three installation routes (within the scope of the official documentation as of September 2026)
RouteSuitable host countHow the key and site are passedLater updates
UI-generated script1 to a few hostsGenerated according to selections in the UIPackage manager or Fleet Automation
Package manager (yum / apt-get / zypper)Environments with existing distribution rulesDistribute datadog.yaml yourselfSame as the OS update procedure
Ansible role datadog.dd.agentDozens of hosts or moreVariable datadog_api_keyRe-run the playbook
Source: Linux (Agent) (Install / Uninstall the Agent) and Ansible (Agent) (Deploying the Agent)

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.

Six patterns of getting stuck right after installation, looked up by symptom
SymptomCauseWhere to check
The host does not appear on the screen even after waiting several minutesOutbound traffic can only get out through a proxyproxy in datadog.yaml, and whether the host can reach outside over HTTPS
Same as aboveThe API key differs from the organization'sCross-check the API Keys screen in Organization Settings against api_key
Same as aboveThe site differs from the organization'sCross-check the beginning of the login URL against site
A value was fixed but nothing changesNot restarted after editing the YAMLsudo systemctl restart datadog-agent
Values for the same host appear doubledTwo Agents are runningKeep only one Agent per host
Stops right after starting (when run in a container)Hostname detection failedThe official hostname troubleshooting
Source: the seven-item checklist in Agent Troubleshooting, reorganized by symptom (commands from Commands in Linux (Agent))

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 status

In 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.started arrives 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
Source: the descriptions in Agent Commands and Getting Started with the Agent (Finding metrics in the Datadog UI), arranged in verification order

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.yaml to 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_enabled to 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
Source: Agent Configuration Files (Check configuration files) and Getting Started with the Agent (Additional configuration options)

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.

References

Share