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.

In “Reporting > Business Intelligence > General options > Data retention”, the data retention can be managed by:

  • Type of data (availability, performance)

  • Precision of data (raw data, hourly, daily or monthly values)

Note

Before enabling the data retention options, check that the option “Reporting engine uses a dedicated MySQL server” is correctly set to “Yes” the menu “Reporting > Business Intelligence > General options > ETL options”.

Enable the data retention management by selection “Yes”, then specify the retention period for each type and precision of statistic data (example below).

../_images/bi_retention.png

To activate the automatic purge of old data, edit the cron “/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

Warning

Avoid the period on which the statistic calculations and the report generations are daily scheduled.

You can execute this cron daily or weekly, depending on the execution time of the batch and the load generated on the server.

Finaly restart the service cron:

service crond restart

BEST PRACTICE: Select different retention periods in function of the precision of the statistic data:

  • Hourly aggregated values are used to analyze a metric in a near period. You may not need to keep these statistics more that 2 or 3 months

  • Past 5 or 6 months, you may just need to see a trend on the availability or performance statistics. You can then keep daily aggregated values 6 months for example and have a retention of several dozen of months of monthly aggregated data

Please go to the next chapter to continue the installation.