1

Just installed goaccess, and i want to parse nginx log, but can't understand how to make right log-format. In nginx.conf i have this format

'$server_addr $server_port $remote_addr $request_time $upstream_response_time $time_iso8601 $request  $status $body_bytes_sent';  

And a peace of log from file

192.168.2.35 8382 192.168.2.98 38.547 38.547 2016-01-14T13:30:22+02:00 POST /test/search?id=4587252-16 HTTP/1.1 200 4185  

In the goaccess conf file, i have this format

date_format %Y/%m/%d  
time-format %H:%M:%S  
log-format %h %^ %r %T %^ %^ %r %s %b  

but get an error

"Nothing valid to process. Verify your date/time/log format"

Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
user3904465
  • 41
  • 2
  • 8

1 Answers1

1

You may try this format:

log-format %^ %^ %h %T %^ %dT%t+%^ %m %U %H %s %b
date-format %Y-%m-%d
time-format %H:%M:%S
Kayla
  • 899
  • 2
  • 6
  • 16
  • Thanks. I have made it before your wrote this.. but in your template i see in "Bandwidth" only 0 bytes... Whatever, thanks for help – user3904465 Jan 25 '16 at 14:50