Skip to content

Latest commit

 

History

History
61 lines (44 loc) · 1.98 KB

README.asciidoc

File metadata and controls

61 lines (44 loc) · 1.98 KB

Nagios GUI Screenshot

Check Disk Stat

Linux disk IO check. Reads /sys filesystem directly to query tps, read, write, avg. request size, avg. queue size and avg. wait time.

Capable of graphing and alerting on the disk queue length as seen in `iostat -x'.

INSTALL

Example:

wget https://raw.github.com/mclarkson/check_diskstat/master/check_diskstat.sh
chmod +x check_diskstat.sh
mv check_diskstat.sh /usr/lib64/nagios/plugins/

EXAMPLE OUTPUT

$ ./check_diskstat.sh -d sda -W 10 -C 20
summary: 3 io/s, read 32 sectors (0kB/s), write 4216 sectors (43kB/s), queue size 0 in 48 seconds |
tps=3io/s;;; read=341b/s;;; write=44970b/s;;; avgrq-sz=24;;; avgqu-sz=0;10;20; await=43ms;;;

MANUAL PAGE

./check_diskstat.sh -d DEVICE [ -w tps,read,write -c tps,read,write ]
    | [ -W qlen -C qlen ] | -h

This plug-in is used to be alerted when maximum hard drive io/s, bytes
read|write/s or average queue length is reached.

  -d DEVICE            DEVICE must be without /dev (ex: -d sda).
                       To specify a LVM logical volume use:
                       volgroup/logvol.
                       To specify symlink from /dev/disk/ use full path, ex:
                       /dev/disk/by-id/scsi-35000c50035006fb3
  -w/c TPS,READ,WRITE  TPS means transfer per seconds (aka IO/s)
                       READ and WRITE are in bytes per seconds
  -W/C NUM             Use average queue length thresholds instead..
  -b                   Brief output.
  -s                   silent output: no warnings or critials are issued

Performance data for graphing is supplied for tps, read, write, avgrq-sz,
avgqu-sz and await (see iostat man page for details).

Example: Tps, read and write thresholds:
    ./check_diskstat.sh -d sda -w 200,100000,100000 -c 300,200000,200000

Example: Average queue length threshold:
    ./check_diskstat.sh -d sda -W 50 -C 100