设为首页收藏本站

LinuxTone | 运维专家网论坛 - 最棒的Linux运维与开源架构技术交流社区!

 找回密码
 注册

用新浪微博连接

一步搞定

QQ登录

只需一步,快速开始

查看: 1596|回复: 1

[日志分析] nginx+awstats+perl 日志分析报错 [复制链接]

Rank: 3Rank: 3

签到
11
注册时间
2009-10-21
最后登录
2012-2-13
在线时间
60 小时
阅读权限
30
积分
348
帖子
9
主题
4
精华
0
UID
6052
发表于 2010-11-25 11:27:55 |显示全部楼层
本帖最后由 cy_ttcm 于 2010-11-25 11:38 编辑

AWStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log.
Your log file /data/weblog/dw.access_20101124.log must have a bad format or LogFormat parameter setup does not match this format.
Your AWStats LogFormat parameter is:
%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot
This means each line in your web server log file need to have the following personalized log format:
%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot
And this is an example of records AWStats found in your log file (the record number 50 in your log):
117.36.6.86 - - [25/Nov/2010:10:35:38 +0800] "GET /images/diwangjiabao2_36.jpg HTTP/1.1"304 0 "http://www.test.com" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Tridnt/4.0; InfoPath.2)" -
Setup ('/etc/awstats/awstats.www.test.com.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

我nginx里写的是日志格式是
log_format  dw          '$remote_addr - $remote_user [$time_local] "$request" '
                                '$status $body_bytes_sent "$http_referer" '
                                '"$http_user_agent" "$http_x_forwarded_for"';
        access_log  /home/weblog/dw.log dw;

awstats里的
LogFormat = "%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"

哪不对了 ?


Rank: 3Rank: 3

注册时间
2009-10-21
最后登录
2012-2-13
在线时间
60 小时
阅读权限
30
积分
348
帖子
9
主题
4
精华
0
UID
6052
发表于 2010-11-25 12:02:18 |显示全部楼层
本帖最后由 cy_ttcm 于 2010-11-25 12:03 编辑

额 ~~  神奇的好了。


重新下载了下awstats 装了后好了。 LogFormat =1

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

IT运维专家网感谢红之盟网络提供带宽支持

合作联系: QQ:67888954/MSN:cnseek@msn.com/mail:netseek@linuxtone.org

Archiver|手机版|感谢所有关心和支持过LinuxTone的朋友们 转载本站内容请注明原作者名及出处 ( 京ICP备08103151 )   |

GMT+8, 2012-5-23 11:10 , Processed in 0.139179 second(s), 12 queries , Memcache On.

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部