Agent 6 Commands

Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

Overview

This page covers Agent 6 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.

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.

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.

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.

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.

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

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.