Centos Logwatch configuration
============Tayab Khan=======## yum install mailx perl perl-Module-Pluggable perl-Pod-Escapes perl-Pod-Simple perl-YAML-Syck perl-libs perl-version
## yum install logwatch
## cd /usr/share/logwatch/defaults.conf/services
## vi zz-disk_space.conf
## Uncomment the lines as shown:
#New disk report options
#Uncomment this to show the home directory sizes
$show_home_dir_sizes = 1
$home_dir = "/home"
#Uncomment this to show the mail spool size
$show_mail_dir_sizes = 1
$mail_dir = "/var/spool/mail"
#Uncomment this to show the system directory sizes /opt /usr/ /var/log
$show_disk_usage = 1
## vi http.conf
# Set flag to 1 to enable ignore
# or set to 0 to disable
$HTTP_IGNORE_ERROR_HACKS = 1
## vi /usr/share/logwatch/defaults.conf/logwatch.conf
Change MailTo = to an email address as desired:
# 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
MailTo = royalmcuc@yahoo.com
## After completed, we may run logwatch manually at the command line with no options to test:
# logwatch
and check email.
## add a crontab that will run command logwatch that will run everyday 08:30am
crontab -e
30 08 * * * logwatch
/etc/init.d/crond restart
######### Tayab Khan ##########
No comments:
Post a Comment