设置:
2 or more nginx machines each machine has the same virtual hosts traffic is load balanced via DNS to each machine
我需要弄清楚什么是最好的工具来获得一些stream量统计,主要是感兴趣的点击量和总stream量以千兆字节为单位。 显然,日志信息将来自nginx,格式如下:
log_format main '$remote_addr $host $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" "$http_user_agent" "$gzip_ratio"';
awstats绝对是工作的工具。
rsync日志(或者如果你感觉勇敢的话可以共享nfs)到一个位置,然后使用awstats进行分析。
无论您打算使用哪种分析程序,logresolvemerge.pl几乎肯定会成为合并日志本身的赢家。 除了Marco列出的awstats语法之外,它还像冠军一样是一个独立的程序。
/path/to/logresolvemerge.pl /path/to/one/big/logfile /path/to/many/files/ending/in/*.log > /path/to/merged/log.file