what I did was this:
Furtunately I still had access-log files of my web-server (Apache) for the time I had OJS 188.8.131.52 installed.
Those were in one file per week and compressed with gzip (logrotate does that for me).
As this webserver not only serves OJS I extracted just the lines concerning OJS article downloads. E.g.
zgrep 'ojs.*article/download' access_log-20160306.gz > /tmp/ojs_downloads-20160306.log
I created one ojs_downloads… file for each original access_log-file. Then I copied those files to the usageStats/stage folder (inside the files_dir configured in config.inc.php) and ran
php tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasksExternalLogFiles.xml
after changing to my OJS-installation directory.
Before you run that command please check that the Parse log files regex in the settings of the Usage Statistics plugin in Journal Management > Plugin Management > Generic Plugins
matches the format of your log-files. For “Apache combined” I used
/^(?P<ip>\S+) \S+ \S+ \[(?P<date>.*?)\] "\S+ (?P<url>\S+).*?" (?P<returnCode>\S+) \S+ ".*?" "(?P<userAgent>.*?)"/
You may have to change that if your access-log is not from Apache or not in the “combined” format.
To check if the apache-logs where imported you can use this SQL-command:
select load_id from metrics where load_id not like 'usage_events%';
which should output quite some rows with the names of the access-log files you had put into the usageStats/stage directory.
Hope this is helpful.