[pve-devel] [PATCH cluster-pve8 2/2] status: handle new pve9- metrics update data

Aaron Lauterer a.lauterer at proxmox.com
Fri May 23 18:35:35 CEST 2025



On  2025-05-23  18:00, Aaron Lauterer wrote:
> For PVE9 there will be additional fields in the metrics that are
> collected. The new columns/fields are added at the end of the current
> ones. Therefore, if we get the new format, we need to cut it.
> 
> Paths to rrd filenames needed to be set manually to 'pve2-...' and will
> use the 'node' part instead of the full key, as that could also be
> 'pve9-...' which does not exists.

since it pops up for the first time in the series here: I currently 
chose 'pve9-' as prefix for the metric keys, following what we used so 
far AFAICT -> PVE version when it was introduced
.
But we could also think about changing it to something like 
'pve-{node,storage,vm}-{version}' as that could make it easier to change 
the code to also handle other new and right now unknown formats in the 
futures if we always only append new columns/fields.

But I am not exactly sure how we should do the versioning because the 
current approach in the status.c is to strncmp a fixed length of the 
full key and that would be problematic if we use the following examples:

pve-vm-9
pve-vm-10

when do we check for 8 or 9 character long strings? There might be a 
nice way to do this, as in, checking until we reach the separating /.

2 digits with leading 0 could be one approach. But if we also add minor 
PVE versions, well that makes it more complicated.
Or we could switch to it being just an integer that will be increased 
when we add more data.

Just to throw out some ideas :)




More information about the pve-devel mailing list