For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/default_rules/s3q-zji-3e8.md. A documentation index is available at /llms.txt.

The Docker daemon log level should be set to 'info'

docker

Classification:

compliance

Framework:

cis-docker

Control:

2.3

Description

The Docker daemon should log at the info level.

Rationale

At info, the daemon logs the events worth keeping for an investigation, without the volume and the sensitive detail of debug.

Audit

Look for a log level on the dockerd command line and in daemon.json:

ps -o args= -C dockerd
grep -E '"(log-level|debug)"' /etc/docker/daemon.json

Datadog reads --log-level and -l on the dockerd command line or, if it isn’t set there, log-level in daemon.json. It passes the rule when the level is info or unset (unset means info) and debug mode is off. It fails it otherwise.

Remediation

Remove the log level from the dockerd command line and from daemon.json, or set it to info:

{
  "log-level": "info"
}

Then restart the daemon with systemctl restart docker.

Impact

None.

Default value

The daemon logs at info.

References

  1. https://docs.docker.com/reference/cli/dockerd/