Log analytics piping in Apache #6405
Labels
duplicate
For issues that already existed in our issue tracker and were reported previously.
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone
Trying to get direct piping of log analytics to work on an Apache 2.4.7 / Ubuntu 14.04 system.
From looking at issues #3757, #3163 and #6200 something like this in the Apache conf file should work:
CustomLog "|/usr/bin/python -u /var/www/piwik/misc/log-analytics/import_logs.py --url=http://testsrv/piwik/ - --idsite=1 --log-format-name=common_vhost" vhost_combined
But this doesn't add any data to Piwik (checked in PMA, and accordingly nothing in the web UI). Adding
--output=/var/log/piwik/test.log
or checking Apache's error.log doesn't provide more clues (I can provoke errors in both files by using incorrect syntax or unknown option names).The access log is in the vhost_combined format and the following as root does work:
tail -n1 access.log | /usr/bin/python -u /var/www/piwik/misc/log-analytics/import_logs.py --url=http://testsrv/piwik/ - --idsite=1 --log-format-name=common_vhost
It correctly adds the last page hit ("1 requests imported to 1 sites"), but when omitting the last option (--log-format-name=common_vhost) it gives:
I've tried various permutations, verbosely copying from misc/log-analytics/README.md and the threads linked above (especially since #3757 concludes that something somehow does work), but can't get a clear handle on what is going wrong. It looks as if it should be working, so any hints or an up to date how-to are appreciated.
The text was updated successfully, but these errors were encountered: