CentOS 6.3_Nagios配置笔记
5、重启 [root@nagios ~]#service nagios restart [root@nagios ~]#service httpd restart 6、测试无法访问,检查一下IPtables是否关闭。 [root@nagios ~]# service iptables status 添加nrpe 5666端口: [root@nagios ~]# vim /etc/sysconfig/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 5666 -j ACCEPT [root@nagios ~]# service iptables restart 测试一下监控机使用check_nrpe与被监控机运行的nrpedaemon之间的通信. [root@nagios ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.7.93 //被监控制端IP地址 NRPE v2.14 二、Linux被监控主机配置(IP:192.168.7.93) 1、增加用户 [root@web ~]# useradd nagios [root@web ~]# passwd nagios 2、安装nagios插件 解压缩 [root@web ~]# tar -zxvf nagios-plugins-1.4.16.tar.gz [root@web ~]# cd nagios-plugins-1.4.16 编译安装 [root@web nagios-plugins-1.4.16]# ./configure --with-nagios-user=nagios --with-nagios-group=nagios [root@web nagios-plugins-1.4.16]# make;make install 这一步完成后会在/usr/local/nagios/下生成两个目录libexec和share [root@web ~]# ls /usr/local/nagios/ include libexec share 改变目录权限使nagios用户能够访问 [root@web ~]# chown -R nagios.nagios /usr/local/nagios [root@web ~]# chown -R nagios.nagios /usr/local/nagios/libexec 3、安装nrpe服务 解压缩 [root@web ~]# tar -zxvf nrpe-2.14.tar.gz [root@web ~]# cd nrpe-2.14 编译 [root@web nrpe-2.14]#./configure 输出如下 *** Configuration summary for nrpe 2.8.1 05-10-2007 ***: General Options: ------------------------- NRPE port: 5666 NRPE user: nagios NRPE group: nagios Nagios user: nagios Nagios group: nagios Review the options above for accuracy. If they look okay, type 'make all' to compile the NRPE daemon and client. (编辑:徐州站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |