Piwik zeroes stat for past days


#1

Hi, I have 2 issues:
1.
I did installed Pwik 1.12 few months ago, all works fine, but when I try to import logs manually through importlogs.py, it removes statistics for $(BINGDATE - 1 day).
For example, if I have statistics till 5 Jan 2014, I want to import logs from 6 Jan to 9 Jan. I run script

importlogs.py --idsite=1 --recorders=16 --url=http://example.com/piwik/ /var/log/apache2/access_log

with access log file containing queries from 6 to 9 January. Then, run archive.php. After this go to Piwik, and what we see? Correct statistics till 4 Jan, ZERO visits for 5 Jan, and correct visits from 6 to 9 Jan 2014. This problem did not disappeared after update to Piwik 2.0.2

Like the same as first issue:
Log rotate set up to rotate logs weekly, yesterday I recovered statistics from all my archive access_log’s in Piwik. But today, there is no any visits from 4 Jan till today, but they was imported by me yesterday. If this can help you to solve problem, current log file begins at 05 Jan 03AM.

Server info:
RHEL 6.4 x86_64 with latest updates;
Piwik installed to its owned directory, running at Apache 2.2.15 (backend), nginx 1.4.1 at frontend, MySQL (Percona) 5.5.31-30.3;


(Matthieu Aubry) #2

It doesnot remove stats, simply invalidate them because some older stats were imported in piwik from your logs. simply run the archive.php after importing logs: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo


#3

[quote=matt]
It doesnot remove stats, simply invalidate them because some older stats were imported in piwik from your logs. simply run the archive.php after importing logs: http://piwik.org/docs/setup-auto-archiving/[/quote]

Hi matt.
Yes, cronjobs are present in server, every hour they process my logs. Initialy, import_logs.py imports data to piwik, after all sites proceed, archive.php does him own job, automatically, every hour.
At 10 Jan I visited piwik, and saw that there’s NO ANY visits from 4 Jan till 10 Jan.
I did nothing, leave as is. But today at 13 Jan, statistics did not present only at 4 Jan, 0 visits and no data.

In table “piwik_archive_numeric_2014_01” WHERE date1 = ‘2014-01-04’ result is only 4 rows, but for 5 Jan result is 868 rows.

P.S.:Rotating for access logs enabled to weekly, does this information help to solve my problem?