If you run a little web site like mine or a huge great industrial site you always need to keep an eye on it. One of my favourite tools for that is Logcheck
Put simply Logcheck will check your log files and send you an email for new events, think tail but in email form.
To install simply fire up Terminal and type
sudo apt-get install logcheck
NB this will install Postfix if not already installed
Now time to configure
sudo nano /etc/logcheck/logcheck.conf
There aren’t many settings so time to set them. This is my basic settings file
Note after changing the config file there is no service to restart, the config is read each time it runs as a Cron job.
Intro just removes the intro from the top of the email, reportlevel is the amount of detail sent and the rest are left as is. The config file is well commented.
Now time to set which logs to check.
sudo nano /etc/logcheck/logcheck.logfiles
And by default it only has two logs, I am going to add the Apache error log as well
# these files will be checked by logcheck
# This has been tuned towards a default syslog install
That’s it – now wait for the logs to come in.
More info here