我运行多个Linux(Ubuntu)Web服务器,并且正在寻找一个方便的方法来保持重要日志文件的标签。 我想监视相关的LAMP日志以及服务器访问/login。
是否有任何方便的工具/实用程序将(a)轮换日志文件,(b)压缩它们,(c)电子邮件或存档以供日后查看?
Logrotate会做你上面列出的所有东西,比如说
"/var/log/httpd/access.log" /var/log/httpd/error.log { compress rotate 5 mail [email protected] size 1M sharedscripts postrotate /usr/bin/killall -HUP httpd endscript }
会邮寄给你即将被删除的日志等
Splunk怎么样? 我每天收集10GB的数据….. 🙂