hyperv: fix virtual_storage_device_throughput metric to be a counter (not gauge) with _total suffix (#2285)

Co-authored-by: EisenbergD <dominik.eisenberg@beiersdorf.com>
This commit is contained in:
Dominik Eisenberg
2026-03-06 22:16:42 +01:00
committed by GitHub
parent de94cfd01a
commit a91caac92c
2 changed files with 4 additions and 4 deletions

View File

@@ -237,7 +237,7 @@ Some metrics explained: https://learn.microsoft.com/en-us/archive/blogs/chrisavi
| `windows_hyperv_virtual_storage_device_bytes_written` | Represents the total number of bytes that have been written on this virtual device. | counter | `device` | | `windows_hyperv_virtual_storage_device_bytes_written` | Represents the total number of bytes that have been written on this virtual device. | counter | `device` |
| `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_operations_written_total` | Represents the total number of write operations that have occurred on this virtual device. | counter | `device` |
| `windows_hyperv_virtual_storage_device_latency_seconds` | Represents the average IO transfer latency for this virtual device. | gauge | `device` | | `windows_hyperv_virtual_storage_device_latency_seconds` | Represents the average IO transfer latency for this virtual device. | gauge | `device` |
| `windows_hyperv_virtual_storage_device_throughput` | Represents the average number of 8KB IO transfers completed by this virtual device. | 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_normalized_throughput` | Represents the average number of IO transfers completed by this virtual device. | gauge | `device` |
| `windows_hyperv_virtual_storage_device_lower_queue_length` | Represents the average queue length on the underlying storage subsystem for this device. | gauge | `device` | | `windows_hyperv_virtual_storage_device_lower_queue_length` | Represents the average queue length on the underlying storage subsystem for this device. | gauge | `device` |
| `windows_hyperv_virtual_storage_device_lower_latency_seconds` | Represents the average IO transfer latency on the underlying storage subsystem for this virtual device. | gauge | `device` | | `windows_hyperv_virtual_storage_device_lower_latency_seconds` | Represents the average IO transfer latency on the underlying storage subsystem for this virtual device. | gauge | `device` |

View File

@@ -112,8 +112,8 @@ func (c *Collector) buildVirtualStorageDevice() error {
nil, nil,
) )
c.virtualStorageDeviceThroughput = prometheus.NewDesc( c.virtualStorageDeviceThroughput = prometheus.NewDesc(
prometheus.BuildFQName(types.Namespace, Name, "virtual_storage_device_throughput"), prometheus.BuildFQName(types.Namespace, Name, "virtual_storage_device_throughput_total"),
"Represents the average number of 8KB IO transfers completed by this virtual device.", "Represents the total number of 8KB IO transfers completed by this virtual device.",
[]string{"device"}, []string{"device"},
nil, nil,
) )
@@ -203,7 +203,7 @@ func (c *Collector) collectVirtualStorageDevice(ch chan<- prometheus.Metric) err
ch <- prometheus.MustNewConstMetric( ch <- prometheus.MustNewConstMetric(
c.virtualStorageDeviceThroughput, c.virtualStorageDeviceThroughput,
prometheus.GaugeValue, prometheus.CounterValue,
data.VirtualStorageDeviceThroughput, data.VirtualStorageDeviceThroughput,
data.Name, data.Name,
) )