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.

2
  • Updated answer so it parses only requests.
    – Kayla
    Commented Nov 22, 2013 at 2:41
  • 5
    GoAccess v0.7 has the ability to remove the query string with -q. Commented Dec 21, 2013 at 17:02

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.