FreeBSD Clamavを使っていて「LOGGING DISABLED (Maximal log file size exceeded).」が出た

FreeBSD Clamavを使っていて「LOGGING DISABLED (Maximal log file size exceeded).」が出た

Clamavを使用していて、下記ログファイルに
/var/log/clamav/clamd.log
/var/log/clamav/freshclam.log
以下のようなログが出ていたので対応をメモ。

Log size = 1048873, max = 1048576
LOGGING DISABLED (Maximal log file size exceeded).
設定ファイルでログファイルの最大サイズを調整

/usr/local/etc/clamd.conf
/usr/local/etc/freshclam.conf

# Maximum size of the log file.
# Value of 0 disables the limit.
# You may use 'M' or 'm' for megabytes (1M = 1m = 1048576 bytes)
# and 'K' or 'k' for kilobytes (1K = 1k = 1024 bytes).
# in bytes just don't use modifiers.
# Default: 1M
LogFileMaxSize 10M

変更したらclamd、freshclamを再起動する。


ログローテーション

newsyslogに設定を追加して
# vi /etc/newsyslog.conf

/var/log/clamav/clamd.log     vscan:vscan   640  7     *    @T00  JC
/var/log/clamav/freshclam.log vscan:vscan   640  7     *    @T00  JC


反映
# newsyslog


FreeBSDのログローテーションは↓を参照。
http://www.kozupon.com/logrotate/newsyslog.html