Check Disk IO – Nagios

Quick steps to start checking disk i/o with nagios.

  1. wget  –no-check-certificate https://trac.id.ethz.ch/projects/nagios_plugins/downloads/check_diskio-3.2.3.tar.gz
  2. tar -xzvf check_diskio-3.2.3.tar.gz
  3. cd check_diskio-3.2.3
  4. vi check_diskio
    1. change line 1 to #!/usr/bin/perl, save and exit.
  5. apt-get install libnagios-plugin-perl libarray-unique-perl libfile-slurp-perl liblist-moreutils-perl libnumber-format-perl libreadonly-perl
  6. cp check_diskio /usr/local/icinga/libexec/check_diskio.pl
  7. vi /usr/local/icinga/etc/nrpe.cfg
    1. add the following line: command[check_diskio]=/usr/local/icinga/libexec/check_diskio.pl -d /dev/dm-0 -w 200 -c 300
    2. killall nrpe
    3. /usr/local/icinga/bin/nrpe -n -c /usr/local/icinga/etc/nrpe.cfg -d to restart nrpe daemon.
  8. modify config accordingly on the server and restart icinga.

Test:

./check_diskio -d / -w 200 -c 300