piwik python cron job for importing log files

Discussion in 'General' started by Mef-isp, Feb 15, 2017.

  1. Mef-isp

    Mef-isp New Member

    I have a problem to import logfiles from ispconfig logs into a piwik site at the same server.
    The cron itself works, I tried touch /tmp/test; and test is created.
    I have enabled python and cron (Full cron) in reseller/client and enabled python on the piwik site.
    I tried the command:
    /usr/bin/python /var/www/clients/client9/web56/web/piwik/misc/log-analytics/import_logs.py --url=https://mypiwik/ --idsite=30 --recorders=1 --enable-http-errors --enable-http-redirects --enable-static --enable-bots `date --date=yesterday +/var/www/clients/client9/web60/log/\%Y\%m\%d-access.log`

    I see that private/cron.log is filled with piwik help info. The cron_error.log is empty.
    Does anyone knows how to do this?
    FYI: I followed: https://github.com/piwik/piwik-log-analytics:
    0 1 * * * /path/to/piwik/misc/log-analytics/import-logs.py -u piwik.example.com `date --date=yesterday +/var/log/apache/access-\%Y-\%m-\%d.log`
    as an example

    I do not know what happened, but at the time of writing is worked???
    Hope it helps someone.

    Last edited: Feb 15, 2017

Share This Page