동작 확인 필요

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

 




blog comments powered by Disqus