安裝nrpe依賴包
sudo apt-get install gcc glibc glibc-common openssl libssl-dev xinetd
如果nrpe-2.15# ./configure 還是一樣的錯誤!
那么,執行:
dpkg -L libssl-dev
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
…………………………
/nrpe-2.15# ./configure --with-ssl-lib=/usr/lib/x86_64-linux-gnu
就可以解決問題??!
2.安裝nagios-plugin
useradd nagios
wget http://sourceforge.net/projects/nagiosplug/files/nagiosplug/1.4.15/nagios-plugins-1.4.15.tar.gz/download
tar zxf nagios-plugins-1.4.15.tar.gz && cd nagios-plugins-1.4.15
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
chown -R nagios.nagios /usr/local/nagios
3.安裝nrpe
wget http://nchc.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.12/nrpe-2.12.tar.gz
tar zxf nrpe-2.12.tar.gz && cd nrpe-2.12
./configure
make all
make install-plugin
make install-daemon
make install-daemon-config
make install-xinetd
成都創新互聯是一家專業提供臨高企業網站建設,專注與成都做網站、網站建設、H5場景定制、小程序制作等業務。10年已為臨高眾多企業、政府機構等服務。創新互聯專業網絡公司優惠進行中。
more /etc/xinetd.d/nrpe
only_from ++++ ip
4.啟動nrpe并設置開機自啟動
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
echo "/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d" >> /etc/rc.d/rc.local
5.測試
在nagios服務端檢測nrpe和服務端的連接狀態
/usr/local/nagios/libexec/check_nrpe -H 192.168.10.101
運行正常的話將返回nrpe的版本號