MongoDB
TMA-MONGODB-5.4
Ensure that new entries are appended to the end of the log file
ThấpCấp 2Tự độngmongodb
Mô tả
By default, new log entries will overwrite old entries after a restart of the mongod or Mongols service. Enabling the systemLog.logAppend setting causes new entries to be appended to the end of the log file rather than overwriting the existing content of the log when the mongos or mongod instance restarts. Checks the YAML config file /etc/mongod.conf (SKIP when it does not exist).
Cách kiểm tra
Phương pháp kiểm tra: Mẫu tệp
- Tệp
/etc/mongod.conf- Mẫu khớp
(?m)^[ \t]*logAppend:[ \t]*['\x22]?true\b
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 systemLog.logAppend: true in /etc/mongod.conf and restart mongod.
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- mongodblogging
- Tham chiếu
- CIS MongoDB 8 Benchmark v2.0.0 - 5.4 Ensure that new entries are appended to the end of the log file
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 mongodb --level 2