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 Agent documentation for your OS.
DockerUse the installation command.
Kuberneteskubectl create -f datadog-agent.yaml
macOSlaunchctl start com.datadoghq.agent or through the systray app
Sourcesudo service datadog-agent start
WindowsSee the Windows Agent documentation.
PlatformCommand
Linuxsudo service datadog-agent start
DockerSee the Docker Agent documentation.
macOS/usr/local/bin/datadog-agent start
Sourcesudo ~/.datadog-agent/bin/agent start
WindowsSee the Windows Agent documentation.

Stop the Agent

List of commands to stop the Datadog Agent:

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

Restart the Agent

List of commands to restart the Datadog Agent:

PlatformCommand
LinuxSee the Agent documentation for your OS.
DockerUse the installation command.
Kuberneteskubectl delete pod <AGENT POD NAME>—note: the pod is automatically rescheduled
macOSrun stop then start, or through the systray app
Sourceunsupported Platform
WindowsSee the Windows Agent documentation.
PlatformCommand
Linuxsudo service datadog-agent restart
DockerSee the Docker Agent documentation.
macOS/usr/local/bin/datadog-agent restart
Sourcesudo ~/.datadog-agent/bin/agent restart
WindowsSee the Windows Agent 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 Agent 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 through the systray app
Sourcesudo service datadog-agent status
WindowsSee the Windows Agent documentation.
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 Windows Agent 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 through the web GUI
Sourcesudo datadog-agent status
WindowsSee the Windows Agent 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 Windows Agent 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.
jmxJMX troubleshooting.
launch-guiStart the Datadog Agent GUI.
restart-serviceRestart the Agent within the service control manager. Windows only.
start-serviceStart the Agent within the service control manager. Windows only.
stream-logsStream the logs being processed by a running agent.
stopserviceStop the Agent within the service control manager. Windows only.
versionPrint version info.

Further Reading

Additional helpful documentation, links, and articles: