Running this monotonously every day is quite boring, so comes to rescue is logwatch. I have Fedora installation so I will talk about the location with respect to that so for your distribution it might be a little different.
First install logwatch using 🙂 yum install logwatch
and you are done.
If you need to do more configuration and want to see something different in the mail that is sent( BTW sendmail is assumed to be default mail client), the keep reading.
First open the file /etc/logwatch/conf/logwatch.conf
The contents for my distro is just one line 🙂
# Local configuration options go here (defaults are in /usr/share/logwatch/default.conf/logwatch.conf)
So, open the file /usr/share/logwatch/default.conf/logwatch.confbr
I will highlight the important lines in the file here:
LogDir = /var/log — This is the directory for all the log files
MailTo = root — Whom should the mail be sent to
Print = If this is set to true then there will be no mail sent and the output will be displayed on the stdout.
Detail = The level of details you want to see in the mail or the output on screen.
Thats pretty much it.. If you want to further modify the details in the mail you can configure the services. For more advanced usage you can even go to /usr/share/logwatch/scripts/services and configure the individual scripts.
Related articles by Zemanta
- Logwatch for Linux Systems. (amit-agarwal.co.in)
- Monitoring a Log File (scoutapp.com)
- Logs: Can\’t Hate Them, Won\’t Love Them: Brief Log Management Class by Anton Chuvakin (slideshare.net)
- Startup animation and theme for Fedora 12 onwards. (amit-agarwal.co.in)
- Mount and unmount/umount images(iso/img) from nautilus (Fixed not mounting in Fedora) (amit-agarwal.co.in)