Skip to main content

Dear Centreon,

 

Today, in 24.04, when we delete a service or even a host, all metric and performance data from these services and hosts is retained in the MySQL database for the duration of the configuration set in the "Retention duration for performance data in MySQL database" menu.

 

This means that if you want to keep the history of your active objets for two years or more, the objects supposed to be deleted, will not be deleted during the same periode for all these years, unnecessarily filling your disks with completely useless data that is supposed to be deleted as it should be.

 

For my part, I have “deleted” 40,000 services that could free up 2/3 of the DB's disk space if this data were really deleted as they should.

 

I propose that the "Retention duration for performance data in MySQL database" menu should not apply to deleted objects and that these should be purged immediately or, if necessary, with a second field allowing select a much shorter retention time for these data must to be deleted.

 

Thanks a lot.

Hi ​@jstager, I suppose you talk about centreon_storage.data_bin table?

It's due to a performance issue that we're not deleting the data.
Requesting the deletion of metrics from a service is very resource-intensive because all entries must be retrieved via a full scan of this table.

What retention period have you scheduled and for what purpose?

Regards,


NewDiscussion ongoing

Dear ​@Laurent ,

Indeed, this is the right table.

 

I configured the retention for 730 days to have sufficient history for my services.

But for my supposedly “deleted” data, I don't want retention; this data can be immediately purged to free up space .


But I understand that other Centreon users would prefer to keep retention of their deleted data.
I don't know exactly in what context they would need to recover deleted objects and their value, but I saw a thread on TheWatch from someone who would like to have a recycle bin menu to recover deleted items…


That's why I suggested that this retention of deleted data could be configured separately according to each user's preferences.

 

Thanks a lot


Hi ​@jstager 

I understand that you want to automatically delete entries from the data_bin table when resources are deleted, but as I said, this consumes a lot of resources and will slow down database performance.

For what purpose(s) do you need to keep 2 years of data?

Regards


Hi ​@Laurent ,

We need to keep our history datas for 2 years, this cannot be changed.

I don't understand the excuse of resource consumption slowing down the base, why ?

Are you telling me that Centreon never purges its database ?

and the space used by this useless data will only increase ?

 

From my understanding, this purge is performed on the "Retention duration for performance data in MySQL database" value, so it already runs every day.

Having a value of 720 days like mine or 1 day doesn't aggravate resource consumption since it already runs every day, right?


On the contrary, quickly purging data that's supposed to be deleted would save resources since it would no longer be necessary to check whether it's necessary to keep or purge it.


For example, in my case, I have 9.1K of active services and around 40K of services that are supposed to be deleted.
If these 40K were already purged, it would no longer be necessary to check every day whether they have reached the retention duration.


My proposal therefore also seems to be a performance gain in addition to saving disk space.

 

Thanks