service httpd start (如果遇到Starting httpd: httpd: Could not reliably determine the server's fully quali)
vi /etc/httpd/conf/httpd.conf 把ServerName www.example.com:80的注释去掉
4安装nagios-plugins
tar zxvf nagios-plugins
cd nagios-plugins
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
tar zvxf nrpe-2.13
cd nrpe-2.13
./configure --with-nrpe-user=nagios \
--with-nrpe-group=nagios \
--with-nagios-user=nagios \
--with-nagios-group=nagios \
--enable-command-args \
--enable-ssl
make all
make install-plugin
----------------------------------------------------------------------------------------------------------
nagios监控Linux客户端的配置
添加用户
useradd -s /sbin/nologin nagios
tar xf nagios-plugins
cd nagios-plugins
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make all
make install
2.安装nrpe
tar zvxf nrpe-2.13
cd nrpe-2.13
./configure --with-nrpe-user=nagios \
--with-nrpe-group=nagios \
--with-nagios-user=nagios \
--with-nagios-group=nagios \
--enable-command-args \
--enable-ssl
make all
make install-plugin
make install-daemon
make install-daemon-config
3配置nrpe
vim /usr/local/nagios/etc/nrpe.cfg
修改 allowed_hosts=192.168.142.11
4启动nrpe
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
或者通过脚本
vim /etc/init.d/nrpe