Nagios NRPE监控远程主机具体步骤如下。
1. 监控机的软件的安装
监控机安装NRPE wget /sourceforge/nagios/nrpe-2.12.tar.gz tar zxvf nrpe-2.12.tar.gz cd nrpe-2.12 ./configure --prefix=/usr/local/nagios make all make install-plugin
#监控机只需安装到这步
2. 被监控机的软件的安装
被监控机添加用户
groupadd nagios
useradd -g nagios -d /usr/local/nagios -s /sbin/nologin nagios
被监控机安装plugin
wget /sourceforge/nagiosplug/nagios-plugins-1.4.13.tar.gz
tar zxf nagios-plugins-1.4.13.tar.gz
cd nagios-plugins-1.4.13
./configure --with-nagios-user=nagios --with-nagios-group=nagios --prefix=/usr/local/nagios --with-ping-command="/bin/ping" --with-mysql=/opt/mysql
make
make install
#查看播件文件是否已安装在这个目录
ls /usr/local/nagios/libexec
被监控机安装NRPE
wget /sourceforge/nagios/nrpe-2.12.tar.gz tar zxvf nrpe-2.12.tar.gz
cd nrpe-2.12
./configure --prefix=/usr/local/nagios
make all
make install-plugin
make install-daemon
make install-daemon-config
cp init-script /etc/init.d/nagios-nrpe
chown -R nagios:nagios /usr/local/nagios
3. 被监控机的配置