The built-in metric server sends only `diskread` and `diskwrite` per VM, as cumulative byte counters. A non-negative derivative in Grafana turns those into throughput, but the export has no operation counts or latency.
For IOPS and latency, run `qm status <vmid> --verbose` on the node and look at the `blockstat` section for each disk. `rd_operations` and `wr_operations` are cumulative operation counts, and `rd_total_time_ns` and `wr_total_time_ns` are the cumulative time spent on them.
Collect those on a schedule with a Telegraf `exec` input that runs the command and writes to InfluxDB. Apply the same non-negative derivative to the counts for IOPS, and divide the change in `rd_total_time_ns` by the change in `rd_operations` over the same interval for average read latency (the same for writes).
Drafted with AI.