Closed frakman1 closed 3 years ago
Answering my own question ...
In the documentation there is a reference to the translating script I need: https://github.com/stockrt/nginx2goaccess
I used it to output the correct log format:
./nginx2goaccess.sh '[$time_local] $status - $request_method $scheme $host "$request_uri" [Client $remote_addr] [Length $body_bytes_sent] [Gzip $gzip_ratio] "$http_user_agent" "$http_referer"'
- Generated goaccess config:
time-format %T
date-format %d/%b/%Y
log_format [%d:%t %^] %s - %m %^ %v "%U" [Client %h] [Length %b] [Gzip %^] "%u" "%R"
I then ran the command using '
around the values like this:
cat default.log | docker run --rm -i -e LANG=$LANG allinurl/goaccess -a -o html --log-format='[%d:%t %^] %s - %m %^ %v "%U" [Client %h] [Length %b] [Gzip %^] "%u" "%R"' --date-format='%d/%b/%Y' --time-format='%T' - > report.html
and got a beautiful html dashboard view.
The other way I tried was to install it on my Mac using brew and copy and paste the ginx2goaccess.sh
output into ~/.goaccessrc
and run with goaccess default.log
to see the terminal view.
Awesome, glad that solved your question.
Feel free to reopen it if needed.
I want to use
goaccess
with the logs from my Nginx Proxy Manager (docker:jlesage/nginx-proxy-manager
) using the standard configuration./etc/nginx/nginx.conf
contains the following log format and log locationSample log from
/config/log/default.log
:When I copied the default.log file to the host and ran it against goaccess, I get this error:
I know that I need to somehow change the
--log-format
parameter but I have no idea how. I don't know what the corresponding goaccess log format syntax should be.