title: Monitor disk throughput on Windows
agents: windows
author: Mathias Kettner <mk@mathias-kettner.de>
license: GPL
distribution: check_mk
description:
 This check measures the throughput of physical disk on Windows
 hosts by using the performance counter object {234}. The Check_MK
 agent for Windows sends this object in the section {<<<winperf_phydisk>>>}
 starting from version {1.1.11i1}. If you have defined the {counters}
 in {check_mk.ini}, please make sure, that the entry {234:phydisk}
 is present.

 Please add {"winperf.diskstat"} to you {ignored_checktypes} in {main.mk},
 if all of your agents support {winperf_phydisk}.

 This check share the same code and features as the check {diskstat},
 so the rest of this manual page is identical with that of diskstat.

 You can either have a single check for every single disk
 (which is the default) or a summary check summing up the throughput
 of all disks.

 You can apply separate warning and critical levels for the read
 and write throughput. Optionally you can have the check compute
 average values on a configurable time period and have the levels
 applied on the average instead of the current values. This makes
 it possible to ignore short "peaks" and only trigger and longer
 phases of high disk activity.

 The check also gives info on the IOPS.

item:
 Either {"SUMMARY"} for a summarized check of alls disks or the
 name of the disk device, e.g. {"C:"}.

examples:
 # alternative: create one check for all disks
 diskstat_inventory_mode = "summary"

 # Set default levels for diskstat
 diskstat_default_levels = {
   "read" :    (10, 20),   # level for read MB/sec
   "write" :   (20, 40),   # level for write MB/sec
   "average" : 15,         # averaging in minutes
 }

 # Alternative: just enable averaging over 10 minutes,
 # do not apply levels:
 diskstat_default_levels = {
     "average" : 15
 }

 # Settings for certain hosts:
 check_parameters += [
   ( {"write" : (20, 50), "average" : 10 }, [ "oracle" ], ALL_HOSTS, [ "Disk IO" ])
 ]

perfdata:
  The disk throughput for read and write in bytes per second. If averaging
  is turned on, then two additional values are sent: the averaged read and
  write throughput.

  In the legacy mode only one variable: the throughput since the last check
  in in bytes(!) per second, either for read or for write.

  The IOPS are returned if {"latency_perfdata"} is set to True.

inventory:
  The inventory is configured via {diskstat_inventory_mode}. If this is set
  to {"single"} (the default), then one check will be created for each
  disk. If it is set to {"summary"} then only one service per host will be
  created that has at least one hard disk. If set to {"legacy"} then a
  separate check for read and write will be created (deprecated).

[parameters]
"read": The levels to be applied to the read throughput. It this entry is
 {None} or missing in the dictionary, then no levels are applied. This is
 the defaut. The values are in MB per second. Setting {"read"} to {(20, 40)}
 will warn if 20 MB/s is exceeded and make the check critical at 40 MB/s.
 If averaging is turned on, then the levels are applied to the averaged
 values!

"write": The levels for the write throughput.

"average": If this is not {None}, it will be interpreted as a time range
 in minutes to do averaging over. Set this to {15} in order to have
 the levels applied to a 15-minute average instead of the current
 values (approx.). Turning the average on will also create two additional
 performance values. Make sure that your graphing tool is setup to
 a changing number of variables.

[configuration]
diskstat_defaul_levels(dict): The default parameter used for inventorized
                             checks. This is preset to the empty dictionary.
                              That means that no averaging is done and no
                              levels are applied.

diskstat_inventory_mode(string): Either {"single"} for one service per disk
 or {"summary"} for the throughput of all disks summed up in one service.
 Default is {"single"}.
