TMA-COCKROACHDB-3.2
Ensure Log Rotation and Retention Settings Are Configured
Mô tả
CockroachDB log rotation and retention must be configured to prevent uncontrolled growth and to preserve an appropriate history window. CockroachDB supports per-group rotation parameters that control both individual file size and total group retention. Each log file group can define: - max-file-size - maximum size of an individual log file before a new file is created.
Cách kiểm tra
Phương pháp kiểm tra: Xem xét thủ công
Khuyến nghị này không thể kiểm tra tự động. Lần quét sẽ liệt kê mục này kèm hướng dẫn khi bạn truyền cờ --include-manual.
Run cockroach debug check-log-config (or grep -A10 file-groups: /etc/cockroach/logging.yaml) and confirm each production file group has suitable max-file-size and max-group-size (defaults 10MiB / 100MiB). Check that the on-disk log directory holds enough history to meet the retention policy and that logs are shipped off-node.
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
1. Use defaults or define explicit rotation settings: If you do not configure a custom logging YAML, CockroachDB applies defaults of max- file-size: 10MiB and max-group-size: 100MiB to most file groups, which are acceptable for many small-to-medium deployments.
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- cockroachdblogging
- Tham chiếu
- CIS CockroachDB v25.x Benchmark v1.0.0 - 3.2 Ensure Log Rotation and Retention Settings Are Configured