Difference between revisions of "Logwatch"

From SME Server
Jump to navigationJump to search
Line 14: Line 14:
 
The program at the present time works without templates so all modification can be performed directly over conf files.
 
The program at the present time works without templates so all modification can be performed directly over conf files.
  
'''Mixed tweaks'''
+
==Mixed tweaks==
 +
===Mail messages in html===
 +
If you want the mail message in html format you must edit the file with your favourite editor (mc, nano, joe, vi....):
 +
/usr/share/logwatch/scripts/logwatch.pl
 +
find the line (it should be line 78):
 +
$Config{'output'} = "unformatted";
 +
and modify it in:
 +
$Config{'output'} = "html";
 +
===Parsing Fetchmail log===
 +
The actual realease does not contain a script to parse /var/maillog
  
 
[[Category:Administration:Monitoring]][[Category:Contrib]]
 
[[Category:Administration:Monitoring]][[Category:Contrib]]

Revision as of 13:59, 3 December 2014

Logwatch is a program that analyzes the server logs in /var/logs to detect errors and warnings such as, for exapmple, attempts unsuccessful of authentication, mail delivery errors ecc... All logs will be monitored, and an email summarizing the full report will be sent to the administrator of the Sme (admin) every night. To install the package:

yum --enablerepo=smecontribs install logwatch

then you can type this if you want a report lighter without the firewall reporting

echo 'Service = "-iptables"' >> /etc/logwatch/conf/logwatch.conf
echo 'Service = "-iptables-multi"' >> /etc/logwatch/conf/logwatch.conf
signal-event post-upgrade && signal-event reboot

The program at the present time works without templates so all modification can be performed directly over conf files.

Mixed tweaks

Mail messages in html

If you want the mail message in html format you must edit the file with your favourite editor (mc, nano, joe, vi....):

/usr/share/logwatch/scripts/logwatch.pl

find the line (it should be line 78):

$Config{'output'} = "unformatted";

and modify it in:

$Config{'output'} = "html";

Parsing Fetchmail log

The actual realease does not contain a script to parse /var/maillog