Linux vs. Windows: Datadog Agent Installation
Learn how to install the Datadog Agent on Linux and Windows, covering installation steps, configuration, and troubleshooting tips.

Want to install the Datadog Agent but unsure where to start? Here’s the short answer:
- Linux: Install via command-line tools using package managers.
- Windows: Use an MSI installer with GUI or CLI options.
Both platforms support over 250 integrations, monitor system resources (CPU, memory, logs), and require configuration for network and permissions.
Quick Comparison
Feature | Linux | Windows |
---|---|---|
Installation | Command-line (package manager) | GUI or CLI (MSI installer) |
Permissions Needed | Root/sudo access | Admin privileges |
Config File Location | /etc/datadog-agent/datadog.yaml |
C:\ProgramData\Datadog\datadog.yaml |
Service Control | systemctl or service |
GUI or CLI commands |
Status Check Command | sudo datadog-agent status |
agent.exe status |
Key Tip: Double-check API keys and network settings before installation to avoid issues.
Read on for step-by-step installation guides and troubleshooting tips for both platforms!
How to register for Datadog - Monitoring as a service & install agents on Windows and Linux machines
Before You Install
Before diving into the installation process, make sure your system meets the necessary prerequisites.
Hardware and Software Requirements
The Agent is designed to be lightweight, consuming minimal resources. To ensure smooth operation, your system should meet the following baseline requirements:
Requirement | Linux | Windows |
---|---|---|
CPU Usage | ~0.08% baseline | ~0.08% baseline |
Operating System | Most modern distributions | Windows Server 2008r2 or later |
Memory | 256MB minimum | 256MB minimum |
Disk Space | 200MB recommended | 200MB recommended |
Access and Security Setup
The Agent requires specific permissions depending on your operating system.
For Windows:
- Administrative privileges are needed for the initial installation.
- A service account with local system permissions is required.
- Ensure read access to the directories of monitored applications.
- Write permissions are necessary for collecting logs.
For Linux:
- Root or sudo access is required during installation.
- Verify appropriate file permissions for log directories.
- System service privileges are essential for continuous operation.
Network Settings
Proper network configuration is key to maintaining communication between your Agent and Datadog's servers:
- Allow outbound HTTPS traffic (TCP port 443) to Datadog's intake servers. If needed, configure proxies accordingly.
- Both HTTP and HTTPS proxies are supported.
Once you've confirmed these prerequisites, you're ready to move on to the step-by-step installation process.
Installation Steps
Here’s how to install the Datadog Agent on both Linux and Windows systems. Follow the platform-specific instructions below to ensure a smooth setup.
Linux Installation Guide
The installation process may differ depending on your Linux distribution. Below are the steps for Ubuntu/Debian systems:
1. Add the Repository
Run the following command to add the Datadog repository and set your API key:
sudo apt update
DD_API_KEY=YOUR_API_KEY DD_SITE="datadoghq.com" bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script.sh)"
2. Install the Agent
Install the Datadog Agent using the package manager:
sudo apt-get install datadog-agent
3. Start the Service
Start the Datadog Agent service with this command:
sudo systemctl start datadog-agent
If you’re using a different Linux distribution, you may need to adjust these commands accordingly. Once installed, the Agent typically begins collecting metrics within 15 to 20 seconds.
Windows Installation Guide
For Windows, the setup involves downloading an MSI installer and running it via the command line:
1. Download the MSI Package
Head to the official Datadog Agent download page and grab the latest 64-bit MSI installer.
2. Install via Command Line
Run the following command in an elevated PowerShell or Command Prompt to install the Agent:
msiexec /i datadog-agent-latest.amd64.msi /qn APIKEY="YOUR_API_KEY"
Verifying Installation
After installation, confirm that the Agent is running on your system. Use the appropriate command for your platform:
Platform | Status Check Command | Expected Output |
---|---|---|
Linux | sudo datadog-agent status |
Agent running |
Windows | & "C:\Program Files\Datadog\Datadog Agent\bin\agent.exe" status |
Agent running |
Pro Tips for a Smooth Installation
- Ensure your system has proper network connectivity before starting the installation process.
- Double-check that your API key is correct and active.
- On Linux, confirm that your system has the necessary permissions to access the repository.
- For Windows, always run installation commands in an elevated (admin) prompt.
These steps should help you get the Datadog Agent up and running efficiently on your system.
Setup and Configuration
Here's how to configure the Agent for smooth performance on both Linux and Windows systems.
Linux Config Files
On Linux, the Agent relies on a YAML configuration file located at /etc/datadog-agent/datadog.yaml
. You'll need to manually update this file to customize settings.
Step 1: Back up and edit the file
Before making changes, create a backup to avoid losing the original configuration:
sudo cp /etc/datadog-agent/datadog.yaml /etc/datadog-agent/datadog.yaml.bak
sudo nano /etc/datadog-agent/datadog.yaml
Step 2: Update key parameters
Add or modify the following lines in the YAML file:
api_key: YOUR_API_KEY
site: datadoghq.com
logs_enabled: true
process_config:
enabled: true
Replace YOUR_API_KEY
with your actual API key.
Step 3: Apply the changes
Restart the Agent to load the updated configuration:
sudo systemctl restart datadog-agent
Windows Settings
For Windows, the configuration process is slightly different. The main config file is located at C:\ProgramData\Datadog\datadog.yaml
. You can configure the Agent through the GUI or by using CLI commands.
Accessing the GUI
Launch the Agent's GUI with this command:
& "C:\Program Files\Datadog\Datadog Agent\bin\agent.exe" launch-gui
Using CLI Commands
The CLI provides several useful commands for managing and troubleshooting the Agent. Here’s a quick reference:
Command | Action | Example |
---|---|---|
check |
Run specific checks | agent.exe check disk |
diagnose |
Test connectivity | agent.exe diagnose |
status |
View agent status | agent.exe status |
restart-service |
Restart the Agent | agent.exe restart-service |
Best Practices for Configuration
- Always validate your changes using the
status
command to ensure everything is working as expected. - Use automation tools like Ansible or Chef to streamline and standardize configurations across multiple systems.
- For non-Kubernetes environments, consider pre-configured images with OpenTelemetry-compatible exporters to simplify deployment.
- Enable telemetry and instrumentation in all deployments to improve observability.
"The Datadog Agent is a lightweight, open-source software that runs on hosts to collect metrics and logs, send data to Datadog, and provide real-time visibility into infrastructure performance".
Pro Tip: Managing multiple Agents across platforms? Use configuration management tools to maintain uniformity and minimize manual errors. Remember, any configuration changes require an Agent restart to take effect.
Testing and Fixes
This section explains how to verify and troubleshoot the Datadog Agent on both Linux and Windows systems. After setting up the Agent, you can confirm its functionality and address any problems using the platform-specific steps outlined below.
Linux Status Checks
Agent Status Check
To verify the Agent's status, use one of the following commands:
sudo service datadog-agent status
# or
sudo systemctl status datadog-agent
Log Analysis
Check the logs stored in the /var/log/datadog
directory. Look out for:
- Connection errors
- Authentication issues
- Resource limitations
Server Connectivity
Run the following command to ensure the Agent can connect to the Datadog servers:
sudo datadog-agent info
Common Linux Issue | Solution |
---|---|
Package Cache Problems | Remove the cached InRelease file and update the apt cache. |
Permission Errors | Check for proper sudo access and file permissions. |
Network Connectivity | Verify that ports 443 and 8125 are open in the firewall. |
These checks ensure the Agent is functioning properly on Linux, providing a foundation for similar troubleshooting steps on Windows.
Windows Status Checks
For Windows systems, the troubleshooting process follows a similar approach, with some platform-specific adjustments.
PowerShell Verification
Check the Agent's status using this PowerShell command:
& "$env:ProgramFiles\Datadog\Datadog Agent\bin\agent.exe" status
Service Status
To confirm the Agent's service is running:
- Open the Services application.
- Find the "Datadog Agent" service.
- Ensure its status is set to "Running."
Access Rights
If you suspect access issues, use this PowerShell command to check permissions:
& "$env:ProgramFiles\Datadog\Datadog Agent\bin\agent.exe" check windows_service
Common Fixes
If the service isn't functioning as expected, try the following:
-
Access Verification
Run the status check from an elevated PowerShell prompt (Run as Administrator). -
Configuration Check
Ensure the configuration file inC:\ProgramData\Datadog
includes the following line:enable_windows_performance_counters: true
-
Service Restart
Restart the Datadog Agent service using these commands:net stop datadogagent && net start datadogagent
Pro Tip: If you're troubleshooting Windows installations in mixed Linux and Windows Kubernetes clusters, ensure the process-agent
container correctly mounts the auth-token
volume. This helps prevent authentication errors.
System Impact and Growth
System Resources
Keeping an eye on the Agent's resource usage is essential to gauge how it affects your servers. Resource consumption can vary significantly between Linux and Windows systems, so understanding these patterns is key.
CPU Usage Patterns
In Kubernetes environments, the resource demands of different components can vary. Here’s a quick breakdown:
Component | Typical CPU Usage | Notes |
---|---|---|
Standard Agent Daemons | 53m CPU | Baseline usage for core functions |
DogStatsD Pods | Up to 380m CPU | Higher usage during metric collection |
Kube-State-Metrics | Variable | Can spike during intensive checks |
For instance, standard Agent daemons typically consume around 53m CPU, while DogStatsD pods may require up to 380m CPU during heavy metric collection tasks.
Memory Management
Memory usage metrics can differ depending on the operating system due to variations in how memory is allocated. For example, Datadog previously reported both used and cached memory, which led to inflated metrics.
Here’s how memory usage typically breaks down:
- Actual Usage: Resident Set Size (RSS) memory usually accounts for around 15% of total memory. For a 4 GB container, this is roughly 650 MB.
- Reported Usage: Metrics might display up to 99% usage, even when actual CPU utilization hovers around just 2%.
To get a clear picture on Linux systems, check /proc/meminfo
for detailed metrics like MemFree, MemAvailable, and Cached memory. These details can help you make informed decisions about scaling as your monitoring needs increase.
Expanding Monitoring Coverage
Once you've nailed down the configuration basics, it's time to broaden your monitoring scope. Enabling more comprehensive system metrics ensures you’re making the most of your resources as your monitoring expands.
Scaling Best Practices
-
Enable System Metrics Collection
Make sure yourdatadog.yaml
file is set up to collect system metrics by including the following line:collect_system_metrics: true
This simple configuration step can provide deeper insights into your system's performance and help you optimize resource allocation as your monitoring grows.
Summary
Here’s a quick recap of the key differences in managing the Datadog Agent on Linux versus Windows, based on the installation and configuration steps discussed earlier.
Command-Line vs. GUI Management
On Windows, you can manage the Datadog Agent using either the command-line interface (CLI) or the graphical Datadog Agent Manager App. In contrast, Linux relies entirely on command-line tools.
Management Capabilities
The management approaches differ between the two platforms, as shown below:
Operation Type | Windows | Linux |
---|---|---|
Configuration | GUI or CLI-based editing | Direct file editing |
Service Control | Agent Manager or CLI commands | systemctl /service commands |
Monitoring | Integrated GUI/CLI tools | Command-line utilities |
Configuration Methods
Both platforms use YAML-based configuration files. Windows adds the convenience of a GUI-based configuration through the Agent Manager, while Linux sticks to its command-line roots, requiring manual file editing.
These differences highlight the contrasting management styles of Windows and Linux while ensuring both platforms deliver the same robust monitoring capabilities through the Datadog Agent.
FAQs
What are the key differences in permissions needed to install the Datadog Agent on Linux and Windows?
Installing the Datadog Agent on Linux requires either root access or sudo privileges to execute installation commands and modify system settings. On Windows, administrative privileges are also necessary, but there's an added recommendation: set up a dedicated user account specifically for running the Agent. This account, created during installation, is configured with restricted permissions to enhance security.
While both Linux and Windows require elevated permissions, their approaches differ. Linux relies on system-wide administrative access, while Windows prioritizes isolating the Agent's activities through a dedicated, limited-access user account. These variations reflect the distinct security practices of each operating system.
How do I configure my network settings so the Datadog Agent can connect to Datadog's servers?
To make sure the Datadog Agent connects seamlessly to Datadog's servers, follow these steps:
- Check port access: Confirm that outbound traffic on port 443 is allowed. This port handles secure HTTPS communication.
- Update firewall rules: Adjust your firewall to allow traffic to Datadog's regional endpoints and IP ranges. You can find the specific details in the Datadog documentation.
- Configure a proxy if required: If your network relies on an HTTP/HTTPS proxy, update the Agent's configuration file to route traffic through the proxy.
- Enable SSL for security: Verify that SSL is turned on to ensure all communication happens over encrypted connections.
By taking these steps, you’ll ensure the Datadog Agent communicates effectively with Datadog's servers, keeping your monitoring system running smoothly.
What should I do if the Datadog Agent isn’t connecting or showing the correct service status after installation?
If the Datadog Agent isn’t connecting or its service status seems off after installation, here are a few steps you can take to troubleshoot:
- Check the Agent's status: Run
datadog-agent status
to get a detailed report on the Agent's health and any potential errors. - Look at the logs: Open the log file located at
/var/log/datadog/agent.log
to spot warnings or error messages that might explain the problem. - Test network connectivity: Make sure the server can reach Datadog’s API endpoints. Use tools like
ping
orcurl
to test access toapi.datadoghq.com
. - Review the configuration: Open your
datadog.yaml
file and double-check the API key and any proxy settings to ensure they’re correctly set up. - Restart the Agent if needed: If you’ve made any changes, restart the Agent with
sudo systemctl restart datadog-agent
to apply those updates and reconnect.
Following these steps should help you identify and fix most connectivity or service issues with the Datadog Agent.