附件里面带了check_mysql,check_mem,两个监控插件,安装方法一样
--------------------------------------------------------------------------
安装软件太麻烦了,写个小脚本帮助自己减少工作量:
#!/bin/bash
yum install -y perl-dev* perl-CPAN
tar -zxvf Nagios-Plugin-0.31.tar.gz
cd Nagios-Plugin-0.31
perl Makefile.PL
make && make install
cd ..
tar -zxvf Params-Validate-0.91.tar.gz
cd Params-Validate-0.91
perl Makefile.PL
make && make install
cd ..
tar -zxvf Math-Calc-Units-1.06.tar.gz
cd Math-Calc-Units-1.06
perl Makefile.PL
make && make install
cd ..
tar -zxvf Regexp-Common-2.122.tar.gz
cd Regexp-Common-2.122
perl Makefile.PL
make && make install
cd ..
tar -zxvf Class-Accessor-0.31.tar.gz
cd Class-Accessor-0.31
perl Makefile.PL
make && make install
cd ..
tar -zxvf Config-Tiny-2.12.tar.gz
cd Config-Tiny-2.12
perl Makefile.PL
make && make install
cd ..
mv /opt/src/check_io/check_iostat /usr/local/nagios/libexec/
dos2unix /usr/local/nagios/libexec/check_iostat
chmod 755 /usr/local/nagios/libexec/check_iostat
chown nagios.nagios /usr/local/nagios/libexec/check_iostat
这是安装时用到的所有软件
check_iostat 所有的软件包
-----------排错-----------
1 错误:
Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 7.
BEGIN failed--compilation aborted at Makefile.PL line 7.
make: *** No targets specified and no makefile found. Stop.
Can't locate CPAN.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).
BEGIN failed--compilation aborted.