How to configure Dataset Retention Value?
Answer
Note: This setting is available only for Snapshot Datasets.
The Data Retention setting controls the number of Dataset instances saved in the dashboard.dataset_instance
table by setting the value of instances_to_keep
in the dashboard.dataset
table. The calculation process is as follows:
- Upon data collection, MI collects values for a Dataset x
-
The Dataset data is inserted into the
dashboard_dataset.dataset_x
table -
An entry with information about the new Dataset instance is inserted into the
dashboard.dataset_instance
table -
The measurement time is saved to the
measurement_time
field of thedashboard.dataset_instance
-
The system checks the value of
instances_to_keep
for Dataset x in thedashboard.dataset
table:-
If the number of Dataset x instances in
dashboard.dataset_instance
is greater than the value ofinstances_to_keep
, the redundant instances of Dataset x are removed from thedashboard.dataset_instance
table based on the value ofmeasurement_time
(the oldest ones are removed first)
-
If the number of Dataset x instances in
A default value for Dataset Retention can be set using the DATASET_DEFAULT_MAX_INSTANCES_NUMBER config variable.
Note: If the value of DATASET_DEFAULT_MAX_INSTANCES_NUMBER is changed, only the new datasets are impacted that were created after the config variable's value has been changed.