Logwatch weekly report only

Logwatch: only one report / week

if you want to have only one report in the week, you have to make the following changes in your setup:

The configuration has been successfully tested with CentOS 6.3 and logwatch 7.3.6.

check if the perl module perl-DateManip is installed -> yum install perl-DateManip.

modify your configuration file:  /etc/logwatch/conf/logwatch.conf

echo „Range = between -7 days and -1 days“ >> /etc/logwatch/conf/logwatch.conf

echo „Output = html“ >> /etc/logwatch/conf/logwatch.conf (only if you want output in html)

modify the cronjob:

mv /etc/cron.daily/0logwatch /etc/cron.weekly

test your setup:

/etc/cron.weekly/0logwatch

 

done Lächelnd

 

Info / Quelle:

http://primozverdnik.com/2011/05/logwatch-once-a-week-is-enough/