GoAccess (Application)

From campisano.org
Jump to navigation Jump to search

Build

nano /etc/apt/sources.list
apt-get update
apt-get install curl gcc make autoconf libncursesw5-dev zlib1g-dev libbz2-dev libmaxminddb-dev libtokyocabinet-dev libssl-dev
apt-get clean
cd /srv
curl -kLO https://tar.goaccess.io/goaccess-1.3.tar.gz
tar -xzvf goaccess-1.3.tar.gz
rm -f goaccess-1.3.tar.gz
cd goaccess-1.3/
./configure --enable-utf8 --enable-geoip=mmdb --enable-tcb=btree --with-getline --with-openssl --prefix=/srv/local
make
make install

Minimal deps after build

apt-get install libmaxminddb0 libssl1.0.2 libtokyocabinet9

Usage

cd /srv
curl -kLO https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz
tar -vxzf GeoLite2-City.tar.gz
mv GeoLite2-City_20190305/GeoLite2-City.mmdb /srv/
rm -rf GeoLite2-City_20190305 GeoLite2-City.tar.gz

/srv/local/bin/goaccess --no-global-config --log-format=COMBINED --log-file=/srv/access.log\
 --db-path=/srv/goaccess/data --load-from-disk --keep-db-files --compression=zlib\
 --geoip-database=/srv/GeoLite2-City.mmdb --no-query-string --process-and-exit

Note

Apparently, he takes a lot of time (and Ram, +1h and ~500Mb) to parse 2GB of combined Apache log, and produces a lot of indexed data (~120MB compressed, ~500MB raw)