TMAegisベータ
postgres のその他のルール

PostgreSQL

TMA-POSTGRES-3.1.5

Ensure the filename pattern for log files is set correctly

低レベル 1手動レビューpostgres

説明

The log_filename setting specifies the filename pattern for log files. The value for log_filename should match your organization's logging policy. The value is treated as a strftime pattern, so %-escapes can be used to specify time- varying file names. The supported %-escapes are similar to those listed in the Open Group's strftime specification.

チェック方法

監査方法: 手動レビュー

この推奨事項は自動ではチェックできません。--include-manual を指定すると、スキャン結果にこの手順付きで一覧表示されます。

Run SHOW log_filename; (default postgresql-%a.log, one file per weekday) and confirm the strftime pattern matches your log retention and rotation policy.

修正方法

修正方法: ガイダンスまたは IaC パッチ

ALTER SYSTEM SET log_filename = 'postgresql-%Y%m%d.log'; then SELECT pg_reload_conf();

プロパティ

オペレーティングシステム
すべて
タグ
postgresdatabaseloggingmanual
参照
CIS PostgreSQL 18 Benchmark v1.0.0 - 3.1.5 Ensure the filename pattern for log files is set correctly