Question

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.

Was it helpful?

Solution

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

should do it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top