nagios_client_V2_sh
#!/bin/shfunctionnagios(){yuminstallgccglibcglibc-commonopenssl-develdos2unix-y/usr/sbin/useradd-mnagios-s/sbin/nologincd/application/tools/unzipoldboy_training_nagios_soft.zipyum-yinstallperl-develtarzxfnagios-plugins-1.4.16.tar.gzcdnagios-plugins-1.4.16./configure--prefix=/application/nagios--enable-perl-modules--enable-redhat-pthread-workaroundmake&&makeinstallcd../#ls/application/nagios/libexec/|wc-l#----------------------------------------cd/application/tools/tarzxfnrpe-2.12.tar.gzcdnrpe-2.12./configure--prefix=/application/nagiosmakeallmakeinstall-pluginmakeinstall-daemonmakeinstall-daemon-configcd..#----------------------------------------cd/application/tools/tarzxvfParams-Validate-0.91.tar.gzcdParams-Validate-0.91perlMakefile.PLmakemakeinstallcd..#----------------------------------------cd/application/tools/tarzxvfClass-Accessor-0.31.tar.gzcdClass-Accessor-0.31perlMakefile.PLmakemakeinstallcd..#----------------------------------------cd/application/tools/tarzxvfConfig-Tiny-2.12.tar.gzcdConfig-Tiny-2.12perlMakefile.PLmakemakeinstallcd..#----------------------------------------cd/application/tools/tarzxvfMath-Calc-Units-1.07.tar.gzcdMath-Calc-Units-1.07perlMakefile.PLmakemakeinstallcd..#----------------------------------------cd/application/tools/tarzxvfRegexp-Common-2010010201.tar.gzcdRegexp-Common-2010010201perlMakefile.PLmakemakeinstallcd..#----------------------------------------cd/application/tools/tarzxvfNagios-Plugin-0.34.tar.gzcdNagios-Plugin-0.34perlMakefile.PLmakemakeinstallcd..#----------------------------------------cd/application/tools/yuminstallsysstat-y/bin/cp/application/tools/check_memory.pl/application/nagios/libexec/bin/cp/application/tools/check_iostat/application/nagios/libexecchmod755/application/nagios/libexec/check_memory.plchmod755/application/nagios/libexec/check_iostatdos2unix/application/nagios/libexec/check_iostatdos2unix/application/nagios/libexec/check_memory.pl#----------------------------------------/bin/cp/application/nagios/etc/nrpe.cfg/application/nagios/etc/nrpe.cfg.oriperl-pi-e's/allowed_hosts=127.0.0.1/allowed_hosts=127.0.0.1,192.168.2.78/g'/application/nagios/etc/nrpe.cfgcp/application/nagios/etc/nrpe.cfg/application/nagios/etc/nrpe.cfg.orised-i'199,203d'/application/nagios/etc/nrpe.cfgecho"command[check_load]=/usr/local/nagios/libexec/check_load-w15,10,6-c30,25,20">>/application/nagios/etc/nrpe.cfgecho"command[check_mem]=/usr/local/nagios/libexec/check_memory.pl-w6%-c3%">>/application/nagios/etc/nrpe.cfgecho"command[check_disk]=/usr/local/nagios/libexec/check_disk-w20%-c8%-p/">>/application/nagios/etc/nrpe.cfgecho"command[check_swap]=/usr/local/nagios/libexec/check_swap-w20%-c10%">>/application/nagios/etc/nrpe.cfgecho"command[check_iostat]=/usr/local/nagios/libexec/check_iostat-w6-c10">>/application/nagios/etc/nrpe.cfgpkillnrpesleep2/application/nagios/bin/nrpe-c/application/nagios/etc/nrpe.cfg-decho"#nagiosnrpeprocesscmdbyliycwing2014-12-25">>/etc/rc.localecho"/application/nagios/bin/nrpe-c/application/nagios/etc/nrpe.cfg-d">>/etc/rc.localnetstat-lnt|grep5666&&echo"nagiosclientisok"}nagios
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。