physical_disk collector

February 22, 2025 ยท View on GitHub

The physical_disk collector exposes metrics about physical disks

Metric name prefixphysical_disk
Data sourcePerflib
CountersphysicalDisk (Win32_PerfRawData_PerfDisk_physicalDisk)
Enabled by default?Yes

Flags

--collector.physical_disk.disk-include

If given, a disk needs to match the include regexp in order for the corresponding disk metrics to be reported

--collector.physical_disk.disk-exclude

If given, a disk needs to not match the exclude regexp in order for the corresponding disk metrics to be reported

Metrics

NameDescriptionTypeLabels
windows_physical_disk_requests_queuedThe number of requests queued to the disk (PhysicalDisk.CurrentDiskQueueLength)Gaugedisk
windows_physical_disk_read_bytes_totalThe number of bytes transferred from the disk during read operations (PhysicalDisk.DiskReadBytesPerSec)Counterdisk
windows_physical_disk_reads_totalThe number of read operations on the disk (PhysicalDisk.DiskReadsPerSec)Counterdisk
windows_physical_disk_write_bytes_totalThe number of bytes transferred to the disk during write operations (PhysicalDisk.DiskWriteBytesPerSec)Counterdisk
windows_physical_disk_writes_totalThe number of write operations on the disk (PhysicalDisk.DiskWritesPerSec)Counterdisk
windows_physical_disk_read_seconds_totalSeconds that the disk was busy servicing read requests (PhysicalDisk.PercentDiskReadTime)Counterdisk
windows_physical_disk_write_seconds_totalSeconds that the disk was busy servicing write requests (PhysicalDisk.PercentDiskWriteTime)Counterdisk
windows_physical_disk_idle_seconds_totalSeconds that the disk was idle (PhysicalDisk.PercentIdleTime)Counterdisk
windows_physical_disk_split_ios_totalThe number of I/Os to the disk that were split into multiple I/Os (PhysicalDisk.SplitIOPerSec)Counterdisk
windows_physical_disk_read_latency_seconds_totalThe average time, in seconds, of a read operation from the disk (PhysicalDisk.AvgDiskSecPerRead)Counterdisk
windows_physical_disk_write_latency_seconds_totalThe average time, in seconds, of a write operation to the disk (PhysicalDisk.AvgDiskSecPerWrite)Counterdisk
windows_physical_disk_read_write_latency_seconds_totalThe time, in seconds, of the average disk transfer (PhysicalDisk.AvgDiskSecPerTransfer)Counterdisk

Warning about size metrics

The free_bytes and size_bytes metrics are not updated in real time and might have a delay of 10-15min. This is the same behavior as the windows performance counters.

Example metric

Query the rate of write operations to a disk

rate(windows_physical_disk_read_bytes_total{instance="localhost", disk=~"0"}[2m])

Useful queries

Calculate rate of total IOPS for disk

rate(windows_physical_disk_reads_total{instance="localhost", disk=~"0"}[2m]) + rate(windows_physical_disk_writes_total{instance="localhost", disk=~"0"}[2m])

Alerting examples

This collector does not yet have alerting examples, we would appreciate your help adding them!