Log Import Process explanation


#1

Every hour I run from cron:


python /usr/share/nginx/www/site/piwik/misc/log-analytics/import_logs.py --url=http://www.site.com/stats --idsite=1 --recorders=1 --enable-http-errors --enable-http-redirects --enable-static --recorder-max-payload-size=200 /var/log/nginx/site.com_access.log

And then 10 minutes later:


/usr/bin/php5 /usr/share/nginx/www/site/piwik/console core:archive --url='http://www.site.com/stats/'

Is this the right way to import logs? It’s working, but the log output always shows some 20,000 requests imported, far more than happened in the last hour, afaict. Is it importing every single log each time? How do I just import the latest ‘since the last import’ set of logs?

It also then instructs me to do the following, in the logimport log:


In order for your logs to be processed by Piwik, you may need to run the following command:
     ./console core:archive --force-all-websites --force-all-periods=315576000 --force-date-last-n=1000 --url='http://www.site.com/stats'

Which I’ve done before once or twice, but is covered by the cron run 10 minutes after the import, right?


#2

Quick bump… am I right that logimport brings in the whole log-set every time? Is it possible to reduce that?

Thanks.