Knowledge BaseMetric InsightsMetrics & Reports Data CollectionHow to configure Dataset Retention Value?

How to configure Dataset Retention Value?

Question

How does the Data Retention setting work and how to set a default value for it?

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:

  1. Upon data collection, MI collects values for a Dataset x
  2. The Dataset data is inserted into the dashboard_dataset.dataset_x table
  3. An entry with information about the new Dataset instance is inserted into the dashboard.dataset_instance table
  4. The measurement time is saved to the measurement_time field of the  dashboard.dataset_instance
  5. The system checks the value of instances_to_keep  for Dataset x  in the dashboard.dataset table:
    • If the number of Dataset x instances in dashboard.dataset_instance is greater than the value of instances_to_keep, the redundant instances of Dataset x  are removed from the dashboard.dataset_instance table based on the value of measurement_time (the oldest ones are removed first)

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.