check_drive_io

Checks the disk I/O on the host.

Implementation

WindowsLinuxFreeBSDmacOS
✅✅✅✅

Argument Defaults

ArgumentDefault Value
warningutilization > 95
empty-state3 (UNKNOWN)
empty-syntax%(status) - No drives found
top-syntax%(status) - %(list)
ok-syntax%(status) - %(list)
detail-syntax%(drive){{ IF label ne ’’ }} (%(label)){{ END }} >%(write_bytes_rate_humanized) <%(read_bytes_rate_humanized) %(utilization)%

Check Specific Arguments

ArgumentDescription
driveDrives to check for I/O statistics, for example C: or sda. Leave empty to check all drives
lookbackLookback period in seconds for rate and utilization calculations. Default: 300

Attributes

Filter Keywords

Use these attributes in filters and thresholds, along with the default attributes:

AttributeDescription
driveDrives to check for I/O statistics. Leave empty to check all drives. Use the drive letter on Windows or the logical drive name on UNIX.
lookbackLookback period for rate and utilization calculations.
read_countTotal number of read operations completed successfully
read_count_rateNumber of read operations per second during the lookback period
read_bytesTotal number of bytes read from the disk
read_bytes_rateAverage bytes read per second during the lookback period
read_bytes_rate_humanizedAverage bytes read per second during the lookback period, in human-readable format
read_timeTotal time spent on read operations (milliseconds).
write_countTotal number of write operations completed successfully
write_count_rateNumber of write operations per second during the lookback period
write_bytesTotal number of bytes written to the disk
write_bytes_rateAverage bytes written per second during the lookback period
write_bytes_rate_humanizedAverage bytes written per second during the lookback period, in human-readable format
write_timeTotal time spent on write operations (milliseconds).
labelLabel of the drive. Windows does not report this.
io_timeTotal time during which the disk had at least one active I/O (milliseconds). Windows does not report this.
io_time_rateChange in I/O time per second. Windows does not report this.
weighted_ioMeasure of both I/O completion time and the number of backlogged requests. Windows does not report this.
utilizationPercentage of time the disk was busy (0-100%). Windows does not report this.
iops_in_progressNumber of I/O operations currently in flight. Windows does not report this.
idle_timeCount of the 100 ns periods the disk was idle. Windows only
query_timeThe time the performance query was sent. Count of 100 ns periods since the Win32 epoch of 01.01.1601. Windows only
queue_depthThe depth of the I/O queue. Windows only.
split_countThe cumulative count of I/Os that are associated I/Os. Windows only.

Examples

Default Check

check_drive_io
OK - C >20.1 MiB/s <1.4 GiB/s 41.2% |'C_read_count'=4791920c;;;0; 'C_read_bytes'=1729039767552c;;;0; 'C_read_time'=119710.31709ms;;;0; 'C_write_count'=2260624c;;;0; 'C_write_bytes'=479384686592c;;;0; 'C_write_time'=89071.67515ms;;;0; 'C

_utilization’=41.2%;95;;0; ‘C_queue_depth’=0;;;0;

Check a UNIX drive. Alert if its write rate over the last 30 seconds exceeds 10 Mb/s. Dm-0 is the encrypted volume’s name. The name could also be nvme0n1 or sdb.

check_drive_io lookback=30 warn="write_bytes_rate > 10Mb"
OK - dm-0 >1.8 MiB/s/s <815.0 B/s/s 0.0%, sda1 >0 B/s/s <0 B/s/s 0.0% |'dm-0_read_count'=396738362c;;;0; 'dm-0_read_bytes'=33871348975616c;;;0; 'dm-0_read_time'=2990729692ms;;;0; 'dm-0_write_count'=624158141c;;;0; 'dm-0_write_bytes'=36083702012416c;;;0; 'dm-0_write_time'=1412729952ms;;;0; 'dm-0_utilization'=0%;95;;0; 'dm-0_io_time'=738627512ms;;;0; 'dm-0_weighted_io'=108492348;;;0; 'dm-0_iops_in_progress'=0;;;0; 'sda1_read_count'=3178c;;;0; 'sda1_read_bytes'=67430400c;;;0; 'sda1_read_time'=13572ms;;;0; 'sda1_write_count'=3193c;;;0; 'sda1_write_bytes'=282012672c;;;0; 'sda1_write_time'=9446ms;;;0; 'sda1_utilization'=0%;95;;0; 'sda1_io_time'=10832ms;;;0; 'sda1_weighted_io'=23019;;;0; 'sda1_iops_in_progress'=0;;;0;

Example using check_snclient and Naemon

Naemon Config

define command{
    command_name         check_snclient
    command_line         $USER1$/check_snclient -k -p 'your-password' -u 'https://$HOSTADDRESS$:8443' $ARG1$ $ARG2$
}

define service {
    host_name            testhost
    service_description  check_drive_io
    use                  generic-service
    check_command        check_snclient!check_drive_io!
}