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