Agent Commands
Security Monitoring is now available Security Monitoring is now available

Agent Commands

For Linux based systems where the service wrapper command is not available, consult the list of alternatives.

Start, Stop, and Restart the Agent

Start the Agent

List of commands to start the Datadog Agent:

PlatformCommand
AIXstartsrc -s datadog-agent
LinuxSee the dedicated documentation for your OS
DockerSee the dedicated Docker documentation
Kuberneteskubectl create -f datadog-agent.yaml
macOSlaunchctl start com.datadoghq.agent or via the systray app
Sourcesudo service datadog-agent start
WindowsSee the dedicated Windows documentation
PlatformCommand
Linuxsudo service datadog-agent start
DockerSee the dedicated Docker documentation
macOS/usr/local/bin/datadog-agent start
Sourcesudo ~/.datadog-agent/bin/agent start
WindowsSee the dedicated Windows documentation

Stop the Agent

List of commands to stop the Datadog Agent:

PlatformCommand
AIXstopsrc -s datadog-agent
LinuxSee the dedicated documentation for your OS
DockerSee the dedicated Docker documentation
Kuberneteskubectl delete pod <AGENT POD NAME>—note: the pod is automatically rescheduled
macOSlaunchctl stop com.datadoghq.agent or via the systray app
Sourcesudo service datadog-agent stop
WindowsSee the dedicated Windows documentation
PlatformCommand
Linuxsudo service datadog-agent stop
DockerSee the dedicated Docker documentation
macOS/usr/local/bin/datadog-agent stop
Sourcesudo ~/.datadog-agent/bin/agent stop
WindowsSee the dedicated Windows documentation

Restart the Agent

List of commands to restart the Datadog Agent:

PlatformCommand
LinuxSee the dedicated documentation for your OS
DockerSee the dedicated Docker documentation
Kuberneteskubectl delete pod <AGENT POD NAME>—note: the pod is automatically rescheduled
macOSrun stop then start, or via the systray app
Sourceunsupported Platform
WindowsSee the dedicated Windows documentation
PlatformCommand
Linuxsudo service datadog-agent restart
DockerSee the dedicated Docker documentation
macOS/usr/local/bin/datadog-agent restart
Sourcesudo ~/.datadog-agent/bin/agent restart
WindowsSee the dedicated Windows documentation

Agent Status and Information

Service Status

List of commands to display the status of the Datadog Agent:

PlatformCommand
AIXlssrc -s datadog-agent
LinuxSee the dedicated documentation for your OS
Docker (Debian)sudo docker exec -it <CONTAINER_NAME> s6-svstat /var/run/s6/services/agent/
Kuberneteskubectl exec -it <POD_NAME> s6-svstat /var/run/s6/services/agent/
macOSlaunchctl list com.datadoghq.agent or via the systray app
Sourcesudo service datadog-agent status
PlatformCommand
Linuxsudo service datadog-agent status
Docker (Debian)sudo docker exec -it <CONTAINER_NAME> /etc/init.d/datadog-agent status
Kuberneteskubectl exec -it <POD_NAME> /etc/init.d/datadog-agent status
macOSdatadog-agent status
Sourcesudo ~/.datadog-agent/bin/agent status
WindowsSee the dedicated Windows documentation
PlatformCommand
Kubernetesdatadog-cluster-agent status

Agent Information

List of commands to display the status of your Datadog Agent and enabled integrations.

PlatformCommand
AIXdatadog-agent status
Linuxsudo datadog-agent status
Dockersudo docker exec -it <CONTAINER_NAME> agent status
Kuberneteskubectl exec -it <POD_NAME> agent status
macOSdatadog-agent status or via the web GUI
Sourcesudo datadog-agent status
WindowsSee the dedicated Windows documentation

A properly configured integration is displayed under Running Checks with no warnings or errors, as seen below:

Running Checks
==============
  network (1.6.0)
  ---------------
    Total Runs: 5
    Metric Samples: 26, Total: 130
    Events: 0, Total: 0
    Service Checks: 0, Total: 0
    Average Execution Time : 0ms
PlatformCommand
Linuxsudo service datadog-agent info
Dockersudo docker exec -it <CONTAINER_NAME> /etc/init.d/datadog-agent info
Kuberneteskubectl exec -it <POD_NAME> /etc/init.d/datadog-agent info
macOSdatadog-agent info
Sourcesudo ~/.datadog-agent/bin/info
WindowsSee the dedicated Windows documentation

A properly configured integration is displayed under Checks with no warnings or errors, as seen below:

Checks
======
 network
 -------
   - instance #0 [OK]
   - Collected 15 metrics, 0 events & 1 service check
PlatformCommand
Kubernetesdatadog-cluster-agent status

Other commands

The Agent v6 command line interface is sub-command based. To see the list of available sub-commands, run:

<AGENT_BINARY> --help

To run a sub-command, the Agent binary must be invoked:

<AGENT_BINARY> <SUB_COMMAND> <OPTIONS>

Some options have flags and options detailed under --help. For example, use help with the check sub-command:

<AGENT_BINARY> check --help
SubcommandNotes
checkRun the specified check.
configRuntime configuration management.
configcheckPrint all configurations loaded & resolved of a running Agent.
diagnoseExecute connectivity diagnosis on your system.
flareCollect a flare and send it to Datadog.
healthPrint the current Agent health.
helpHelp about any command.
hostnamePrint the hostname used by the Agent.
importImport and convert configuration files from previous versions of the Agent.
installserviceInstall the Agent within the service control manager. Windows only.
jmxJMX troubleshooting.
launch-guiStart the Datadog Agent GUI.
regimportImport the registry settings into datadog.yaml. Windows only.
remove-serviceRemove the Agent from the service control manager. Windows only.
restart-serviceRestart the Agent within the service control manager. Windows only.
start-serviceStart the Agent within the service control manager. Windows only.
stopserviceStop the Agent within the service control manager. Windows only.
versionPrint version info.

Further Reading

Additional helpful documentation, links, and articles: