Skip to content

Instantly share code, notes, and snippets.

@MichaelBelousov
Created August 11, 2024 15:34
Show Gist options
  • Save MichaelBelousov/010f098111e76f63dca107db18b70d7d to your computer and use it in GitHub Desktop.
Save MichaelBelousov/010f098111e76f63dca107db18b70d7d to your computer and use it in GitHub Desktop.
goaccess all nginx access logs with filter
# time-format %T
# date-format %d/%b/%Y
# log_format %h %^[%d:%t %^] "%r" %s %b "%R" "%u" %T %^
( cat /var/log/nginx/access.log
for i in /var/log/nginx/access.log.*.gz
do
sudo gunzip -c $i
done
) \
| grep -v bot \
| goaccess --config-file ./goaccess-nginx.config --ignore-crawlers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment