TMAegisBeta
更多 cassandra 規則

Apache Cassandra

TMA-CASSANDRA-4.1

Ensure that logging is enabled

中等級 1自動化cassandra

說明

Apache Cassandra uses Logback for logging functionality. While this can be set using nodetool setlogginglevel changes made using this method will be reverted to the level specified in the logback.xml file the next time the process restarts. The configurable logging levels are: - OFF - TRACE - DEBUG - INFO (Default) - WARN - ERROR Runs nodetool getlogginglevels (JMX on localhost:7199); passes when the ROOT logger is not OFF.

檢查方式

稽核方法: Shell 指令

shell
out=$(nodetool getlogginglevels 2>/dev/null) || exit 1; printf '%s\n' "$out" | awk '$1 == "ROOT" {r = $2} END {if (r == "") print "no ROOT logger"; else if (toupper(r) == "OFF") print "OFF"; else print "compliant"}'
預期輸出
compliant

修補方式

修補方法: 操作指南或基礎設施修補檔

Set <root level="INFO"> in logback.xml (or logback-test.xml if present) and restart Cassandra, or run nodetool setlogginglevel ROOT INFO.

屬性

作業系統
不限
標籤
cassandralogging
參考資料
CIS Apache Cassandra 5.0 Benchmark v1.1.0 - 4.1 Ensure that logging is enabled

檢查此主機

請在您有權稽核的機器上執行此指令。掃描為唯讀操作。

shell
tmaegis scan --target cassandra