Last active
August 24, 2023 12:21
-
-
Save corentinbettiol/b65239f12d9262b5a50ebe99e3ce0e45 to your computer and use it in GitHub Desktop.
Goaccess script to get a real-time html page with hostnames in requests.
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
tail -q -n +0 -f \ | |
/var/log/apache2/logs-for-website-1.log \ | |
/var/log/apache2/logs-for-website-2.log \ | |
/var/log/apache2/logs-for-website-3.log \ | |
/var/log/apache2/logs-for-website-4.log \ | |
| awk '$8=$1$8' \ | |
| goaccess \ | |
--log-format='%v %h %l %u [%d:%t +%^] \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"' \ | |
--date-format=%d/%b/%Y \ | |
--time-format=%T \ | |
--anonymize-ip \ | |
--anonymize-level=2 \ | |
--html-report-title="Global stats" \ | |
--html-refresh=15 -o /var/www/html/stats/index.html \ | |
--real-time-html - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment