The following metric descriptions include example Prometheus Query Language (PromQL) queries. These metrics are not an API and might change between versions. For a complete list of virtualization metrics, see KubeVirt components metrics.
Note
|
The following examples use |
The following query can identify virtual machines that are waiting for Input/Output (I/O):
kubevirt_vmi_vcpu_wait_seconds_total
-
Returns the wait time (in seconds) on I/O for vCPUs of a virtual machine. Type: Counter.
A value above '0' means that the vCPU wants to run, but the host scheduler cannot run it yet. This inability to run indicates that there is an issue with I/O.
Note
|
To query the vCPU metric, the |
topk(3, sum by (name, namespace) (rate(kubevirt_vmi_vcpu_wait_seconds_total[6m]))) > 0 (1)
-
This query returns the top 3 VMs waiting for I/O at every given moment over a six-minute time period.
The following queries can identify virtual machines that are saturating the network:
kubevirt_vmi_network_receive_bytes_total
-
Returns the total amount of traffic received (in bytes) on the virtual machine’s network. Type: Counter.
kubevirt_vmi_network_transmit_bytes_total
-
Returns the total amount of traffic transmitted (in bytes) on the virtual machine’s network. Type: Counter.
topk(3, sum by (name, namespace) (rate(kubevirt_vmi_network_receive_bytes_total[6m])) + sum by (name, namespace) (rate(kubevirt_vmi_network_transmit_bytes_total[6m]))) > 0 (1)
-
This query returns the top 3 VMs transmitting the most network traffic at every given moment over a six-minute time period.
The following queries can identify VMs that are writing large amounts of data:
kubevirt_vmi_storage_read_traffic_bytes_total
-
Returns the total amount (in bytes) of the virtual machine’s storage-related traffic. Type: Counter.
kubevirt_vmi_storage_write_traffic_bytes_total
-
Returns the total amount of storage writes (in bytes) of the virtual machine’s storage-related traffic. Type: Counter.
topk(3, sum by (name, namespace) (rate(kubevirt_vmi_storage_read_traffic_bytes_total[6m])) + sum by (name, namespace) (rate(kubevirt_vmi_storage_write_traffic_bytes_total[6m]))) > 0 (1)
-
This query returns the top 3 VMs performing the most storage traffic at every given moment over a six-minute time period.
kubevirt_vmsnapshot_disks_restored_from_source
-
Returns the total number of virtual machine disks restored from the source virtual machine. Type: Gauge.
kubevirt_vmsnapshot_disks_restored_from_source_bytes
-
Returns the amount of space in bytes restored from the source virtual machine. Type: Gauge.
kubevirt_vmsnapshot_disks_restored_from_source{vm_name="simple-vm", vm_namespace="default"} (1)
-
This query returns the total number of virtual machine disks restored from the source virtual machine.
kubevirt_vmsnapshot_disks_restored_from_source_bytes{vm_name="simple-vm", vm_namespace="default"} (1)
-
This query returns the amount of space in bytes restored from the source virtual machine.
The following queries can determine the I/O performance of storage devices:
kubevirt_vmi_storage_iops_read_total
-
Returns the amount of write I/O operations the virtual machine is performing per second. Type: Counter.
kubevirt_vmi_storage_iops_write_total
-
Returns the amount of read I/O operations the virtual machine is performing per second. Type: Counter.
topk(3, sum by (name, namespace) (rate(kubevirt_vmi_storage_iops_read_total[6m])) + sum by (name, namespace) (rate(kubevirt_vmi_storage_iops_write_total[6m]))) > 0 (1)
-
This query returns the top 3 VMs performing the most I/O operations per second at every given moment over a six-minute time period.
The following queries can identify which swap-enabled guests are performing the most memory swapping:
kubevirt_vmi_memory_swap_in_traffic_bytes
-
Returns the total amount (in bytes) of memory the virtual guest is swapping in. Type: Gauge.
kubevirt_vmi_memory_swap_out_traffic_bytes
-
Returns the total amount (in bytes) of memory the virtual guest is swapping out. Type: Gauge.
topk(3, sum by (name, namespace) (rate(kubevirt_vmi_memory_swap_in_traffic_bytes[6m])) + sum by (name, namespace) (rate(kubevirt_vmi_memory_swap_out_traffic_bytes[6m]))) > 0 (1)
-
This query returns the top 3 VMs where the guest is performing the most memory swapping at every given moment over a six-minute time period.
Note
|
Memory swapping indicates that the virtual machine is under memory pressure. Increasing the memory allocation of the virtual machine can mitigate this issue. |