diff --git a/HowtoGoAccess.md b/HowtoGoAccess.md index 9f711c19..382ae451 100644 --- a/HowtoGoAccess.md +++ b/HowtoGoAccess.md @@ -60,6 +60,32 @@ Pour avoir un access de 12h à 16h du 1er Fevrier : # goaccess -f goaccess.tmp -a -o html ~~~ +# Interface web + WebSocket + +Pour avoir le suivi en temps réel dans un navigateur, on peut créer une unité systemd qui lancera GoAccess et sa WebSocket. + +`/etc/systemd/system/goaccess.service`. + +~~~ +[Unit] +Description=GoAccess real time web stats. +After=network.target + +[Service] +ExecStart=/usr/bin/goaccess -p /etc/goaccess/goaccess.conf /var/log/haproxy.log -o /var/www/goaccess.html --real-time-html --daemonize +Type=forking +User=goaccess + +[Install] +WantedBy=default.target +~~~ + +~~~ +# systemctl daemon-reload +# systemctl enable goaccess +# systemctl start goaccess +~~~ + # Erreur ~~~