Skip to main content

Raymii.org Logo (IEC resistor symbol)logo

Quis custodiet ipsos custodes?
Home | About | All pages | RSS Feed | Gopher

Ansible playbook for GoAccess Log Analyzer

Published: 17-01-2016 | Author: Remy van Elst | Text only version of this article


Table of Contents


This is a small Ansible playbook to deploy the GoAccess log analyzer on Debianbased systems. Next to Piwik, I use goaccess myself to get better insights inwho and what visits my servers. This role is ment to be included in yourwebserver playbooks.

If you like this article, consider sponsoring me by trying out a Digital OceanVPS. With this link you'll get $100 credit for 60 days). (referral link)

Playbook

The role can be found here in my github account:https://github.com/RaymiiOrg/ansible/tree/master/goaccess.

It requires little change. It adds the goaccess apt-key. (Not with the apt-keymodule because that failed for unknown reasons). It installs goaccess and xz-utils (for zcat), deploys a config file and adds a hourly cronjob to parsethe latest log file. You might need to change the logfile path. There is also anightly cronjob which uses zcat to parse all (rotated) logs into a big report.

Tags: ansible, deployment, devops, goaccess, nginx, python, software