Reputation: 625
I'm trying to get goaccess working. Already take some time on docs and examples but without success.
Basically i have log lines like:
10031488_71334 xpto.domain.com 88.103.999.999 - - [16/Jun/2013:15:03:26 +0000] "GET / HTTP/1.1" 500 5624 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0" -
and already compile goaccess and create a conf file:
cat ~/.goaccessrc
date_format %d/%b/%Y:%T %z
log_format %^ %^ %h - - [$d] "%r" %s %b "%R" "%u" %^
Then i got:
./goaccess -a -f miniout.log
GoAccess - version 0.6 - Aug 5 2013 20:20:16
An error has occurred
Error occured at: goaccess.c - render_screens - 358
Message: Nothing valid to process.
Any help? Thanks.
Upvotes: 4
Views: 5712
Reputation: 11
First, review you log configuration in httpd.conf or into the sites configuration files for vhost.
then follow the next logics.
combinedvhost apache log format configuration:
%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\
to goaccess:
apache - what is? - how in goaccess
%v - vhost - %^ ignore it
%h - host - %h
%l - hyphen - %^ ignore it
%u - user - %^ ignore it
%t - timestamp - [%d:t% %^] ignore the zone from apache log
%r - request - %r
%s - status - %s
%b - size - %b
%{referer}i - request header - %R
%{UAgent}i - user agent - %u
goaccess.conf
log-format %^ %h %^ %^[%d:%t %^] "%r" %s %b "%R" "%u"
Note that in %r, %R and %u you will need "", because those are text fields (i think)
Note that between %u and date, there is not space (i do not know why...)
with:
time-format %H:%M:%S
date-format %d/%b/%Y
Reference:
https://httpd.apache.org/docs/2.2/logs.html
Upvotes: 1
Reputation: 726
If you don't want to use the global options use --no-global-config option with goaccess. I am using this to process my log files on a day by day basis:
grep --color=auto `date +"%d/%b"` /var/log/nginx/sitename.access.log | goaccess --no-global-config > report.html
goaccess version : 0.8
Upvotes: 2
Reputation: 625
Solved by log format change to:
log_format %^ %^ %h %^[%d:%^] "%r" %s %b "%R" "%u"
date_format %d/%b/%Y
Upvotes: 1