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

溫馨提示×

溫馨提示×

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

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

nagios_client_V1-sh

發布時間:2020-07-05 21:40:18 來源:網絡 閱讀:1970 作者: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.91/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

息烽县| 连江县| 松溪县| 于都县| 靖西县| 定西市| 岳普湖县| 政和县| 海原县| 扶沟县| 交城县| 兴隆县| 长宁区| 城步| 河源市| 桂东县| 樟树市| 达日县| 吉林市| 汉川市| 当涂县| 赞皇县| 江孜县| 中方县| 砀山县| 门头沟区| 昭觉县| 大连市| 竹北市| 二连浩特市| 河津市| 滨州市| 浦江县| 东兰县| 罗甸县| 高雄县| 滦平县| 平罗县| 嘉黎县| 昔阳县| 泸州市|