Created
August 11, 2024 15:34
-
-
Save MichaelBelousov/010f098111e76f63dca107db18b70d7d to your computer and use it in GitHub Desktop.
goaccess all nginx access logs with filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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