Agent 5 Commands

Overview

This page covers Agent 5 commands. Datadog recommends installing or upgrading to Agent 7 for the latest features. For information on installing the latest version of the Agent, follow the Agent 7 Installation Instructions. For information on upgrading to Agent 7 from an earlier version, see Upgrade to Datadog Agent v7.

Note: If the service wrapper is not available on your system, use:

  • On upstart-based systems: sudo start/stop/restart/status datadog-agent
  • On systemd-based systems: sudo systemctl start/stop/restart/status datadog-agent

Start, stop, and restart the Agent

Start the Agent

List of commands to start the Datadog Agent:

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 Windows commands.

Stop the Agent

List of commands to stop the Datadog Agent:

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 Windows commands.

Restart the Agent

List of commands to restart the Datadog Agent:

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 Windows commands.

Agent status and information

Service status

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

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 Windows commands.

Agent information

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

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 Windows commands.

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

Status information on Windows

To verify the Agent is running, check if the service status in the Services panel is listed as “Started”. A process called ddagent.exe should also exist in the Task Manager.

Information about the Agent’s state for Agent v5.2+ is available in the Datadog Agent Manager -> Settings -> Agent Status:

Windows Status

For the status of Agent v3.9.1 to v5.1, navigate to http://localhost:17125/status.

The info command is available for PowerShell:

& "$env:ProgramFiles\Datadog\Datadog Agent\embedded<PYTHON_MAJOR_VERSION>\python.exe" "$env:ProgramFiles\Datadog\Datadog Agent\agent\agent.py" info

or cmd.exe:

"%ProgramFiles%\Datadog\Datadog Agent\embedded<PYTHON_MAJOR_VERSION>\python.exe" "%ProgramFiles%\Datadog\Datadog Agent\agent\agent.py" info

Windows commands

Use the Datadog Agent Manager (available from the start menu).

windows Start Menu

Use the start, stop, and restart commands in the Datadog Agent Manager:

Manager snapshot

You can also use Windows PowerShell, where available: [start|stop|restart]-service datadogagent