关于通过oVirt REST API获取Virtual Disk/VM READ/WRITE IOPS的咨询
Hey Harry, great question—yes, you absolutely can retrieve READ/WRITE IOPS metrics for your virtual disks and VMs using the oVirt REST API! Here’s how to go about it:
Virtual Disk-level IOPS: You can fetch per-disk IOPS by targeting the statistics endpoint for a specific disk. Send a
GETrequest to:/api/vms/{vm_id}/disks/{disk_id}/statisticsIn the response, look for metrics named
read_iops(number of read operations per second) andwrite_iops(number of write operations per second). Each metric will include avaluesarray with the latest statistical data points.VM-level total IOPS: If you want aggregated IOPS across all disks attached to a VM, you can query the VM’s own statistics endpoint:
/api/vms/{vm_id}/statisticsHere, look for
total_read_iopsandtotal_write_iops—these roll up the IOPS from all disks associated with the VM.
A few quick notes to keep in mind:
- Ensure you have the necessary permissions (like
VmStatsorDiskStats) to access these statistics. - Most recent oVirt versions (4.2+) support these metrics, but double-check your API documentation if you’re on an older release.
- Statistical data is typically refreshed at regular intervals (default is a few seconds), so you might need to poll the endpoint if you need real-time updates.
内容的提问来源于stack exchange,提问作者Coder

