频道栏目
首页 > 资讯 > Linux > 正文

VMware Linux下Nagios监控远程主机的简单设置

16-06-27        来源:[db:作者]  
收藏   我要投稿
测试的主机为两台虚拟机
vm linux1:192.168.1.122 //作为监控主机
vmlinux2:192.168.1.192 //作为被监控的主机
首先是被监控主机的设置
相关阅读:
VMware Linux下Nagios的安装 http://www.linuxidc.com/Linux/2011-11/47908.htm
VMware Linux下Nagios的基本配置 http://www.linuxidc.com/Linux/2011-11/47909.htm
VMware Linux下Nagios和PNP的整合 http://www.linuxidc.com/Linux/2011-11/47910.htm
[root@localhost ~]# ls nagios-plugins-1.4.15.tar.gz //安装nagios的套件
nagios-plugins-1.4.15.tar.gz
[root@localhost ~]# tar zxvf nagios-plugins-1.4.15.tar.gz
[root@localhost nagios-plugins-1.4.15]# useradd -s /sbin/nologin nagios
[root@localhost nagios-plugins-1.4.15]# ./configure
[root@localhost nagios-plugins-1.4.15]# make;make install
[root@localhost nagios-plugins-1.4.15]# cd /usr/local/
[root@localhost local]# chown nagios:nagios nagios/
[root@localhost local]# chown nagios:nagios -R nagios/libexec/
[root@localhost ~]# ls nrpe-2.8b1.tar.gz //这里就是安装配置nrpe的部分
nrpe-2.8b1.tar.gz
[root@localhost ~]# tar zxvf nrpe-2.8b1.tar.gz
[root@localhost ~]# cd nrpe-2.8b1
[root@localhost nrpe-2.8b1]# ./configure
[root@localhost nrpe-2.8b1]# make all
[root@localhost nrpe-2.8b1]# make install-plugin
[root@localhost nrpe-2.8b1]# make install-daemon
[root@localhost nrpe-2.8b1]# make install-daemon-config
当然啦,你如果英语不错的话,直接参考分包内的说明安装(以下)
../../article/20220623/file.html
../../article/20220623/file.html
[root@localhost ~]# cd /usr/local/nagios/etc/
[root@localhost etc]# vi nrpe.cfg //修改主配置档
server_address=192.168.1.192 //被监控主机ip
allowed_hosts=127.0.0.1,192.168.1.122,192.168.1.192 //这里是监控主机的设置,为了检测使用,本机的ip也加上
[root@localhost etc]# /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d //启动nrpe这个守护进程
[root@localhost etc]# netstat -tulnp|grep 5666
tcp 0 0 192.168.1.192:5666 0.0.0.0:* LISTEN 3384/nrpe
[root@localhost etc]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.192 //nrpe是否正常工作时的检测
NRPE v2.8b1
相关TAG标签
上一篇:6月27日-每日安全知识热点
下一篇:VMware Linux下Nagios的基本配置
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站