Goaccess 不解析所有文件
Goaccess does not parse all the file
我有一个 nginx 自定义日志文件,如下所示:
{ "timestamp": "2015-12-20T12:30:40+03:30", "remote_addr": "80.253.148.194", "remote_user": "-", "body_bytes_sent": "0", "request_time": "0.000", "status": "304", "request": "GET /repository/9/13350-000036.png HTTP/1.1", "request_method": "GET", "http_referrer": "http://domain.ltd/profile/category/1425", "http_user_agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0" }
{ "timestamp": "2015-12-20T12:30:40+03:30", "remote_addr": "80.253.148.194", "remote_user": "-", "body_bytes_sent": "0", "request_time": "0.000", "status": "304", "request": "GET /repository/9/13349-000018.png HTTP/1.1", "request_method": "GET", "http_referrer": "http://domain.ltd/profile/category/1425", "http_user_agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0" }
{ "timestamp": "2015-12-20T12:27:24+03:30", "remote_addr": "79.175.174.23", "remote_user": "-", "body_bytes_sent": "139008", "request_time": "0.298", "status": "206", "request": "GET /repository/9/56766da1202f7.mp4 HTTP/1.1", "request_method": "GET", "http_referrer": "-", "http_user_agent": "Lavf/56.4.101" }...
它包含 3792061 行。
我已经设置了日志格式并且它工作正常,但是在工作完成后有一些数据丢失,比如报告中没有 /9/
文件。
HERE 是我的 goaccess 报告。
我的命令是:
# goaccess -o json --static-file=.mp4 --static-file=.MP4 --ignore-panel=VISITORS --ignore-panel=REQUESTS --ignore-panel=NOT_FOUND --ignore-panel=HOSTS --ignore-panel=OS --ignore-panel=BROWSERS --ignore-panel=VISIT_TIMES --ignore-panel=VIRTUAL_HOSTS --ignore-panel=REFERRERS --ignore-panel=REFERRING_SITES --ignore-panel=KEYPHRASES --ignore-panel=GEO_LOCATION --ignore-panel=STATUS_CODES --sort-panel=REQUESTS_STATIC,BY_BW,DESC --debug-file debug.log --invalid-requests invalid.log -f ./access.json > data.json
无效的请求文件有 40 行,可以忽略。
但之后我拆分了我的文件并找到其中包含 /9/
的行 # cat access.json | fgrep '/9/' ./access.json > newlog.json
我在 goaccess 中为此日志执行了完全相同的命令,我得到了 This 输出,这很好。
卡在那里,感谢任何帮助
它只显示前 366 个项目。
each active window has a total of 366 items. Eventually this will be
customizable. These 366 items are all available by default in the CSV
and JSON exports, and as an expandable panel in the HTML report
(upper-right corner).
我有一个 nginx 自定义日志文件,如下所示:
{ "timestamp": "2015-12-20T12:30:40+03:30", "remote_addr": "80.253.148.194", "remote_user": "-", "body_bytes_sent": "0", "request_time": "0.000", "status": "304", "request": "GET /repository/9/13350-000036.png HTTP/1.1", "request_method": "GET", "http_referrer": "http://domain.ltd/profile/category/1425", "http_user_agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0" }
{ "timestamp": "2015-12-20T12:30:40+03:30", "remote_addr": "80.253.148.194", "remote_user": "-", "body_bytes_sent": "0", "request_time": "0.000", "status": "304", "request": "GET /repository/9/13349-000018.png HTTP/1.1", "request_method": "GET", "http_referrer": "http://domain.ltd/profile/category/1425", "http_user_agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0" }
{ "timestamp": "2015-12-20T12:27:24+03:30", "remote_addr": "79.175.174.23", "remote_user": "-", "body_bytes_sent": "139008", "request_time": "0.298", "status": "206", "request": "GET /repository/9/56766da1202f7.mp4 HTTP/1.1", "request_method": "GET", "http_referrer": "-", "http_user_agent": "Lavf/56.4.101" }...
它包含 3792061 行。
我已经设置了日志格式并且它工作正常,但是在工作完成后有一些数据丢失,比如报告中没有 /9/
文件。
HERE 是我的 goaccess 报告。
我的命令是:
# goaccess -o json --static-file=.mp4 --static-file=.MP4 --ignore-panel=VISITORS --ignore-panel=REQUESTS --ignore-panel=NOT_FOUND --ignore-panel=HOSTS --ignore-panel=OS --ignore-panel=BROWSERS --ignore-panel=VISIT_TIMES --ignore-panel=VIRTUAL_HOSTS --ignore-panel=REFERRERS --ignore-panel=REFERRING_SITES --ignore-panel=KEYPHRASES --ignore-panel=GEO_LOCATION --ignore-panel=STATUS_CODES --sort-panel=REQUESTS_STATIC,BY_BW,DESC --debug-file debug.log --invalid-requests invalid.log -f ./access.json > data.json
无效的请求文件有 40 行,可以忽略。
但之后我拆分了我的文件并找到其中包含 /9/
的行 # cat access.json | fgrep '/9/' ./access.json > newlog.json
我在 goaccess 中为此日志执行了完全相同的命令,我得到了 This 输出,这很好。
卡在那里,感谢任何帮助
它只显示前 366 个项目。
each active window has a total of 366 items. Eventually this will be customizable. These 366 items are all available by default in the CSV and JSON exports, and as an expandable panel in the HTML report (upper-right corner).