TMAegis
Weitere Regeln für mongodb

MongoDB

TMA-MONGODB-5.4

Ensure that new entries are appended to the end of the log file

NiedrigStufe 2Automatisiertmongodb

Beschreibung

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).

So wird geprüft

Prüfmethode: Dateimuster

Datei
/etc/mongod.conf
Muster
(?m)^[ \t]*logAppend:[ \t]*['\x22]?true\b

So wird behoben

Behebungsmethode: Anleitung oder Infrastruktur-Patch

Set systemLog.logAppend: true in /etc/mongod.conf and restart mongod.

Eigenschaften

Betriebssysteme
Beliebig
Tags
mongodblogging
Referenz
CIS MongoDB 8 Benchmark v2.0.0 - 5.4 Ensure that new entries are appended to the end of the log file

Diesen Host prüfen

Führen Sie dies auf einem Rechner aus, den Sie prüfen dürfen. Der Scan ist schreibgeschützt.

shell
tmaegis scan --target mongodb --level 2