logwatch 에 nginx 로그 파일 추가
동작 확인 필요
cp /usr/share/logwatch/default.conf/services/http.conf /etc/logwatch/conf/services/http.conf cp /usr/share/logwatch/scripts/services/http /etc/logwatch/scripts/services/httpd
conf
/etc/logwatch/conf/services/http.conf:
Title과 LogFile 을 http 에서 nginx 로 변경
Title = "nginx" # Which logfile group... LogFile = nginx
logfile 설정
/etc/logwatch/conf/logfiles/http.conf
LogFile = /var/log/nginx/*access.log LogFile = /var/log/nginx/*access.log.1 Archive = /var/log/nginx/*access.log.*.gz # Expand the repeats (actually just removes them now) *ExpandRepeats # Keep only the lines in the proper date range... *ApplyhttpDate
Ref
- http://blog.shlrm.org/blog/2012/05/09/adding-nginx-to-logwatch-output/
- http://lintut.com/logwatch-how-to-for-centos-or-red-hat/