Logwatch for Linux Systems.

2010-06-02 397 words 2 mins read

On my personal <a class="zem_slink freebase/en/client" title="Client (computing)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Client_%28computing%29">desktop at home, I like to see the <a class="zem_slink freebase/en/statistics" title="Statistics" rel="wikipedia" href="http://en.wikipedia.org/wiki/Statistics">statistics at least once a day, for what was installed, what was run with <a class="zem_slink freebase/en/sudo" title="Sudo" rel="homepage" href="http://www.sudo.ws/">sudo and other such details like <a class="zem_slink freebase/en/kernel" title="Kernel (computing)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Kernel_%28computing%29">kernel errors.

Running this monotonously every day is quite boring, so comes to rescue is logwatch. I have <a class="zem_slink freebase/en/fedora" title="Fedora" rel="homepage" href="http://fedoraproject.org/">Fedora <a class="zem_slink freebase/en/installation" title="Installation (computer programs)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Installation_%28computer_programs%29">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 <a class="zem_slink freebase/en/e-mail_client" title="Email client" rel="wikipedia" href="http://en.wikipedia.org/wiki/Email_client">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 <a class="zem_slink freebase/en/data_logger" title="Data logger" rel="wikipedia" href="http://en.wikipedia.org/wiki/Data_logger">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 <a class="zem_slink freebase/en/standard_streams" title="Standard streams" rel="wikipedia" href="http://en.wikipedia.org/wiki/Standard_streams">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

<span style="font-family: agency;"><span style="color: rgb(204, 0, 0);">/usr/share/logwatch/scripts/services and configure the individual scripts.<h6 class="zemanta-related-title">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://blog.amit-agarwal.co.in/2010/06/02/logwatch-for-linux-systems/">Logwatch for Linux Systems. (amit-agarwal.co.in) <li class="zemanta-article-ul-li"><a href="http://blog.scoutapp.com/articles/2010/03/29/monitoring-a-log-file">Monitoring a Log File (scoutapp.com) <li class="zemanta-article-ul-li"><a href="http://www.slideshare.net/anton_chuvakin/logs-cant-hate-them-wont-love-them-brief-log-management-class-by-anton-chuvakin">Logs: Can&#8217;t Hate Them, Won&#8217;t Love Them: Brief Log Management Class by Anton Chuvakin (slideshare.net) <li class="zemanta-article-ul-li"><a href="http://blog.amit-agarwal.co.in/2010/05/20/startup-animation-theme-fedora-12-onwards/">Startup animation and theme for Fedora 12 onwards. (amit-agarwal.co.in) <li class="zemanta-article-ul-li"><a href="http://blog.amit-agarwal.co.in/2010/03/09/mount-and-unmountumount-imagesiso-img-from-nautilus-fixed-not-mounting-in-fedora/">Mount and unmount/umount images(iso/img) from nautilus (Fixed not mounting in Fedora) (amit-agarwal.co.in) <div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/6a7b59d3-8ca1-4798-afbd-7636005868ac/"><img class="zemanta-pixie-img" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_b6.png" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related more-info pretty-attribution paragraph-reblog">


Authored By Amit Agarwal

Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it