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?
Yes, you can, simplest way is to alter the data retention policy as mentioned in https://eos.arista.com/toi/cvp-2019-1-0/expedited-cvp-upgrades/
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
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
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
Note this can take hours depending on how much data you have. You can verify the status of the compaction/deletion by running
If the result is NONE, it means the job was finished and
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.