Purge old zmstats data
How to purge old zmstats data?
Stats data under "/opt/zimbra/zmstat" taking large disk space.
ZCS server never purges the stats data, and retention for zmstats is controlled by the localconfig key "zmstat_max_retention".
By default zmstat_max_retention is set to 0 (zero), and because of that "zmstat-cleanup" command is giving following warning.
zimbra@mail:~$ /opt/zimbra/libexec/zmstat-cleanup WARNING: zmstat_max_retention is set to 0 or is undefined. No zmstat data has been pruned. zimbra@mail:~$
These are the available options with the zmstat-cleanup.
zimbra@mail:~$ /opt/zimbra/libexec/zmstat-cleanup -h Usage: /opt/zimbra/libexec/zmstat-cleanup [-k <keep count>] [-h] [-l] [-p] -h|--help Help/usage information -k|--keep Number of archived copies of zmstat data to retain. -l|--list Generate a listing of log dates archived. -p|--purge Purge ALL archived zmstats data.
With the help of the following commands, we can keep zmstats data of selected day's without changing localconfig key.
/opt/zimbra/libexec/zmstat-cleanup -k "keep count"
Keep zmstats data of 300 days.
/opt/zimbra/libexec/zmstat-cleanup -k 300
|Submitted by: Heera Singh Koranga|