Performance data retention
Resource Manager stores all performance data (a.k.a., metrics) in HBase using OpenTSDB. The default retention policy saves performance data for 90 days. To change the default, the time to live (TTL) must be adjusted on the OpenTSDB column families in HBase.
Note: TTL is defined in seconds.
Once a TTL value is changed, the data retention will adjust on the next major HBase compaction, which by default is once per day.
Changing the performance data retention time
To change the performance data retention time from the default value of 90 days:
Log in to the Control Center master host as a user with sudo and docker privileges.
Stop the openTSDB writer service.
serviced service stop opentsdb/writer
Execute the following command to list all the services and their SERVICEID values. Take note of the SERVICEID for the openTSDB reader service. It will be used as an argument in the following step.
serviced service list
Execute the following command, where $id is the openTSDB reader SERVICEID and $ttl is your TTL value, in seconds.
serviced service shell $id /opt/opentsdb/set-opentsdb-table-ttl.sh $ttl
Start the openTSDB writer service.
serviced service start opentsdb/writer