Provide archival status via API or Web UI

I’ve been doing a lot of work lately to try to get the auto-archiving working smoothly on my installation so that I can handle the volume of data we are dealing with. One key thing I’ve noticed is that when the archival job starts failing, there is no indication on the Web UI that the zeros for stats are because the archiving hasn’t run.

It would be really, really useful if the archival process would log when it last completed into a table and then have an API call that allows you to check when it last run. This could then be used on the dashboard to flag when the archival isn’t running behind the scenes like it should. It could also be used by monitoring software to alert when the archival is failing.

The other thing that occurs to me here is that the archival process seems to have a fair number of setups to it that are making the archive.sh script more complex. Perhaps an API call that is a DoAllAutoArchiving is in order so that the multiple calls the the PHP engine don’t have to be made and the scheduling script could be simplified?

See the request; Log Viewer, used to monitor cron tasks, performance · Issue #2473 · matomo-org/matomo · GitHub

There is a new archive.php script that will the archiving job much more efficiently, it will be released in the next version 1.7 in 1 month or so