hyperv: fix misnamed root partition metrics, counter types and units (#2720)

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2026-10-15 17:58:31 +00:00
committed by GitHub
parent 8fe85c143b
commit 55275e7db1
9 changed files with 368 additions and 87 deletions
+24 -22
View File
@@ -157,20 +157,20 @@ Multiply by the number of threads per core to get the ratio per **physical** cor
| `windows_hyperv_root_partition_device_dma_errors` | An indicator of illegal DMA requests generated by all devices assigned to the partition | gauge | None |
| `windows_hyperv_root_partition_device_interrupt_errors` | An indicator of illegal interrupt requests generated by all devices assigned to the partition | gauge | None |
| `windows_hyperv_root_partition_device_interrupt_mappings` | The number of device interrupt mappings used by the partition | gauge | None |
| `windows_hyperv_root_partition_device_interrupt_throttle_events` | The number of times an interrupt from a device assigned to the partition was temporarily throttled because the device was generating too many interrupts | gauge | None |
| `windows_hyperv_root_partition_preferred_numa_node_index` | The number of pages present in the GPA space of the partition (zero for root partition) | gauge | None |
| `windows_hyperv_root_partition_gpa_space_modifications` | The rate of modifications to the GPA space of the partition | counter | None |
| `windows_hyperv_root_partition_io_tlb_flush_cost` | The average time (in nanoseconds) spent processing an I/O TLB flush | gauge | None |
| `windows_hyperv_root_partition_io_tlb_flush` | The rate of flushes of I/O TLBs of the partition | counter | None |
| `windows_hyperv_root_partition_device_interrupt_throttle_events_total` | The number of times an interrupt from a device assigned to the partition was temporarily throttled because the device was generating too many interrupts | counter | None |
| `windows_hyperv_root_partition_gpa_pages` | The number of pages present in the GPA space of the partition (zero for root partition) | gauge | None |
| `windows_hyperv_root_partition_gpa_space_modifications_total` | The number of modifications to the GPA space of the partition | counter | None |
| `windows_hyperv_root_partition_io_tlb_flush_seconds_total` | The time spent processing I/O TLB flushes. Divide its rate by the rate of `windows_hyperv_root_partition_io_tlb_flushes_total` for the average time per flush | counter | None |
| `windows_hyperv_root_partition_io_tlb_flushes_total` | The number of flushes of I/O TLBs of the partition | counter | None |
| `windows_hyperv_root_partition_recommended_virtual_tlb_size` | The recommended number of pages to be deposited for the virtual TLB | gauge | None |
| `windows_hyperv_root_partition_physical_pages_allocated` | The number of timer interrupts skipped for the partition | gauge | None |
| `windows_hyperv_root_partition_skipped_timer_ticks_total` | The number of timer interrupts skipped for the partition | counter | None |
| `windows_hyperv_root_partition_1G_device_pages` | The number of 1G pages present in the device space of the partition | gauge | None |
| `windows_hyperv_root_partition_1G_gpa_pages` | The number of 1G pages present in the GPA space of the partition | gauge | None |
| `windows_hyperv_root_partition_2M_device_pages` | The number of 2M pages present in the device space of the partition | gauge | None |
| `windows_hyperv_root_partition_2M_gpa_pages` | The number of 2M pages present in the GPA space of the partition | gauge | None |
| `windows_hyperv_root_partition_4K_device_pages` | The number of 4K pages present in the device space of the partition | gauge | None |
| `windows_hyperv_root_partition_4K_gpa_pages` | The number of 4K pages present in the GPA space of the partition | gauge | None |
| `windows_hyperv_root_partition_virtual_tlb_flush_entries` | The rate of flushes of the entire virtual TLB | counter | None |
| `windows_hyperv_root_partition_virtual_tlb_flush_entries_total` | The number of flushes of the entire virtual TLB | counter | None |
| `windows_hyperv_root_partition_virtual_tlb_pages` | The number of pages used by the virtual TLB of the partition | gauge | None |
@@ -178,9 +178,10 @@ Multiply by the number of threads per core to get the ratio per **physical** cor
| Name | Description | Type | Labels |
|---------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------|----------------|
| `windows_hyperv_hypervisor_root_virtual_processor_time_total` | Time that processor spent in different modes (hypervisor, guest_run, guest_idle, remote) | counter | `core`,`state` |
| `windows_hyperv_hypervisor_root_virtual_processor_total_run_time_total` | Time that processor spent | counter | `core` |
| `windows_hyperv_hypervisor_root_virtual_cpu_wait_time_per_dispatch_total` | The average time (in nanoseconds) spent waiting for a virtual processor to be dispatched onto a logical processor | counter | `core` |
| `windows_hyperv_hypervisor_root_virtual_processor_time_total` | Time in seconds that processor spent in different modes (`state`: `guest_run`, `hypervisor`, `remote`) | counter | `core`,`state` |
| `windows_hyperv_hypervisor_root_virtual_processor_total_run_time_total` | Time in seconds that processor spent running | counter | `core` |
| `windows_hyperv_hypervisor_root_virtual_processor_cpu_wait_seconds_total` | The time spent waiting for a virtual processor to be dispatched onto a logical processor. Divide its rate by the rate of `windows_hyperv_hypervisor_root_virtual_processor_dispatches_total` for the average wait per dispatch | counter | `core` |
| `windows_hyperv_hypervisor_root_virtual_processor_dispatches_total` | The number of times the virtual processor was dispatched onto a logical processor | counter | `core` |
### Hyper-V Legacy Network Adapter
@@ -271,11 +272,12 @@ Example alert:
| Name | Description | Type | Labels |
|--------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|---------|-----------------------|
| `windows_hyperv_hypervisor_virtual_processor_mode_time_total` | Time that processor spent in different modes (hypervisor, guest_run, guest_idle, remote) | counter | `vm`, `core`, `state` |
| `windows_hyperv_hypervisor_virtual_processor_run_time_total` | Time that processor spent | counter | `vm`, `core` |
| `windows_hyperv_hypervisor_virtual_processor_cpu_wait_time_per_dispatch_total` | The average time (in nanoseconds) spent waiting for a virtual processor to be dispatched onto a logical processor. | counter | `vm`, `core` |
| `windows_hyperv_hypervisor_virtual_processor_time_total` | **Deprecated:** use `windows_hyperv_hypervisor_virtual_processor_mode_time_total`. Time that processor spent in different modes (hypervisor, guest_run, guest_idle, remote) | counter | `vm`, `core`, `state` |
| `windows_hyperv_hypervisor_virtual_processor_total_run_time_total` | **Deprecated:** use `windows_hyperv_hypervisor_virtual_processor_run_time_total`. Time that processor spent | counter | `vm`, `core` |
| `windows_hyperv_hypervisor_virtual_processor_mode_time_total` | Time in seconds that processor spent in different modes (`state`: `hypervisor`, `guest`, `remote`) | counter | `vm`, `core`, `state` |
| `windows_hyperv_hypervisor_virtual_processor_run_time_total` | Time in seconds that processor spent running | counter | `vm`, `core` |
| `windows_hyperv_hypervisor_virtual_processor_cpu_wait_seconds_total` | The time spent waiting for a virtual processor to be dispatched onto a logical processor. Divide its rate by the rate of `windows_hyperv_hypervisor_virtual_processor_dispatches_total` for the average wait per dispatch | counter | `vm`, `core` |
| `windows_hyperv_hypervisor_virtual_processor_dispatches_total` | The number of times the virtual processor was dispatched onto a logical processor | counter | `vm`, `core` |
| `windows_hyperv_hypervisor_virtual_processor_time_total` | **Deprecated:** use `windows_hyperv_hypervisor_virtual_processor_mode_time_total`. Time in seconds that processor spent in different modes (`state`: `hypervisor`, `guest`, `remote`) | counter | `vm`, `core`, `state` |
| `windows_hyperv_hypervisor_virtual_processor_total_run_time_total` | **Deprecated:** use `windows_hyperv_hypervisor_virtual_processor_run_time_total`. Time in seconds that processor spent running | counter | `vm`, `core` |
### Hyper-V Virtual Network Adapter
@@ -355,12 +357,12 @@ Example alert:
| `windows_hyperv_virtual_storage_device_operations_written_total` | Represents the total number of write operations that have occurred on this virtual device. | counter | `device` |
| `windows_hyperv_virtual_storage_device_io_latency_seconds_total` | Represents the total IO transfer latency for this virtual device. | counter | `device` |
| `windows_hyperv_virtual_storage_device_latency_seconds` | **Deprecated:** use `windows_hyperv_virtual_storage_device_io_latency_seconds_total`. Cumulative IO transfer latency in 100ns ticks, see below. | gauge | `device` |
| `windows_hyperv_virtual_storage_device_throughput_total` | Represents the total number of 8KB IO transfers completed by this virtual device. | counter | `device` |
| `windows_hyperv_virtual_storage_device_normalized_throughput` | Represents the average number of IO transfers completed by this virtual device. | gauge | `device` |
| `windows_hyperv_virtual_storage_device_throughput_total` | Represents the total number of IO transfers completed by this virtual device. | counter | `device` |
| `windows_hyperv_virtual_storage_device_normalized_throughput_total` | Represents the total number of IO transfers completed by this virtual device, normalized to 8KB transfers. | counter | `device` |
| `windows_hyperv_virtual_storage_device_lower_io_latency_seconds_total` | Represents the total IO transfer latency on the underlying storage subsystem for this virtual device. | counter | `device` |
| `windows_hyperv_virtual_storage_device_lower_queue_length` | **Deprecated:** use `rate(windows_hyperv_virtual_storage_device_lower_io_latency_seconds_total)`. Cumulative queue length in 100ns ticks, see below. | gauge | `device` |
| `windows_hyperv_virtual_storage_device_lower_latency_seconds` | **Deprecated:** use `windows_hyperv_virtual_storage_device_lower_io_latency_seconds_total`. Cumulative IO transfer latency in 100ns ticks, see below. | gauge | `device` |
| `windows_hyperv_io_quota_replenishment_rate` | Represents the IO quota replenishment rate for this virtual device. | gauge | `device` |
| `windows_hyperv_virtual_storage_device_io_quota_replenishment_total` | Represents the IO quota replenishment counter for this virtual device. Use `rate()` for the replenishment rate. | counter | `device` |
#### Deprecated latency and queue length metrics
@@ -493,19 +495,19 @@ _This collector does not yet have explained examples, we would appreciate your h
## Useful queries
Percent of physical CPU resources used per VM (on instance "localhost")
```
(sum (rate(windows_hyperv_hypervisor_virtual_processor_mode_time_total{state="hypervisor",instance="localhost"}[1m]))) / ignoring(state,vm) group_left max (windows_cpu_logical_processor{instance="localhost"}) / 100000
sum by (vm) (rate(windows_hyperv_hypervisor_virtual_processor_run_time_total{instance="localhost"}[1m])) / ignoring(vm) group_left max (windows_cpu_logical_processor{instance="localhost"}) * 100
```
Percent of physical CPU resources used by all VMs (on all monitored hosts)
```
(sum by (instance)(rate(windows_hyperv_hypervisor_virtual_processor_run_time_total{}[1m]))) / max by (instance)(windows_cpu_logical_processor{}) / 100000
(sum by (instance)(rate(windows_hyperv_hypervisor_virtual_processor_run_time_total{}[1m]))) / max by (instance)(windows_cpu_logical_processor{}) * 100
```
Percent of physical CPU resources by the hosts themselves (on all monitored hosts)
```
(sum by (instance)(rate(windows_hyperv_hypervisor_root_virtual_processor_total_run_time_total{}[1m]))) / sum by (instance)(windows_cpu_logical_processor{}) / 100000
(sum by (instance)(rate(windows_hyperv_hypervisor_root_virtual_processor_total_run_time_total{}[1m]))) / sum by (instance)(windows_cpu_logical_processor{}) * 100
```
Percent of physical CPU resources by the hypervisor (on all monitored hosts)
```
(sum by (instance)(rate(windows_hyperv_hypervisor_logical_processor_time_total{}[1m]))) / sum by (instance)(windows_cpu_logical_processor{}) / 100000
(sum by (instance)(rate(windows_hyperv_hypervisor_logical_processor_time_total{state="hypervisor"}[1m]))) / sum by (instance)(windows_cpu_logical_processor{}) * 100
```
## Alerting examples