GoAccess is an open source real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
It provides fast and valuable HTTP statistics for system administrators that require a visual server report on the fly.
OpenBSD has some quirks dealing with log formats so to make it easier I have made a preconfigured goaccess.conf and some simple shell scripts to execute commands that work with the default package version of GoAccess provided by OpenBSD using self same conventions.
Log Style Combined
Inside the server
section of your httpd.conf
add the directive log style combined
a. rcctl reload httpd
OpenBSD Themed
Prompted ASN Database Download and Configuration Option
IP Exclusions for Web Monitoring
Simplified shell script for single and combined log reporting output to HTML
pkg_add goaccess
/etc/goaccess/goaccess.conf
and then put repository version in placechmod 750 goaccess.sh
goaccess
(Uses OpenBSD theme, GeoIP, ASN, and Exclusions)
/var/db/GeoIP
installed by the OpenBSD binarygoaccess.sh
to create an HTML report for the current access.log (ignores goaccess.conf)
goaccess.sh full
to combine all logs (including gzipped) into one report (ignores goaccess.conf)
Check your /var/log
goaccess-report-Month-Day.html
goaccess-total-report.html
After you've made your first reports you can choose to get more out of your logs and GoAccess
Add your ASN provider in the CUSTOMIZE
section (does not permit authenticated logins)
Once you have downloaded the ASN database via the script edit your /etc/goaccess/goaccess.conf
geoip-database /var/db/GeoIP/ASN.mmdb
Using with MaxMind Data on a free account
GeoIP Country Data: Copy database to /var/db/GeoIP/GeoLite2-Country.mmdb
GeoIP City Data: Download database to /var/db/GeoIP/GeoLite2-City.mmdb
1. Insert into `goasscess.conf` line 840 `geoip-database /var/db/GeoIP/GeoLite2-City.mmdb`
MaxMind ASN Autoupdate requires this ASN_URL
with your license key added to the URL
Change shell script as needed. Add any options for the shell script, some popular ones:
--exclude-ip='216.144.248.23'
--unknowns-log=<filename>
--invalid-requests=<filename>
LICENSE
GoAccess Tools for OpenBSD © 2023 by Elias Christopher Griffin is licensed under CC BY-NC-SA 4.0. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/