New announcements for Serverless, Network, RUM, and more from Dash! New announcements from Dash!

Debug Mode

Host Agent

To enable the Agent full debug mode:

  1. Modify your local datadog.yaml file. See Agent main configuration file for OS specific details.

  2. Replace # log_level: INFO with log_level: DEBUG (remove # to uncomment the line).

  3. Restart the Datadog Agent. See Agent Commands for OS specific details.

  4. Wait a few minutes to generate some logs. See Agent Log Files for OS specific details.

  1. Modify your local datadog.conf file. See Agent main configuration file for OS specific details.

  2. Replace # log_level: INFO with log_level: DEBUG (remove # to uncomment the line).

  3. Restart the Datadog Agent. See Agent Commands for OS specific details.

  4. Wait a few minutes to generate some logs. See Agent Log Files for OS specific details.

Container Agent

Set the DD_LOG_LEVEL=debug environment variable when starting your Agent.

If your container is already running:

  1. To prevent your process from being restarted by S6, run:

    rm /var/run/s6/services/agent/finish

  2. Then stop the Agent:

    s6-svc -d /var/run/s6/services/agent/
    
  3. Restart then the Agent with debug log level by running:

    DD_LOG_LEVEL=debug agent start
    

When run in a container, the Agent cannot be restarted via service datadog-agent restart (or similar) which causes the container to be killed by Docker. Use supervisor to restart a containerized Agent:

/opt/datadog-agent/bin/supervisorctl -c /etc/dd-agent/supervisor.conf restart all

The following commands enable debug logging, restart the Agent, wait 60 seconds, then send a flare, in that order:

sed -i '/\[Main\]/a LOG_LEVEL=DEBUG' /etc/dd-agent/datadog.conf
/opt/datadog-agent/bin/supervisorctl -c /etc/dd-agent/supervisor.conf restart all
sleep 60
/etc/init.d/datadog-agent flare <CASE_ID>

Debug logs can be disabled with:

sed -i '/LOG_LEVEL=DEBUG/d' /etc/dd-agent/datadog.conf
/opt/datadog-agent/bin/supervisorctl -c /etc/dd-agent/supervisor.conf restart all

Or the container can be restarted.

Agent log level

The following Agent log levels are available for log_level or DD_LOG_LEVEL:

OptionFatal logsError logsWarn logsInfo logsDebug logsTrace logsAll logs
OFF
FATALX
ERRORXX
WARNXXX
INFOXXXX
DEBUGXXXXX
TRACEXXXXXX
ALLXXXXXXX

Further Reading