Docker
TMA-DOCKER-2.14
Ensure centralized and remote logging is configured
Trung bìnhCấp 2Tự độngdocker
Mô tả
Centralized logging keeps container logs off the host where they can be tampered with. The audit reads the default logging driver from docker info and fails for the local-only drivers json-file, local and none.
Cách kiểm tra
Phương pháp kiểm tra: Lệnh shell
shell
d=$(docker info --format '{{.LoggingDriver}}') || exit 1; case "$d" in json-file|local|none|'') echo "local:$d";; *) echo compliant;; esac- Đầu ra mong đợi
compliant
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
Set "log-driver" (e.g. syslog, journald forwarded to a collector, fluentd, gelf, splunk) and its "log-opts" in /etc/docker/daemon.json, then restart the Docker daemon.
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- dockerdaemonlogging
- Tham chiếu
- CIS Docker Benchmark v1.9.0 - 2.14 Ensure centralized and remote logging is configured
Kiểm tra máy này
Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.
shell
tmaegis scan --target docker --level 2