Skip to content

Commit ccb59b9

Browse files
committed
CNV-15822: adding live migration metrics
1 parent 5a41103 commit ccb59b9

File tree

8 files changed

+62
-23
lines changed

8 files changed

+62
-23
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3570,8 +3570,6 @@ Topics:
35703570
File: virt-migrate-vmi
35713571
- Name: Migrating a virtual machine over a dedicated additional network
35723572
File: virt-migrating-vm-on-secondary-network
3573-
- Name: Monitoring live migration
3574-
File: virt-monitor-vmi-migration
35753573
- Name: Cancelling the live migration of a virtual machine instance
35763574
File: virt-cancel-vmi-migration
35773575
- Name: Configuring virtual machine eviction strategy
@@ -3601,6 +3599,8 @@ Topics:
36013599
File: virt-logs
36023600
- Name: Viewing events
36033601
File: virt-events
3602+
- Name: Monitoring live migration
3603+
File: virt-monitor-vmi-migration
36043604
- Name: Diagnosing data volumes using events and conditions
36053605
File: virt-diagnosing-datavolumes-using-events-and-conditions
36063606
- Name: Viewing information about virtual machine workloads
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/logging_events_monitoring/virt-monitor-vmi-migration.adoc
4+
// * virt/logging_events_monitoring/virt-prometheus-queries.adoc
5+
6+
:_content-type: REFERENCE
7+
[id="virt-live-migration-metrics_{context}"]
8+
= Live migration metrics
9+
10+
The following metrics can be queried to show live migration status:
11+
12+
`kubevirt_migrate_vmi_data_processed_bytes`:: The amount of guest operating system (OS) data that has migrated to the new virtual machine (VM). Type: Gauge.
13+
14+
`kubevirt_migrate_vmi_data_remaining_bytes`:: The amount of guest OS data that remains to be migrated. Type: Gauge.
15+
16+
`kubevirt_migrate_vmi_dirty_memory_rate_bytes`:: The rate at which memory is becoming dirty in the guest OS. Dirty memory is data that has been changed but not yet written to disk. Type: Gauge.
17+
18+
`kubevirt_migrate_vmi_pending_count`:: The number of pending migrations. Type: Gauge.
19+
20+
`kubevirt_migrate_vmi_scheduling_count`:: The number of scheduling migrations. Type: Gauge.
21+
22+
`kubevirt_migrate_vmi_running_count`:: The number of running migrations. Type: Gauge.
23+
24+
`kubevirt_migrate_vmi_succeeded_total`:: The number of successfully completed migrations. Type: Gauge.
25+
26+
`kubevirt_migrate_vmi_failed_total`:: The number of failed migrations. Type: Gauge.
27+

modules/virt-monitoring-vm-migration-cli.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Module included in the following assemblies:
22
//
3-
// * virt/live_migration/virt-monitor-vmi-migration.adoc
3+
// * virt/logging_events_monitoring/virt-monitor-vmi-migration.adoc
44

55
:_content-type: PROCEDURE
66
[id="virt-monitoring-vm-migration-cli_{context}"]

modules/virt-querying-metrics.adoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The following examples use `topk` queries that specify a time period. If virtual
1818
The following query can identify virtual machines that are waiting for Input/Output (I/O):
1919

2020
`kubevirt_vmi_vcpu_wait_seconds`::
21-
Returns the wait time (in seconds) for a virtual machine's vCPU.
21+
Returns the wait time (in seconds) for a virtual machine's vCPU. Type: Counter.
2222

2323
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.
2424

@@ -40,10 +40,10 @@ topk(3, sum by (name, namespace) (rate(kubevirt_vmi_vcpu_wait_seconds[6m]))) > 0
4040
The following queries can identify virtual machines that are saturating the network:
4141

4242
`kubevirt_vmi_network_receive_bytes_total`::
43-
Returns the total amount of traffic received (in bytes) on the virtual machine's network.
43+
Returns the total amount of traffic received (in bytes) on the virtual machine's network. Type: Counter.
4444

