Goaccess: Help with guicorn log format

Created on 22 Jul 2018  路  2Comments  路  Source: allinurl/goaccess

Hey,

I've been trying to write a custom log-format for the access log. Got something working, but the numbers in the report don't add up, so I'm guessing I've done something wrong.

A line from the log:

[2018-07-21 20:00:30] [INFO ] [gunicorn.access:24588] GET /page/1 HTTP/1.1 - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36' 200 - 0.055556 127.0.0.1

In addition to chrome I've also used curl.

What I've been running:

cat webui.log | grep gunicorn.access | goaccess --log-format='[%d %t] [%^] [%^] %^ %r %H - %u %s - %L %h' --date-format=%Y-%m-%d --time-format=%H:%M:%S - -o ~/Desktop/report2.html

I've got 1000 lines for testing with
924 lines of status 200
32 lines of status 500
44 lines of status 404

76 lines with failed (500 and 404)

report2.html
says 922 good requests, 78 failed.

All browsers are listed as Unknown or Other. The 404 section is empty. OS is unknown.

HTTP status codes:
912 2xx
8 5xx
404 not listed.

What can I do to get all the data parsed?

lodattime format question

Most helpful comment

Give this a shot:

goaccess access.log --log-format="[%d %t] [%^] [%v] %m %U %H %^ '%u' %s %^ %T %h" --date-format=%Y-%m-%d --time-format=%T

All 2 comments

Give this a shot:

goaccess access.log --log-format="[%d %t] [%^] [%v] %m %U %H %^ '%u' %s %^ %T %h" --date-format=%Y-%m-%d --time-format=%T

Amazing, work like a charm. Thank you so much. Burnt so much time on this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vivekkrish picture vivekkrish  路  3Comments

securixhk picture securixhk  路  3Comments

ArunDahiya1 picture ArunDahiya1  路  3Comments

Gill-Bates picture Gill-Bates  路  3Comments

tbarbette picture tbarbette  路  3Comments