Skip to content

Configure Logwatch for Email Notifications

kurtcoke edited this page May 15, 2015 · 1 revision

This does not seem to be setup yet. You can have notifications emailed to you by logwatch.

Read through this: Logwatch from :Ubuntu Wiki

Some of the info in this guide is copied directly from info on the Ubuntu wiki.

" Create a directory the Logwatch package in the repositories currently does not create, but is required for proper operation: " Don't follow these instructions. Logwatch is not configured to delete the folders it creates in /var/cacche/logwatch.

Instead change the TmpDir to /tmp in logwatch.conf

# /etc/logwatch/conf/logwatch.conf
#TmpDir = /var/cache/logwatch
TmpDir = /tmp
The /tmp directory is cleared on a regular basis:(See the links for more info) How-to-clean-tmp How-The-Temp-Dir-Is-Cleared

"Configuration shouldn't be edited in the install directory (/usr/share/logwatch). Copy logwatch.conf to /etc/logwatch before editing: "

$ sudo cp /usr/share/logwatch/default.conf/logwatch.conf /etc/logwatch/conf/

To have notifications emailed to you by logwatch:

$ sudo vim /etc/logwatch/conf/logwatch.conf
# Replace Root with your own Email address.
MailTo = root

Here is a very easy to follow guide on the topic: Install and Configure Logwatch

For lots of defail in the configuration:

# logwatch.conf
Detail = High

For Ubuntu Systems with Apache:

$ sudo cp /usr/share/logwatch/default.conf/logfiles/combined.log /etc/logwatch/conf/logfiles/
$ sudo cp /usr/share/logwatch/default.conf/logfiles/http.conf /etc/logwatch/conf/logfiles/

Clone this wiki locally