Posted on September 17, 2021 6:12 pm
 |  Asked by Andrew Conley
Print Friendly, PDF & Email

Is there a way to purge the telemetry data from CVP.  I have a lab deployment that has a smaller drive assigned assigned to CVP ~ 150 GB.  The disk keeps filling up with telemetry data and the auto purge function does not seem to be working.  Can I manually or through a cron job periodically purge the telemetry data, so I don’t run out of disk space?

Posted by Tamas Plugor
Answered on September 20, 2021 1:58 pm

Yes, you can, simplest way is to alter the data retention policy as mentioned in

Basically you have two choices

1) wipe everything and restore from backup ie
% cvpi backup cvp

% cvpi reset aeris

% cvpi restore cvp cvp.<timestamp>.tgz cvp.eosimages.<timestamp>.tgz


NOTE this might require a TerminAttr restart on all switches, depending on CVP/TerminAttr version ( on newer versions this should not be a problem).

2) or you can reduce the number of records to store for each state or reduce the TTL or both, if you are (hopefully on newer CVP than 2019, the table name is aeris_v2, on older versions as mentioned in the above article it's just aeris)


so if you want to change the default for the number of records(versions), which is 43200 you can run below command

echo "alter 'aeris_v2', {NAME=>'e', VERSIONS=>'10000'}" | hbase shell -n

That will change it to 10k, so basically for each state CVP will only store 10k versions, and not keep more (setting it to 10k should wipe around 3/4th of the data).

or if you want to change the TTL which is 3 months by default (measurement is in second), you could run this to set it to 1 month for instanec

echo "alter 'aeris_v2', {NAME=>'e', TTL=>'2592000'}" | hbase shell -n

after this you will have to run major compaction for the cleanup to happen straight away, otherwise you will have to wait until 2AM UTC for the next Sunday when the automatica compaction/deletion happens.

To do that you can run

echo 'compaction_state "aeris_v2"' | /cvpi/hbase/bin/hbase shell -n

Note this can take hours depending on how much data you have. You can verify the status of the compaction/deletion by running

echo 'compaction_state "aeris_v2"' | /cvpi/hbase/bin/hbase shell -n

If the result is NONE, it means the job was finished and df -h should show you that the space has been freed up.

If you set the VERSIONS/TTL to the desired value you won't have to use any cronjob.


Post your Answer

You must be logged in to post an answer.