Can the collection of usage statistics data on the admin page be triggered remotely?

I'd like to have the usage statistics generated on a regular basis for tracking purposes and publication to wallboards.

This requires the ability to schedule the data to be collected at regular intervals.  I can write a script and have cron perform the download of the statistics for me.  But unless I manually click on the "collect now" button, the data is not updated.

Please let me know if there is an api/plugin/etc that I have missed, that would enable me to trigger new data collection.

Many Thanks!

Comment actions Permalink

Hi Janis

Which values are you interested in?

There is no official way to automate this action. But you emulate the button clicking by sending simillar HTTP request from your script.
Accessing Server by HTTP article provides many such examples. For your task it should be POST request to /admin/usageStatistics.html address with forceCollectingNow=true value.

Comment actions Permalink

Thank you for the wicked fast reply.  This is exactly what I needed.  I've written a shell script to make the wget post and then setup cron to run that script at the same time every week.

I am one happy camper now.  Many Thanks!


Please sign in to leave a comment.