Data retention management¶
The reporting server contains statistics tables specific to Centreon MBI in the database “centreon_storage”. The storage space used by these tables increases every day. It is possible to control the size of these tables by setting data retention rules.
Under “Reporting > Monitoring Business Intelligence > General options > Data retention”, data retention can be managed by:
- Type of data (availability, performance).
- Precision of data (raw data, hourly, daily or monthly values).
Before enabling the data retention options, check that the “Reporting engine uses a dedicated MySQL server” option is correctly set to “Yes” in the “Reporting > Business Intelligence > General options > ETL options” menu.
Enable data retention management by selecting “Yes”, then set the options in the configuration (example below).
To activate automatic purge of old data, edit the cron file “/etc/cron.d/centreon-bi-purge” on the reporting server, then remove the comment in the following line:
#0 20 * * * root @CENTREON_BI_HOME@/*etl*/dataRetentionManager.pl >> @CENTREON_BI_LOG@/dataRetentionManager.log 2>&1
Avoid periods scheduled for statistical calculations with Centreon MBI ETL and report generations.
You can run this cron daily or weekly, depending on the execution time of the batch and the load generated on the server.
Then restart the service cron:
systemctl restart crond
BEST PRACTICE: Select different retention periods according to the granularity of the statistical data:
- Hourly aggregated values are used to analyze a metric over a short period. You may not need to keep these statistics more that two or three months.
- Beyond five or six months, you may only need to view the trend for availability or performance statistics. You could then keep the daily aggregated data for a maximum of six months, for example, and configure the retention of monthly aggregated data for a period of several dozen months.
Please go to the next chapter to continue the installation.