We want to change the number of days of weekly data that is retained to reduce space demands.
By default, data is retained in the Data Repository for the following number of days:
Polled data: 45 days
Hourly rollup data: 90 days
Daily rollup data: 365 days
Weekly rollup data: 730 days
Changing the Data retention is done via the REST API:
First, query the current settings using the following GET request:
http://<DA_HOST>:8581/rest/globalretentiondefinition
This will return something similar to:
<GlobalRetentionDefinitionList>
<GlobalRetentionDefinition version="1.0.0">
<ID>5</ID>
<DailyRollupDataRetentionPeriod>365</DailyRollupDataRetentionPeriod>
<HistoricConfigurationDataRetentionPeriod>7</HistoricConfigurationDataRetentionPeriod>
<GtdRollupDataRetentionPeriod>730</GtdRollupDataRetentionPeriod>
<PolledDataRetentionPeriod>45</PolledDataRetentionPeriod>
<HourlyRollupDataRetentionPeriod>90</HourlyRollupDataRetentionPeriod>
<Item version="1.0.0">
<Name>Global Retention Definition</Name>
<CreateTime>Sun Jul 29 14:44:48 2018 -0400</CreateTime>
</Item>
</GlobalRetentionDefinition>
</GlobalRetentionDefinitionList>
….
*GTD = Greater than day, and refers to the weekly roll up table.
…
Then, to edit the value do a PUT command to the DA and enter the retention periods that you want to change in the Body tab of the HTTP Request pane.
For example:
<GlobalRetentionDefinition version="1.0.0">
<GtdRollupDataRetentionPeriod>365</GtdRollupDataRetentionPeriod>
</GlobalRetentionDefinition>
Broadcom TechDocs : CAPM 3.7 - Configure Data Retention Rates
The minimum number of days that Data Repository can retain data for is as follows:
Polled data: 2 days
Hourly rollup data: 8 days
Note: When the hourly retention rate is less than 32 days, the calendar heat chart views show daily data (only one sample per day). The charts appear sparse as a result.
Daily rollup data: 31 days
Weekly rollup data: 366 days