Hi all,
I’ve setup some cronjobs which imports my log files daily into a dev system which runs along side my normal system. The regular one uses the javascript code to track normally, the “dev” system is really only for comparison.
I’m using the code below which is included in a file in /etc/cron.daily/:
python /path/to/piwik/misc/log-analytics/import_logs.py --url=https://piwikdev.example.com/ --enable-reverse-dns --recorders=4 --enable-bots --useragent-exclude='check_http/v1.4.16 (nagios-plugins 1.4.16)' --useragent-exclude='Apache (internal dummy connection)' --add-sites-new-hosts /var/log/piwik/access_log-$(date +%Y%m%d).gz
php /path/to/piwik/misc/cron/archive.php --url=https://piwikdev.example.com/
Now my cron sends me emails daily when this runs and it’s interesting to see the info but not really needed, is there a way I can get this to maybe log to a file but send me a email if something does error or go wrong?
Any help would be great!
Cheers,
Mooash