TMAegis
Thêm quy tắc cho cassandra

Apache Cassandra

TMA-CASSANDRA-4.1

Ensure that logging is enabled

Trung bìnhCấp 1Tự độngcassandra

Mô tả

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.

Cách kiểm tra

Phương pháp kiểm tra: Lệnh 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"}'
Đầ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 <root level="INFO"> in logback.xml (or logback-test.xml if present) and restart Cassandra, or run nodetool setlogginglevel ROOT INFO.

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
cassandralogging
Tham chiếu
CIS Apache Cassandra 5.0 Benchmark v1.1.0 - 4.1 Ensure that logging is enabled

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 cassandra