-
- Download statistics stop working
- Usage stats shows 0 in the downloaded files
- Download data is not yet available
- How to get the Usage Statistics plugin to work
- OJS statistics views are 0
- usageEventLogs files are not moved to stage folder
Checklists
- Visit Statistics > Articles in the backend, do you see any statistics?
- Check PHP error log for details on those 500 errors
- Check that base_url in config.inc.php is set correctly
- Check log files in the usageStats/usageEventLogs directory (inside your OJS files_dir)
- Check whether dB metrics is updating.
- In the SQL database, see if there are row(s) for in the metrics table for the journal. If the journal id is 1, use the following SQL:
select count(*) from metrics where context_id=1
If there are no metrics, your instance may not be set up to process the usage stats logs.
- In the SQL database, see if there are row(s) for in the metrics table for the journal. If the journal id is 1, use the following SQL:
- Check to see if there is a scheduled task registered for the metrics.
select * from scheduled_tasks;
You should see a listing for plugins.generic.usageStats.UsageStatsLoader. If you do have that listing, your instance may not be running its scheduled tasks and may not have the correct plugins installed.
- If UsageStatsLoader is running check whether log files being written and the plugin can find the log files for processing.
- Look in files_dir (defined in config.inc.php) and look for the usageStats directory. In particular, look for log files in: usageStats > usageEventLogs
- When the usage stats are processed, they are taken out of this directory for processing. You should only see logs since the last run.
- Check usageStats > archive directory.
- If everything looks okey
- Lets check the journal ID
select journal_id from journals where path="JOURNALPATH";
- If it is 1. Then check a usage event log:
select * from metrics where context_id=1 and load_id="usage_events_20221113.log" limit 10;
If there are no entries for that, open up usageStats/archive/usage_events_20201113.log and see if there are any entries for the JOURNALPATH journal.
- Lets check the journal ID
A quick test. Copy an old usageStats/archive log file into usagestats/stage and run:
php tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasks.xml
Check the metrics table in the database. A new record should be added to the metrics table.