Removing graph data when VM destroyed

Nov 26, 2019
13
3
8
I notice that VM ID's are reused so if a VM is destroyed then a new one created it will use the same ID. This is fine, but it seems that graphs of CPU, RAM, Network, Disk, etc for the new VM will still show usage of the old VM.

Is there any way of truncating the usage graphs of the VM ID when it is destroyed?
 
Is there any way of truncating the usage graphs of the VM ID when it is destroyed?

Currently not really, at least not automatically.
After destroying the VM you could remove the rrd cached files of that VM on all nodes, i.e.:
rm /var/lib/rrdcached/db/pve2-vm/<VMID>, it is a bit racy as the cluster filesystem could write it out again, but if the VM is gone for real it should do as a workaround.

It's planed to integrate purging the RRD stats on guest destroy, if "purge" is selected, but not yet done.