手机版
你好,游客 登录 注册
背景:
阅读新闻

Nagios 监控Linux服务器

[日期:2013-03-05] 来源:Linux社区  作者:hundange [字体:大 中 小]

一、nagios监控linux基本流程
 
1.nagios 运行check_nrpe插件,检查配置文件需要检测的对象
 
2.check_nrpe插件会通过SSL连接到远程的NRPE daemon
 
3.NRPE daemon会运行相应的nagios插件来执行检查本地资源或服务
 
4.NRPE daemon将检查的结果返回给check_nrpe插件,插件将其提交给nagios做处理
 

 

二、linux nagios客户端安装
 
1.软件装备
 
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.13.tar.gz
 
wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.16.tar.gz
 
2.nagios-plugins 安装
 
nagios-plugin 其实就是一个nagios 的插件库,各种插件的功能可以看帮助详细了解
 
[root@localhost ~]# useradd nagios    #创建nagios用户
 
[root@localhost ~]# cd /home/nagios/
 
[root@localhost nagios]# tar zxvf nagios-plugins-1.4.16.tar.gz
 
[root@localhost nagios]# cd nagios-plugins-1.4.16
 
[root@localhost nagios-plugins-1.4.16]# ./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios
 
[root@localhost nagios-plugins-1.4.16]# make && make install
 
3.NRPE 安装
 
#服务端也要安装NRPE插件,然后在command.cfg定义下check_nrpe 就可以了,其它的不需要配置
 
[root@localhost nagios]# tar zxvf nrpe-2.13.tar.gz
 
[root@localhost nagios]# cd nrpe-2.13
 
[root@localhost nrpe-2.13]# ./configure --prefix=/usr/local/nagios/
 
[root@localhost nrpe-2.13]# make all
 
[root@localhost nrpe-2.13]# make install-plugin  #安装NRPE插件
 
[root@localhost nrpe-2.13]# make install-daemon  #安装nrpe-daemon
 
[root@localhost nrpe-2.13]# make install-daemon-config  #安装daemon配置文件
 
[root@localhost nrpe-2.13]# make install-xinetd  #安装NRPE Deamon为xinetd下的一个服务

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款