|
1、下载nrpe2.15
wget http://cznic.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz
2、yum install openssl openssl-devel
cd nrpe-2.15
./configure --enable-ssl --with-nagios-user=nagios --with-nagios-group=nagcmd --with-nrpe-user=nagios --with-nrpe-group=nagcmd
make all
make install-plugin
make install-daemon
make install-daemon-config
make install-xinetd
3、编辑nrpe配置文件,增加监控机地址:
vi /etc/xinetd.d/nrpe
only_from = nagios-server-ip,127.0.0.1
4、修改services文件,增加端口
vi /etc/services
nrpe 5666/tcp #NRPE
3、启动 nrpe
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
设置开机启动
vi /etc/rc.d/rc.local加入/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
验证是否启动
netstat -an |grep 5666
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN
|
|
|
|
|
|
|