Skip to main content

Raymii.org Raymii.org Logo

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

Ansible playbook for GoAccess Log Analyzer

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


❗ This post is over nine years old. It may no longer be up to date. Opinions may have changed.

Table of Contents


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

Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics. Please, if you found this content useful, consider a small donation using any of the options below. It means the world to me if you show your appreciation and you'll help pay the server costs:

GitHub Sponsorship

PCBWay referral link (You get $5, I get $20 after you've placed an order)

Digital Ocea referral link ($200 credit for 60 days. Spend $25 after your credit expires and I'll get $25!)

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-key module because that failed for unknown reasons). It installs goaccess and xz- utils (for zcat), deploys a config file and adds a hourly cronjob to parse the latest log file. You might need to change the logfile path. There is also a nightly cronjob which uses zcat to parse all (rotated) logs into a big report.

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