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
All supported Performance Management releases
Changing the Data retention is done via the REST API:
First, query the current settings using the following GET request on a browser:
http://<DA_HOST>:8581/rest/globalretentiondefinition
https://<DA_HOST>:8582/rest/globalretentiondefinition
Or run the GET request in cURL on the DA_Host:
curl -u admin -X GET http://localhost:8581/rest/globalretentiondefinition
curl -k -u admin -X GET https://localhost:8582/rest/globalretentiondefinition
Where admin is the PM username and -k skip certificate validation.
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
use the same url but add the id to the end
http://<DA_HOST>:8581/rest/globalretentiondefinition/5
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>
Example using cURL on the DA_host:
curl -u admin -X PUT -H "Content-Type: application/xml" -d '<GlobalRetentionDefinition version="1.0.0"><PolledDataRetentionPeriod>50</PolledDataRetentionPeriod></GlobalRetentionDefinition>' http://localhost:8581/rest/globalretentiondefinition/5
curl -k -u admin -X PUT -H "Content-Type: application/xml" -d '<GlobalRetentionDefinition version="1.0.0"><PolledDataRetentionPeriod>50</PolledDataRetentionPeriod></GlobalRetentionDefinition>' https://localhost:8582/rest/globalretentiondefinition/5
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