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
serversection of yourhttpd.confadd the directivelog style combineda.
rcctl reload httpd
-
OpenBSD Themed
-
Prompted ASN Database Download and Configuration Option
- Options for DB-IP, MaxMind Github
-
IP Exclusions for Web Monitoring
- Uptime Robot
- UpDown.io
-
Simplified shell script for single and combined log reporting output to HTML
pkg_add goaccess
- Backup
/etc/goaccess/goaccess.confand then put repository version in place
-
chmod 750 goaccess.sh -
goaccess(Uses OpenBSD theme, GeoIP, ASN, and Exclusions)- Downloads database to default
/var/db/GeoIPinstalled by the OpenBSD binary
- Downloads database to default
-
goaccess.shto create an HTML report for the current access.log (ignores goaccess.conf) -
goaccess.sh fullto combine all logs (including gzipped) into one report (ignores goaccess.conf) -
Check your
/var/loggoaccess-report-Month-Day.htmlgoaccess-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
CUSTOMIZEsection (does not permit authenticated logins) -
Once you have downloaded the ASN database via the script edit your
/etc/goaccess/goaccess.conf- Line 839
geoip-database /var/db/GeoIP/ASN.mmdb
- Line 839
-
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_URLwith 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/
