Nagios monitoring iostatThe specific steps are as follows!
NetSeek wrote an article is to use nagios monitoring iostat, But he uses the source code package compilation, specific can refer to his article http://bbs.linuxtone.org/thread-2289-1-1.html
However, the compilation method may be inconvenient for multi-host deployment, so I checked the rpm package on the Internet for nagios to monitor iostat.
Mosquito my environment is centos5, so the packages I downloaded are all rhel5, and if you need other environments, I will give them below. You should find your own suitable environment.
Http://packages.sw.be/perl-Nagios-Plugin/perl-Nagios-Plugin-0.33-1.el5.rf.noarch.rpm
Http://dag.wieers.com/rpm/packages/perl-Class-Accessor/perl-Class-Accessor-0.31-1.el5.rf.noarch.rpm
Http://dag.wieers.com/rpm/packages/perl-Config-Tiny/perl-Config-Tiny-2.12-1.el5.rf.noarch.rpm
Http://dag.wieers.com/rpm/packages/perl-Math-Calc-Units/perl-Math-Calc-Units-1.06-1.el5.rf.noarch.rpm
Http://dag.wieers.com/rpm/packages/perl-Params-Validate/perl-Params-Validate-0.89-1.el5.rf.i386.rpm (32-bit)
Http://dag.wieers.com/rpm/packages/perl-Params-Validate/perl-Params-Validate-0.89-1.el5.rf.x86_64.rpm (64-bit)
Http://dag.wieers.com/rpm/packages/perl-Regexp-Common/perl-Regexp-Common-2.120-1.2.el5.rf.noarch.rpm
To download packages from other environments, go to the following link:
Perl-nagios-plugin http://packages.sw.be/perl-Nagios-Plugin/
Perl-class-accessor http://dag.wieers.com/rpm/packages/perl-Class-Accessor/
Perl-config-tiny http://dag.wieers.com/rpm/packages/perl-Config-Tiny/
Perl-math-calc-units http://dag.wieers.com/rpm/packages/perl-Math-Calc-Units/
Perl-params-validate http://dag.wieers.com/rpm/packages/perl-Params-Validate/
Perl-regexp-common http://dag.wieers.com/rpm/packages/perl-Regexp-Common/
Next we will play our leading role. The monitoring script check_iostat is
Http://www.ofn.dk/files/software/check_iostat
Download this file to/path/to/nagios/libexec and grant the execution permission. Then, you can run this script to view the returned values.
#./Check_iostat
Iostat OK-user 0.50 nice 0.01 sys 1.47 iowait 2.09 idle 0.00 | iowait = 2.09%; idle = 0.00%; user = 0.50%; nice = 0.01%; sys = 1.47% ;;
Of course, the iostat command is required. If the following error occurs during execution
#./Check_iostat
Can't exec "iostat": No such file or directory at./check_iostat line 69.
Iostat unknown-Error executing iostat command