Victor Walch Michnowicz

is a web application developer

Parse Nginx Access Logs With GoAccess January 18th, 2017

I first tried the guide from Albert Causing. It kinda worked, but the HTTP requests were wrong and some other things were screwy. Here is the config I used:
time-format %H:%M:%S
date-format %d/%b/%Y
log-format %h - - [%d:%t %^] "%m %U %H" %s %b "%R" "%u"
This config works to parse Nginx access logs like the following:
199.121.111.60 - - [18/Jan/2017:12:49:06 -0600] "GET /one.php?day=2 HTTP/1.1" 200 111383 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17"
31.132.233.13 - - [18/Jan/2017:12:49:06 -0600] "POST /two.php?year=2017 HTTP/1.1" 200 1540 "http://www.google.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17"

blog comments powered by Disqus