91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

nagios_client_V2_sh

發布時間:2020-07-24 18:20:32 來源:網絡 閱讀:7797 作者:Liyanchaolinux 欄目:移動開發
#!/bin/sh
function nagios(){
yum install gcc glibc glibc-common openssl-devel dos2unix -y
/usr/sbin/useradd -m nagios -s /sbin/nologin
cd /application/tools/
unzip oldboy_training_nagios_soft.zip
yum -y install perl-devel
tar zxf nagios-plugins-1.4.16.tar.gz
cd nagios-plugins-1.4.16
./configure --prefix=/application/nagios --enable-perl-modules --enable-redhat-pthread-workaround 
make && make install
cd ../
#ls /application/nagios/libexec/|wc -l
#----------------------------------------
cd /application/tools/
tar zxf nrpe-2.12.tar.gz
cd nrpe-2.12
./configure  --prefix=/application/nagios
make all
make install-plugin
make install-daemon
make install-daemon-config
cd ..
#----------------------------------------
cd /application/tools/
tar zxvf Params-Validate-0.91.tar.gz 
cd Params-Validate-0.91 
perl Makefile.PL 
make  
make install 
cd .. 
#----------------------------------------
cd /application/tools/
tar zxvf Class-Accessor-0.31.tar.gz
cd Class-Accessor-0.31
perl Makefile.PL
make
make install
cd ..
#----------------------------------------
cd /application/tools/
tar zxvf Config-Tiny-2.12.tar.gz
cd Config-Tiny-2.12
perl Makefile.PL
make
make install
cd ..
#----------------------------------------
cd /application/tools/
tar zxvf Math-Calc-Units-1.07.tar.gz
cd Math-Calc-Units-1.07
perl Makefile.PL
make
make install
cd ..
#----------------------------------------
cd /application/tools/
tar zxvf Regexp-Common-2010010201.tar.gz
cd Regexp-Common-2010010201
perl Makefile.PL
make
make install
cd ..
#----------------------------------------
cd /application/tools/
tar zxvf Nagios-Plugin-0.34.tar.gz
cd Nagios-Plugin-0.34
perl Makefile.PL
make
make install
cd ..
#----------------------------------------
cd /application/tools/
yum install sysstat -y
/bin/cp /application/tools/check_memory.pl /application/nagios/libexec
/bin/cp /application/tools/check_iostat /application/nagios/libexec

chmod 755 /application/nagios/libexec/check_memory.pl
chmod 755 /application/nagios/libexec/check_iostat
dos2unix /application/nagios/libexec/check_iostat
dos2unix /application/nagios/libexec/check_memory.pl

#----------------------------------------
/bin/cp /application/nagios/etc/nrpe.cfg /application/nagios/etc/nrpe.cfg.ori
perl -pi -e 's/allowed_hosts=127.0.0.1/allowed_hosts=127.0.0.1,192.168.2.78/g' /application/nagios/etc/nrpe.cfg 
cp  /application/nagios/etc/nrpe.cfg  /application/nagios/etc/nrpe.cfg.ori
sed -i '199,203d'  /application/nagios/etc/nrpe.cfg
echo "command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,6 -c 30,25,20">>/application/nagios/etc/nrpe.cfg
echo "command[check_mem]=/usr/local/nagios/libexec/check_memory.pl -w 6% -c 3%">>/application/nagios/etc/nrpe.cfg
echo "command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 8% -p /">>/application/nagios/etc/nrpe.cfg
echo "command[check_swap]=/usr/local/nagios/libexec/check_swap -w 20% -c 10%">>/application/nagios/etc/nrpe.cfg
echo "command[check_iostat]=/usr/local/nagios/libexec/check_iostat -w 6 -c 10">>/application/nagios/etc/nrpe.cfg
pkill nrpe 
sleep 2
/application/nagios/bin/nrpe -c /application/nagios/etc/nrpe.cfg -d
echo  "#nagios nrpe process cmd by liycwing 2014-12-25" >> /etc/rc.local
echo "/application/nagios/bin/nrpe -c /application/nagios/etc/nrpe.cfg -d">>/etc/rc.local
netstat -lnt|grep 5666 && echo "nagios client is ok"
}
nagios


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

常州市| 礼泉县| 壤塘县| 庆云县| 焉耆| 许昌市| 临泽县| 岳普湖县| 剑川县| 东丰县| 彭阳县| 安仁县| 文安县| 长丰县| 舞钢市| 广平县| 延津县| 华阴市| 崇仁县| 廉江市| 兴海县| 萨嘎县| 赤城县| 金华市| 金山区| 闵行区| 尚志市| 扎赉特旗| 五莲县| 林甸县| 昌吉市| 铜川市| 邵阳县| 莱州市| 大厂| 彝良县| 义马市| 海淀区| 东兴市| 沾化县| 黄平县|