Commands Cheat Sheet

Evaluating engineering tools? Get the comparison in Google Sheets

(Perfect for making buy/build decisions or internal reviews.)

Most-used commands
Your email is safe thing.

Thankyou for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.

Installation

DD_API_KEY= DD_SITE= bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script.sh)"
Install Datadog Agent on Linux with API key

brew install datadog-agent
Install Datadog Agent on macOS using Homebrew

Agent Control

sudo systemctl start datadog-agent
Start the Datadog Agent on Linux (systemd)

sudo systemctl stop datadog-agent
Stop the Datadog Agent on Linux (systemd)

sudo systemctl restart datadog-agent
Restart the Datadog Agent on Linux (systemd)

sudo systemctl status datadog-agent
Check the status of the Datadog Agent on Linux (systemd)

sudo service datadog-agent start
Start the Datadog Agent on Linux (init)

sudo service datadog-agent stop
Stop the Datadog Agent on Linux (init)

sudo service datadog-agent restart
Restart the Datadog Agent on Linux (init)

sudo service datadog-agent status
Check the status of the Datadog Agent on Linux (init)

launchctl start com.datadoghq.agent
Start the Datadog Agent on macOS

launchctl stop com.datadoghq.agent
Stop the Datadog Agent on macOS

Configuration

sudo vi /etc/datadog-agent/datadog.yaml
Edit the main configuration file on Linux

sudo vi /etc/datadog-agent/conf.d//conf.yaml
Edit integration-specific configuration on Linux

vi /opt/datadog-agent/etc/datadog.yaml
Edit the main configuration file on macOS

vi /opt/datadog-agent/etc/conf.d//conf.yaml
Edit integration-specific configuration on macOS

sudo datadog-agent config
Display the current configuration of the Datadog Agent

Agent Commands

sudo datadog-agent status
Check the overall status of the Datadog Agent

sudo datadog-agent health
Check the health of the running agent

sudo datadog-agent check
Run a specific integration check

sudo datadog-agent configcheck
Verify the configuration of all integrations

sudo datadog-agent flare
Collect troubleshooting information for Datadog support

sudo datadog-agent version
Check the version of the Datadog Agent

sudo datadog-agent hostname
Show the hostname used by the Datadog Agent for reporting

Logs

sudo tail -f /var/log/datadog/agent.log
View the Datadog Agent logs on Linux

tail -f /opt/datadog-agent/logs/agent.log
View the Datadog Agent logs on macOS

sudo journalctl -u datadog-agent.service -f
Follow Datadog Agent logs on systemd-based systems

Docker Integration

docker run -d --name datadog-agent -v /var/run/docker.sock:/var/run/docker.sock:ro -v /proc/:/host/proc/:ro -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro -e DD_API_KEY= -e DD_SITE= datadog/agent:latest
Run Datadog Agent in Docker

docker exec -it datadog-agent datadog-agent status
Check status of Datadog Agent running in Docker