Support for modern web statistics programs such as GoAccess
It would be nice if https://goaccess.io/ was supported for statistics.
- Written in C, so faster than a perl script such as awstats.
- Can be used in the traditional way to generate static HTML statistics pages from log files.But a more advanced integration could also provide real-time statistics.
Can you share how GoAccess is more valuable for you than, for example, Google Analytics or similar service?
Daniel Hendricks commented
FWIW, I did get this to (sort of) work with the Docker image: allinurl/goaccess
- HTML-only. No command-line use.
- I got an HTTP 400 error when I tried to visit the exposed port.
- The official image requires a configuration file which required some messing around. I could not find a maintained image that worked strictly by passing environmental variables.
- It appears that GoAccess only lets you specify one log file (?), so I had to choose between access_log and access_ssl_log (this wasn't a big deal for me since all of my traffic is HTTPS).
HOWEVER, I did get the HTML output stats to work. What I had to do:
1. I created the following directories and chown'd permissions to the user:
[path_to_web_site_root]/docker/goaccess (I put all of my persistent Docker app data under /docker/[app_name]. YMMV.)
[path_to_web_site_root]/httpdocs/goaccess (or wherever you want the reports generated)
2. Pull the Docker image in Plesk and add new container. It seems to be working with a 256MB memory limit.
3. I turned off automatic port mapping and chose my next available port (sort of irrelevant since I got the 400 error, however, I gave it a port to avoid collisions).
4. I mapped the following volumes:
/srv/data => [path_to_web_site_root]/docker/goaccess
/srv/report => [path_to_web_site_root]/httpdocs/goaccess
/srv/logs => [path_to_web_site_root]/logs
5. Created the file [path_to_web_site_root]/docker/goaccess/goaccess.conf (with this files contents: https://raw.githubusercontent.com/allinurl/goaccess/master/config/goaccess.conf) and made the following modifications per the Docker page instructions:
- log-format COMBINED
- log-file /srv/logs/access_ssl_log
- output /srv/report/index.html
- real-time-html true
I know, it's clunky, but it appears to be working. My biggest disappointment (unless there is a setting that I'm not aware of) is that I can only point to one log file in goaccess.conf (access_log or access_ssl_log). If anyone is more of a GoAccess expert and knows how to configure it (via goaccess.conf since we're not using command-line) to process more than on log file, please let me know.
GoAccess is an open source program similar to Awstats that runs on your own webserver, parses the webserver log file and generates the statistics locally.