logwatch
20111124
動作環境
CentOS6.x
CentOS5.x
◆インストール
[root@server ~]# yum -y install logwatch
◆設定ファイルについて
[root@server ~]# vi /usr/share/logwatch/default.conf/logwatch.conf
# Default Log Directory
# All log-files are assumed to be given relative to this directory.
LogDir = /var/log
→ログファイルのあるディレクトリを指定
# Default person to mail reports to. Can be a local account or a
# complete email address. Variable Print should be set to No to
# enable mail feature.
MailTo = root
→送付先メールアドレスを指定
# The default detail level for the report.
# This can either be Low, Med, High or a number.
# Low = 0
# Med = 5
# High = 10
Detail = Low
→詳細なデータが必要な場合はHighに変更する
# The 'Service' option expects either the name of a filter
# (in /usr/share/logwatch/scripts/services/*) or 'All'.
# The default service(s) to report on. This should be left as All for
# most people.
Service = All
# You can also disable certain services (when specifying all)
Service = "-cisco"
→不必要なログについては上記のように追記していく。
以上が主な設定点
◆ログのファイルネームを変更している場合の対処
[root@server ~]# vi /usr/share/logwatch/default.conf/logfiles/cisco.conf
→例としてcisco.logの設定ファイルを参照しています。「cisco.conf」は「サービス名.conf」に置き換えて下さい。
# What actual file? Defaults to LogPath if not absolute path....
LogFile = cisco.log
→ログファイルネームを指定
以上