1. Home
  2. Docs
  3. ClusterControl
  4. Administration
  5. Housekeeping

Housekeeping

ClusterControl monitoring data will be purged based on the value set at ClusterControl → Settings → General Settings → History (default is 7 days). Some users might find this value to be too low for auditing purposes. You can increase the value accordingly however, the longer collected data exist in the CMON database, the bigger space it needs. It is recommended to lower the disk space threshold under ClusterControl → Settings → Thresholds → Disk Space Utilization so you will get an early warning in case the CMON database grows significantly.

There’s an option to define how long the data should be kept. In the cmon configuration file (/etc/cmon.d/cmon_X.cnf, where X is the cluster id) you can use save_history_days and pass how many days of the history you would like to keep. Please keep in mind you have to restart cmon (service cmon restart​) to apply the change. If you need to take immediate action, you can truncate cmon_job, cmon_job_message and cmon_log_entries tables.

The CMON process has internal log rotation scheduling where it will log up to 5 MB in size before archiving /var/log/cmon.log and /var/log/cmon_{cluster ID}.log. The archived log will be named as cmon.log.1 (or cmon_{cluster ID}.log.1) sequentially, with up to 9 archived log files (total of 10 log file rotation).

If you have configured a very short interval recurring jobs like backup jobs running every hour, it would produce lots of job activities. We suggest lowering the controller job history retention period, to like 1 or 2 days. It can be done using the save_history_days=1 configuration option, set it into /etc/cmon.d/cmon_{clustre ID}.cnf, and restart CMON to apply the changes. The controller only keeps the last two days of job history. The default value is 7.

See also

ClusterControl Controller Configuration Options or cmon --help-config output.

Was this article helpful to you? Yes No