4545
`kubevirt_vmi_network_transmit_bytes_total`::
46-
Returns the total amount of traffic transmitted (in bytes) on the virtual machine's network.
46+
Returns the total amount of traffic transmitted (in bytes) on the virtual machine's network. Type: Counter.
4747

4848
.Example network traffic query
4949
[source,promql]
@@ -61,10 +61,10 @@ topk(3, sum by (name, namespace) (rate(kubevirt_vmi_network_receive_bytes_total[
6161
The following queries can identify VMs that are writing large amounts of data:
6262

6363
`kubevirt_vmi_storage_read_traffic_bytes_total`::
64-
Returns the total amount (in bytes) of the virtual machine's storage-related traffic.
64+
Returns the total amount (in bytes) of the virtual machine's storage-related traffic. Type: Counter.
6565

6666
`kubevirt_vmi_storage_write_traffic_bytes_total`::
67-
Returns the total amount of storage writes (in bytes) of the virtual machine's storage-related traffic.
67+
Returns the total amount of storage writes (in bytes) of the virtual machine's storage-related traffic. Type: Counter.
6868

6969
.Example storage-related traffic query
7070
[source,promql]
@@ -77,10 +77,10 @@ topk(3, sum by (name, namespace) (rate(kubevirt_vmi_storage_read_traffic_bytes_t
7777
=== Storage snapshot data
7878

7979
`kubevirt_vmsnapshot_disks_restored_from_source_total`::
80-
Returns the total number of virtual machine disks restored from the source virtual machine.
80+
Returns the total number of virtual machine disks restored from the source virtual machine. Type: Gauge.
8181

8282
`kubevirt_vmsnapshot_disks_restored_from_source_bytes`::
83-
Returns the amount of space in bytes restored from the source virtual machine.
83+
Returns the amount of space in bytes restored from the source virtual machine. Type: Gauge.
8484

8585
.Examples of storage snapshot data queries
8686
[source,promql]
@@ -101,10 +101,10 @@ kubevirt_vmsnapshot_disks_restored_from_source_bytes{vm_name="simple-vm", vm_nam
101101
The following queries can determine the I/O performance of storage devices:
102102

103103
`kubevirt_vmi_storage_iops_read_total`::
104-
Returns the amount of write I/O operations the virtual machine is performing per second.
104+
Returns the amount of write I/O operations the virtual machine is performing per second. Type: Counter.
105105

106106
`kubevirt_vmi_storage_iops_write_total`::
107-
Returns the amount of read I/O operations the virtual machine is performing per second.
107+
Returns the amount of read I/O operations the virtual machine is performing per second. Type: Counter.
108108

109109
.Example I/O performance query
110110
[source,promql]
@@ -119,10 +119,10 @@ topk(3, sum by (name, namespace) (rate(kubevirt_vmi_storage_iops_read_total[6m])
119119
The following queries can identify which swap-enabled guests are performing the most memory swapping:
120120

121121
`kubevirt_vmi_memory_swap_in_traffic_bytes_total`::
122-
Returns the total amount (in bytes) of memory the virtual guest is swapping in.
122+
Returns the total amount (in bytes) of memory the virtual guest is swapping in. Type: Gauge.
123123

124124
`kubevirt_vmi_memory_swap_out_traffic_bytes_total`::
125-
Returns the total amount (in bytes) of memory the virtual guest is swapping out.
125+
Returns the total amount (in bytes) of memory the virtual guest is swapping out. Type: Gauge.
126126

127127
.Example memory swapping query
128128
[source,promql]

virt/live_migration/virt-live-migration.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ include::modules/virt-about-live-migration.adoc[leveloffset=+1]
1313
== Additional resources
1414

1515
* xref:../../virt/live_migration/virt-migrate-vmi.adoc#virt-migrate-vmi[Migrating a virtual machine instance to another node]
16+
* xref:../../virt/logging_events_monitoring/virt-monitor-vmi-migration.adoc#virt-monitor-vmi-migration[Monitoring live migration]
1617
* xref:../../virt/live_migration/virt-live-migration-limits.adoc#virt-live-migration-limits[Live migration limiting]
17-
* xref:../../virt/virtual_machines/virtual_disks/virt-creating-data-volumes.adoc#virt-customizing-storage-profile_virt-creating-data-volumes[Customizing the storage profile]
18+
* xref:../../virt/virtual_machines/virtual_disks/virt-creating-data-volumes.adoc#virt-customizing-storage-profile_virt-creating-data-volumes[Customizing the storage profile]

virt/live_migration/virt-migrate-vmi.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ If a virtual machine uses a host model CPU, you can perform live migration of th
1414
====
1515

1616
include::modules/virt-initiating-vm-migration-web.adoc[leveloffset=+1]
17+
1718
include::modules/virt-initiating-vm-migration-cli.adoc[leveloffset=+1]
1819

1920
[role="_additional-resources"]
20-
.Additional resources:
21+
[id="virt-migrate-vmi_additional-resources"]
22+
== Additional resources
2123

22-
* xref:../../virt/live_migration/virt-monitor-vmi-migration.adoc#virt-monitor-vmi-migration[Monitoring live migration of a virtual machine instance]
24+
* xref:../../virt/logging_events_monitoring/virt-monitor-vmi-migration.adoc#virt-monitor-vmi-migration[Monitoring live migration]
2325
* xref:../../virt/live_migration/virt-cancel-vmi-migration.adoc#virt-cancel-vmi-migration[Cancelling the live migration of a virtual machine instance]

virt/live_migration/virt-monitor-vmi-migration.adoc renamed to virt/logging_events_monitoring/virt-monitor-vmi-migration.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,10 @@ You can monitor the progress of all live migrations on the xref:../../virt/virt-
1616
You can view the migration metrics of a virtual machine on the xref:../../virt/virt-web-console-overview.adoc#ui-virtualmachine-details-metrics_virt-web-console-overview[*VirtualMachine details -> Metrics* tab] in the web console.
1717

1818
include::modules/virt-monitoring-vm-migration-cli.adoc[leveloffset=+1]
19+
20+
[id="metrics_virt-monitor-vmi-migration"]
21+
== Metrics
22+
23+
You can use xref:../../virt/logging_events_monitoring/virt-prometheus-queries.adoc#virt-prometheus-queries[Prometheus queries] to monitor live migration.
24+
25+
include::modules/virt-live-migration-metrics.adoc[leveloffset=+2]

virt/logging_events_monitoring/virt-prometheus-queries.adoc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@
33
= Prometheus queries for virtual resources
44
include::_attributes/common-attributes.adoc[]
55
:context: virt-prometheus-queries
6+
:toclevels: 4
67

78
toc::[]
89

9-
{VirtProductName} provides metrics for monitoring how infrastructure resources are consumed in the cluster. The metrics cover the following resources:
10-
11-
* vCPU
12-
* Network
13-
* Storage
14-
* Guest memory swapping
10+
{VirtProductName} provides metrics that you can use to monitor the consumption of cluster infrastructure resources, including vCPU, network, storage, and guest memory swapping. You can also use metrics to query live migration status.
1511

1612
Use the {product-title} monitoring dashboard to query virtualization metrics.
1713

@@ -30,8 +26,14 @@ include::modules/monitoring-querying-metrics-for-user-defined-projects-as-a-deve
3026

3127
include::modules/virt-querying-metrics.adoc[leveloffset=+1]
3228

29+
include::modules/virt-live-migration-metrics.adoc[leveloffset=+1]
30+
3331
[id="additional-resources_virt-prometheus-queries"]
3432
[role="_additional-resources"]
3533
== Additional resources
3634

3735
* xref:../../monitoring/monitoring-overview.adoc#monitoring-overview[Monitoring overview]
36+
37+
* link:https://prometheus.io/docs/prometheus/latest/querying/basics/[Querying Prometheus]
38+
39+
* link:https://prometheus.io/docs/prometheus/latest/querying/examples/[Prometheus query examples]

0 commit comments

Comments
 (0)