配置logwatch分析Nginx日志

自己编译的Nginx或者改变了Nginx的日志文件名格式的话 logwatch就不知道怎么去分析
需要告诉Logwatch文件在哪里
我们创建一个配置文件

[bash]vim /usr/share/logwatch/dist.conf/logfiles/http.conf[/bash]

#Analyse Nginx Log Files
#ihipop 2011/5/14

LogFile = /usr/local/nginx/logs/*/*access.log
LogFile = /usr/local/nginx/logs/*access.log
Archive = /usr/local/nginx/logs.old/*access.log.*.gz

# Expand the repeats (actually just removes them now)
*ExpandRepeats

# Keep only the lines in the proper date range...
*ApplyhttpDate

From:http://mathew-davies.co.uk/2010/06/22/nginx-logwatch-configuration.html

Author Info :
  • From:配置logwatch分析Nginx日志
  • URL:https://blog.ihipop.com/2011/05/2381.html
  • Please Reserve This Link,Thanks!
  • 发表回复

    您的电子邮箱地址不会被公开。 必填项已用 * 标注