■ Agent log file settings
Datadog Agent performs log file roll-over (split) by default when the log size reaches 10MB.
When the log size exceeds 10MB, the file is renamed to agent.log.1
, and new logs are written into a new file.
If you need to limit the log file size due to disk space,
or if you want to retain more logs for policy reasons or increase the number of backup log files,
you can adjust the following settings in the agent’s main configuration file (datadog.yaml
):
log_file_max_size : Maximum size of the log file (default: 10,485,760 bytes)
log_file_max_rolls : Number of backup log files (default: 1)
■ How to prevent Agent logs from being included in the system log
Set the following items in the agent’s main configuration file (datadog.yaml
):
log_to_console: Set agent logging to stdout as false
log_to_syslog: Set logging to syslog as false
■ Agent log file path
Platform | Command |
Linux | /var/log/datadog/ |
macOS, Agent v7.28+ and v6.28+ | /opt/datadog-agent/logs |
macOS, Agent 6.28.0/7.28.0 and newer | /var/log/datadog |
Windows Server 2008, Vista and newer | C:\ProgramData\Datadog\logs |
Wondows Server 2003, XP earlier | unsupported platform |
■ Agent main configuration file (datadog.yaml) path
Platform | Command |
AIX | /etc/datadog-agent/datadog.yaml |
Linux | /etc/datadog-agent/datadog.yaml |
MacOS | ~/.datadog-agent/datadog.yaml |
Windows Server 2008, Vista and newer | %ProgramData%\Datadog\datadog.yaml |
Datadog Guide (EN) : https://docs.datadoghq.com/agent/guide/agent-log-files/?tab=agentv6v7