Closed HenryKleinschmidt closed 3 years ago
This should do it:
goaccess log --log-format='[%d:%t %^] %^ %s %^ %^ %m %^ %v "%U" [%^ %h] [%^ %b] %^"%u" "%R"' --date-format=%d/%b/%Y --time-format=%T --http-protocol=no
Thank you for your reply! But I still can't seem to get it right. I'm using the goaccess docker with a config file. I edited the options with the parameters you provided but I still get the same error.
Please make sure you have access to read the file, from your first error, it seems the account you are using does not have full access to read the file. Here's the docker command
cat access.log | docker run --rm -i -e LANG=$LANG allinurl/goaccess -a -o html --log-format='[%d:%t %^] %^ %s %^ %^ %m %^ %v "%U" [%^ %h] [%^ %b] %^"%u" "%R"' --date-format=%d/%b/%Y --time-format=%T --http-protocol=no - > report.html
Thanks. The report.html generated
Hello, I'm having trouble setting up goaccess to parse NginxProxyManager's log format.
I keep getting errors like these:
nginx: [alert] could not open error log file: open() "/var/lib/nginx/logs/error.log" failed (13: Permission denied)
Parsed 1 lines producing the following errors:
Token '[12/Apr/2021:13:26:06' doesn't match specifier '%h'
Format Errors - Verify your log/date/time format
This is a sample of my log file.
[12/Apr/2021:13:26:06 +0200] - 304 304 - GET https domain.com "/" [Client xxx.xxx.xxx.xxx] [Length 0] [Gzip -] [Sent-to 1xx.xx.xx.yy] "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:87.0) Gecko/20100101 Firefox/87.0" "-""
[12/Apr/2021:13:53:41 +0200] - 200 200 - GET https my.domain.com "/api/v3/series" [Client xxx.xxx.xxx.xxx] [Length 35893] [Gzip -] [Sent-to xx.xx.xx.yy] "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:87.0) Gecko/20100101 Firefox/87.0" "https://my.domain.com/"
Any help would be appreciated.