1

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.

1 Answer 1

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

should do it.

Sign up to request clarification or add additional context in comments.

2 Comments

Updated answer so it parses only requests.
GoAccess v0.7 has the ability to remove the query string with -q.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.