I’ve had to manually go in and clear out the user tracking tables (at least log_access, log_hosts, and log_visitors; they can get quite large over time) occasionally. Would anybody else feel that the ability to truncate certain tables, in the same manner as the admin logging table manager_log (which can be done from Audit trail), would be useful? Perhaps include the ability to dump the tables to the client before truncating them, if keeping the records is important?
That’s a wonderful idea Susan.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
- 3,250 Posts
Or maybe a function could be implimented to "prune" the table so data older than x date gets deleted on a regular basis. Also, there could be another function that saves the overall stats to a table called overall_stats for each pruning (1 line) so the admin can maintain basic overall stats over time without a massive MySQL db. In other words, the table overall_stats would contain a summary (information displayed on Visitor Stats page) without keeping the user specific data.
Good ideas Mark. I like the idea of preserving monthly stats for posterity plus having some historical daily traffic available for X months.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
Work in progress at the moment; should be ready to go in a couple more hours. Will involve replacing the existing /manager/actions/static/bkmanager.static.action.php file and adding a new /manager/processors/userlogs.processor.php file.
Since it’s a mod of the bkmanager system, you can easily dump the table before trucating it.
I’ve turned it over to the developer team, as soon as they OK it it’ll get released to "the wild".