nginxlog-analysisgoaccess

goaccess analystis nginx log - parseing url


I am using goaccess statistics my ngnix log. But the problem is that the same url have difference parameter.

115.*.*.115 - - [01/Nov/2013:06:15:29 +0000] "GET /this/is/example/test.html?ver=53&q=aaaaaa HTTP/1.1" 200 64 "-" "-"
115.*.*.115 - - [01/Nov/2013:06:15:29 +0000] "GET /this/is/example/test.html?ver=53&q=bbbbbb HTTP/1.1" 200 64 "-" "-"

I want to ignore the parameter after just statistics url like "/this/is/example/test.html".

How to do that or some other tools can do it? Thanks.


Solution

  • perl -p -e 's/\?.*(\sHTTP)/$1/' log | goaccess
    

    should do it.