You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/virt-querying-metrics.adoc
+40-17Lines changed: 40 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,18 +38,23 @@ This delay appears to the virtual machine as _steal time_, which is CPU time los
38
38
Type: Counter.
39
39
40
40
*Example vCPU delay query*
41
+
42
+
The following query returns the average per-second delay over a 5-minute period. A high value may indicate CPU overcommitment or contention on the node:
<1> This query returns the average per-second delay over a 5-minute period. A high value may indicate CPU overcommitment or contention on the node.
48
+
46
49
47
50
*Example vCPU wait time query*
51
+
52
+
The following query returns the top 3 VMs waiting for I/O at every given moment over a six-minute time period:
53
+
48
54
[source,promql]
49
55
----
50
-
topk(3, sum by (name, namespace) (rate(kubevirt_vmi_vcpu_wait_seconds_total[6m]))) > 0 <1>
56
+
topk(3, sum by (name, namespace) (rate(kubevirt_vmi_vcpu_wait_seconds_total[6m]))) > 0
51
57
----
52
-
<1> This query returns the top 3 VMs waiting for I/O at every given moment over a six-minute time period.
53
58
endif::openshift-rosa,openshift-dedicated[]
54
59
55
60
[id="virt-promql-network-metrics_{context}"]
@@ -64,11 +69,13 @@ Returns the total amount of traffic received (in bytes) on the virtual machine's
64
69
Returns the total amount of traffic transmitted (in bytes) on the virtual machine's network. Type: Counter.
65
70
66
71
*Example network traffic query*
72
+
73
+
The following query returns the top 3 VMs transmitting the most network traffic at every given moment over a six-minute time period:
74
+
67
75
[source,promql]
68
76
----
69
-
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>
77
+
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
70
78
----
71
-
<1> This query returns the top 3 VMs transmitting the most network traffic at every given moment over a six-minute time period.
72
79
73
80
[id="virt-promql-storage-metrics_{context}"]
74
81
== Storage metrics
@@ -85,13 +92,21 @@ Returns the total amount (in bytes) of the virtual machine's storage-related tra
85
92
Returns the total amount of storage writes (in bytes) of the virtual machine's storage-related traffic. Type: Counter.
86
93
--
87
94
88
-
*Example storage-related traffic query*
95
+
*Example storage-related traffic queries*
96
+
97
+
* The following query returns the top 3 VMs performing the most storage traffic at every given moment over a six-minute time period:
98
+
+
89
99
[source,promql]
90
100
----
91
-
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>
101
+
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
92
102
----
93
103
94
-
<1> This query returns the top 3 VMs performing the most storage traffic at every given moment over a six-minute time period.
104
+
* The following query returns the top 3 VMs with the highest average read latency at every given moment over a six-minute time period:
105
+
+
106
+
[source,promql]
107
+
----
108
+
topk(3, sum by (name, namespace) (rate(kubevirt_vmi_storage_read_times_seconds_total{name='${name}',namespace='${namespace}'${clusterFilter}}[6m]) / rate(kubevirt_vmi_storage_iops_read_total{name='${name}',namespace='${namespace}'${clusterFilter}}[6m]) > 0)) > 0
109
+
----
95
110
96
111
[id="virt-storage-snapshot-data_{context}"]
97
112
=== Storage snapshot data
@@ -103,17 +118,21 @@ Returns the total number of virtual machine disks restored from the source virtu
103
118
Returns the amount of space in bytes restored from the source virtual machine. Type: Gauge.
104
119
105
120
*Examples of storage snapshot data queries*
121
+
122
+
* The following query returns the total number of virtual machine disks restored from the source virtual machine:
<1> This query returns the amount of space in bytes restored from the source virtual machine.
135
+
117
136
118
137
[id="virt-iops_{context}"]
119
138
=== I/O performance
@@ -127,11 +146,13 @@ Returns the amount of write I/O operations the virtual machine is performing per
127
146
Returns the amount of read I/O operations the virtual machine is performing per second. Type: Counter.
128
147
129
148
*Example I/O performance query*
149
+
150
+
The following query returns the top 3 VMs performing the most I/O operations per second at every given moment over a six-minute time period:
151
+
130
152
[source,promql]
131
153
----
132
-
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>
154
+
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
133
155
----
134
-
<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.
135
156
136
157
[id="virt-promql-guest-memory-metrics_{context}"]
137
158
== Guest memory swapping metrics
@@ -145,12 +166,14 @@ Returns the total amount (in bytes) of memory the virtual guest is swapping in.
145
166
Returns the total amount (in bytes) of memory the virtual guest is swapping out. Type: Gauge.
146
167
147
168
*Example memory swapping query*
169
+
170
+
The following 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:
171
+
148
172
[source,promql]
149
173
----
150
-
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>
174
+
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
151
175
+
152
176
----
153
-
<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.
0 commit comments