如果想要监控远程linux主机需要安装nrpe
添加用户
groupadd nagios
useradd nagios -g nagios -s /sbin/nologin
安装nrpe
tar -xf nrpe-2.12.tar.gz
cd nrpe-2.12
./configure --enable-command-args
make all
make install-plugin
make install-daemon
make install-daemon-config
安装nagios-plugin
tar -xf nagios-plugins-2.2.1.tar.gz
cd nagios-plugins-2.2.1
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make && make install
修改配置
vi /usr/local/nagios/conf/nrpe.cfg
#添加nagios服务器ip
allowed_hosts=127.0.0.1,192.168.188.222
启动nrpe
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
检验
/usr/local/nagios/libexec/check_nrpe -H127.0.0.1
NRPE v2.12
网友评论