Logwatch (IV)
If logwatch is not running, check the post for [Default server/Logwatch]
Nginx configuration
_$: cp /usr/share/logwatch/scripts/services/http /etc/logwatch/scripts/services/nginx
_$: cp /usr/share/logwatch/scripts/services/http-error /etc/logwatch/scripts/services/nginx-error
_$: cp /usr/share/logwatch/default.conf/services/http /etc/logwatch/conf/services/nginx
_$: cp /usr/share/logwatch/default.conf/services/http-error /etc/logwatch/conf/services/nginx-error
/etc/logwatch/conf/services/nginx:
----------------------------------
...
###########################################################################
# Configuration file for nginx filter
###########################################################################
Title = nginx
# Which logfile group...
LogFile = nginx
/etc/logwatch/conf/services/nginx-error:
----------------------------------------
#
# Service definition for nginx error log
#
# File to be placed in
# /etc/logwatch/conf/services/nginx-error.conf
#
Title = nginxerrors
# Which logfile group...
LogFile = nginx-error
# PHP notices should be fixed
Detail = High
/etc/logwatch/conf/logfiles/nginx.conf:
---------------------------------------
LogFile = /var/log/nginx/access.log
LogFile = /var/log/nginx/access.log.1
#Archive = /home/website/logs/old/access.*.log.*.gz
# Expand the repeats (actually just removes them now)
*ExpandRepeats
# Keep only the lines in the proper date range...
*ApplyhttpDate
/etc/logwatch/conf/logfiles/nginx-error.conf:
---------------------------------------------
LogFile = /var/log/nginx/error.log
LogFile = /var/log/nginx/error.log.1
# Expand the repeats (actually just removes them now)
*ExpandRepeats
# Keep only the lines in the proper date range...
*ApplyhttpDate
_$: /usr/sbin/logwatch --output stdout | grep nginx
2013-02-08 17:00:42,438 fail2ban.jail : INFO Jail 'nginx' uses Gamin
--------------------- nginx Begin ------------------------
---------------------- nginx End -------------------------
Also check that you are receiving the e-mails.
_$: /etc/cron.daily/00logwatch