Hi,
I’m using IncusOS and we are successfully collecting metrics and displaying them via Grafana. We basically followed this guide:
During the verification process of the metrics we noticed that the reported storage usage did not align with what’s reported by IncusOS on the web ui. As an example this is the storage pool usage shown on IncusOS:

And this is the Grafana Panel for the storage:
This are the (default) queries used for generating the graph:
# disk used
sum(incus_filesystem_size_bytes{job="$job",project="$project"} - incus_filesystem_avail_bytes)
# disk quota
sum(incus_filesystem_size_bytes{mountpoint="/",job="$job",project="$project"})
As far as I understand the incus_filesystem_* metrics are gathered from inside the VMs/Containers. So those values would be calculated based on what df -h would show inside the container/VM. Is this correct? So in this case disk quota is basically the space that’s been allocated for the VMs (the size of partitions inside the VM) and disk used the space used as reported by the VM.
Querying individual VMs seems to align with this assertion and the metrics seem to be accurate.
This is what is actually shown inside the VM:
And the gathered metrics agree with the information inside the VM (the graph adds the sizes of / and /boot together):
These are the queries I used for the individual VM:
# disk quota
sum(incus_filesystem_size_bytes{device!="config", fstype!="tmpfs", project="default", name="vm-redacted-01"})
# disk usage
sum(incus_filesystem_size_bytes{device!="config",fstype!="tmpfs", project="default", name="vm-redacted-01"} - incus_filesystem_avail_bytes{fstype!="tmpfs", project="default", name="vm-redacted-01"})
Is there way to also query for the usage / available space of the storage pool itself?
I tried different metrics and calculations using incus_filesystem_* and node_filesystem_*, but I could never get something that aligns with the total storage usage shown on the web ui (1.1 TiB) and the available 4.9 TiB storage.


