Join us at the Dash conference! July 16-17, NYC

Agent Check Status

If you are experiencing issues with a given Agent Check, use these commands for your OS to get more troubleshooting information:

Linux

To test an Agent check, run:

sudo -u dd-agent datadog-agent check <CHECK_NAME>

If you want to include rate metrics, add --check-rate to your command, for instance for Agent v6.x run:

sudo -u dd-agent datadog-agent check <CHECK_NAME> --check-rate
sudo -u dd-agent dd-agent check <CHECK_NAME>

If you want to include rate metrics, add --check-rate to your command, for instance for Agent v6.x run:

sudo -u dd-agent dd-agent check <CHECK_NAME> --check-rate

If your issue continues, reach out to the Datadog support team with a flare.

Windows

Run the following script, with the proper <CHECK_NAME>:

C:\Program Files\Datadog\Datadog agent\embedded\agent.exe check <CHECK_NAME>

The Agent install includes a file called shell.exe in your Program Files directory for the Datadog Agent. This file can be used to run Python within the Agent environment. Once your check (called <CHECK_NAME>) is written and you have the .py and .yaml files in their correct places, run the following in shell.exe:

from checks import run_check
run_check('<CHECK_NAME>')

This outputs any metrics or events that the check returns.

Run the following script, with the proper <CHECK_NAME>:

<INSTALL_DIR>/embedded/python.exe <INSTALL_DIR>agent/agent.py check <CHECK_NAME>

For example, to run the disk check:

C:\Program' 'Files\Datadog\Datadog' 'Agent\embedded\python.exe C:\Program' 'Files\Datadog\Datadog' 'Agent\agent\agent.py check disk

Systemd

For systems using systemd, use journalctl to assist with debugging.

The following command shows the status of the Datadog Agent.

sudo systemctl status datadog-agent

If the Agent failed to start, and no further information is provided, use the following command to display all logs for the Datadog Agent service. If needed, use -r to print logs in reverse order.

sudo journalctl -u datadog-agent.service

The following command shows the status of the Datadog Agent.

sudo systemctl status dd-agent

If the Agent failed to start, and no further information is provided, use the following command to display all logs for the Datadog Agent service. If needed, use -r to print logs in reverse order.

sudo journalctl -u dd-agent.service

Further Reading

Additional helpful documentation, links, and articles:

Table of Contents