Changes

From Amahi Wiki
Jump to: navigation, search
no edit summary
This will provide the capability to receive system logs via e-mail. This applies to Fedora 9 & 10. There are many customizable features ([http://www.logwatch.org/tabs/docs/HOWTO-Customize-LogWatch.html/ Logwatch Documentation]), but this will only identify the basic ones. 
* First, open a terminal window and become '''root'''. Enter the following to install:
<pre>yum install logwatch</pre>
* Settings are stored in ::'''NOTE:''/usr/share/logwatch/default.conf/logwatch.conf''''' and require minor changes to make it work. Use your favorite editor <code>yum</code> (mine is nanodeprecated) has been replaced with <code>dnf</code> as the package manager for Fedora 23 and make the following change:** '''MailTo = root''' (line 35) to '''MailTo = (your email address)'''greater.
* Ensure sendmail is started (You can customize the settings by adding options to '''''service sendmail start/etc/logwatch/conf/logwatch.conf''''') or . By default it won't worksends the daily logwatch email to the local root mail box. To change it, add this line (change user@yourisp.com to desired email address):<pre>Output = mailMailTo = user@yourisp.com</pre>
* To test, enter If you want the command '''''logwatch''''' and go check your email.in html, add this line:<pre>Format = html</pre>
* To test, enter the command '''''logwatch''''' and go check your email.
<pre>logwatch</pre>
* Ensure sendmail or postfix is running (rerun command and change '''''status''''' to '''''start''''' if not):
<pre>service sendmail status</pre>
or
<pre>service postfix status</pre>
'''Optional:'''
* These are a few more basic options that can be configured.
** '''Range = yesterday''' (line 65default) - additional values are '''all''' or '''today'''.** '''Detail = Low''' (line 72default) - additional values are '''med''' or '''high'''. I set mine to '''med'''.
This application runs transparent in the background, once daily in the morning. If you want to run it more frequently (i.e. send logs for today), then change the range and execute the command '''''logwatch''''' as needed.
 
'''NOTE:''' If you want to forward these emails to another (including external) account, see [http://wiki.amahi.org/index.php/Forward_System_Emails Forward System Emails].
12,424

edits