Database Maintenance
-
I don’t need fog to keep user tracking for eternity. It would be nice to be able to set a time frame of data to keep.
Another thing to keep things tidy would be to purge hosts that haven’t communicated in X amount of time.
Then maybe some schedule to run “optimize table” to get the benefits of those row removals.
Thanks for all the hard work!
-
@ablohowiak for both your cases, it would work best (and probably quickest) if you had/made a simple CRON script that runs the appropriate SQL commands. Not every user would want/need these features, and in general we take the approach of not making assumptions of what data users need to keep.
-
While the goal is different here, the concept is similar to this tutorial.
https://forums.fogproject.org/topic/9449/dynamic-fog-replicator-transfer-rates
You will need to create a new mysql table to accept these records and your own way to report on them. But it is for sure, possible to do.
-
Joe, that’s fine. I was just surprised at the size of my userTracking table.
What tables would be useful to locate old hosts?
-
@ablohowiak said in Database Maintenance:
What tables would be useful to locate old hosts?
hosts
andhostMAC
I can help with the SQL if you have questions. Whatever you come up with, we can probably add it to our existing list of maintenance commands with a little description for each one:
https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_MySQL