Skip to content

OpenBSD theme for GoAccess Web Log analyzer with prompted ASN database download matching a pre-configured conf which excludes Web Monitoring services and also generates HTML reports.

License

Notifications You must be signed in to change notification settings

wravoc/goaccess-openbsd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoAccess Tools for OpenBSD 7.3

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.


Summary

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.

Requirements

Log Style Combined

  1. Inside the server section of your httpd.conf add the directive log style combined

    a. rcctl reload httpd

Features

  • OpenBSD Themed

  • Prompted ASN Database Download and Configuration Option

    • Options for DB-IP, MaxMind Github
  • IP Exclusions for Web Monitoring

  • Simplified shell script for single and combined log reporting output to HTML

Obtain

  1. pkg_add goaccess

Backup

  1. Backup /etc/goaccess/goaccess.conf and then put repository version in place

Execute

  1. chmod 750 goaccess.sh

  2. goaccess (Uses OpenBSD theme, GeoIP, ASN, and Exclusions)

    1. Downloads database to default /var/db/GeoIP installed by the OpenBSD binary
  3. goaccess.sh to create an HTML report for the current access.log (ignores goaccess.conf)

  4. goaccess.sh full to combine all logs (including gzipped) into one report (ignores goaccess.conf)

  5. Check your /var/log

    1. goaccess-report-Month-Day.html
    2. goaccess-total-report.html

Customize

After you've made your first reports you can choose to get more out of your logs and GoAccess

  1. Add your ASN provider in the CUSTOMIZE section (does not permit authenticated logins)

  2. Once you have downloaded the ASN database via the script edit your /etc/goaccess/goaccess.conf

    1. Line 839 geoip-database /var/db/GeoIP/ASN.mmdb
  3. Using with MaxMind Data on a free account

    1. GeoIP Country Data: Copy database to /var/db/GeoIP/GeoLite2-Country.mmdb

    2. 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`
    
    1. MaxMind ASN Autoupdate requires this ASN_URL with your license key added to the URL

      https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN&license_key=YOUR_LICENSE_KEY&suffix=tar.gz

      
      
  4. 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/

About

OpenBSD theme for GoAccess Web Log analyzer with prompted ASN database download matching a pre-configured conf which excludes Web Monitoring services and also generates HTML reports.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages