Configuring the Analytics data retention policy

Based on your business needs, you may want to change the data retention policy for certain types of data. The data retention policies are configured through direct manipulation of the meta_setting table in the data warehouse ("reporting") database.

Column setting_value specifies the number of days for which a given type of data is kept.

Values in column setting_name are as follows:

To see the data retention setting in the meta_setting table, perform the following:

  1. Log in to the Analytics reporting database as the root user or a user with administrative permissions.
    mysql -u root reporting
  2. Enter the following command:
    select * from meta_setting where setting_name in
    ('daily_retention_days','raw_retention_days','event_retention_days',
    'hourly_retention_days');

    A table similar to the following is displayed:

     setting_key setting_name setting_value  setting_description
    1 daily_retention_days 365 Days to keep daily aggregation data.
    2 raw_retention_days 30 Days to keep raw fact data.
    3 event_retention_days 365 Days to keep event data.
    10 hourly_retention_days 90 Days to keep hourly aggregate data.
    The value displayed in the setting_value column specifies the number of days for which the data is kept for the given type of data.
    • Raw, Hourly, and Daily retention refer to performance data only.
      • Raw indicates the lowest resolution of extracted performance data (typically 5 minute data).
      • Hourly and Daily represent hourly and daily aggregates of that data.
    • The values shown above are Zenoss recommendations, which are satisfactory for typical reporting and analysis needs.
    • Event retention applies to all events extracted to Analytics.
  3. Data is automatically purged by the system on a daily basis (typically runs at midnight) based on these settings. Updating them takes effect immediately at the next data purge. To change one of these settings, update the value in the table.
    For example, to change the retention policy for raw performance data from 30 days to 45 days, issue the following database update:
    update meta_setting set setting_value = '45' where setting_name = 'raw_retention_days';