Skip to content

Commit

Permalink
Updated kubevirt metrics names
Browse files Browse the repository at this point in the history
Updated kubevirt metrics names:

kubevirt_vmi_vcpu_wait_seconds to
kubevirt_vmi_vcpu_wait_seconds_total

kubevirt_vmsnapshot_disks_restored_from_source_total to
kubevirt_vmsnapshot_disks_restored_from_source

kubevirt_vmi_memory_swap_in_traffic_bytes_total to
kubevirt_vmi_memory_swap_in_traffic_bytes

kubevirt_vmi_memory_swap_out_traffic_bytes_total to
kubevirt_vmi_memory_swap_out_traffic_bytes

Based on PR kubevirt/kubevirt#9821

Signed-off-by: Shirly Radco <sradco@redhat.com>
  • Loading branch information
sradco committed Oct 22, 2023
1 parent 27fc5d9 commit 749a63f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/virt-querying-metrics.adoc
Expand Up @@ -17,7 +17,7 @@ The following examples use `topk` queries that specify a time period. If virtual

The following query can identify virtual machines that are waiting for Input/Output (I/O):

`kubevirt_vmi_vcpu_wait_seconds`::
`kubevirt_vmi_vcpu_wait_seconds_total`::
Returns the wait time (in seconds) for a virtual machine's vCPU. 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.
Expand All @@ -30,7 +30,7 @@ To query the vCPU metric, the `schedstats=enable` kernel argument must first be
.Example vCPU wait time query
[source,promql]
----
topk(3, sum by (name, namespace) (rate(kubevirt_vmi_vcpu_wait_seconds[6m]))) > 0 <1>
topk(3, sum by (name, namespace) (rate(kubevirt_vmi_vcpu_wait_seconds_total[6m]))) > 0 <1>
----
<1> This query returns the top 3 VMs waiting for I/O at every given moment over a six-minute time period.

Expand Down Expand Up @@ -76,7 +76,7 @@ topk(3, sum by (name, namespace) (rate(kubevirt_vmi_storage_read_traffic_bytes_t
[id="virt-storage-snapshot-data_{context}"]
=== Storage snapshot data

`kubevirt_vmsnapshot_disks_restored_from_source_total`::
`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`::
Expand All @@ -85,7 +85,7 @@ Returns the amount of space in bytes restored from the source virtual machine. T
.Examples of storage snapshot data queries
[source,promql]
----
kubevirt_vmsnapshot_disks_restored_from_source_total{vm_name="simple-vm", vm_namespace="default"} <1>
kubevirt_vmsnapshot_disks_restored_from_source{vm_name="simple-vm", vm_namespace="default"} <1>
----
<1> This query returns the total number of virtual machine disks restored from the source virtual machine.

Expand Down Expand Up @@ -118,16 +118,16 @@ topk(3, sum by (name, namespace) (rate(kubevirt_vmi_storage_iops_read_total[6m])

The following queries can identify which swap-enabled guests are performing the most memory swapping:

`kubevirt_vmi_memory_swap_in_traffic_bytes_total`::
`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_total`::
`kubevirt_vmi_memory_swap_out_traffic_bytes`::
Returns the total amount (in bytes) of memory the virtual guest is swapping out. Type: Gauge.

.Example memory swapping query
[source,promql]
----
topk(3, sum by (name, namespace) (rate(kubevirt_vmi_memory_swap_in_traffic_bytes_total[6m])) + sum by (name, namespace) (rate(kubevirt_vmi_memory_swap_out_traffic_bytes_total[6m]))) > 0 <1>
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>
----
<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.

Expand Down

0 comments on commit 749a63f

Please sign in to comment.