Nagios常见问题解析

 1.在Nagios的发现在Web界面中测试手动发送报警消息时报以下错误

 
  
  1. Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update
  2. The permissions on the external command file and/or directory may be incorrect. Read the FAQs on how to setup proper permissions. 
  3. An error occurred while attempting to commit your command for processing. 

官网提供的解决方法地址http://nagios.manubulon.com/traduction/docs25en/commandfile.html

但是按照官网的做下来依旧是不行。

关于这部分在nagios.cfg中有下面的内容

 
  
  1. # EXTERNAL COMMAND FILE 
  2. # This is the file that Nagios checks for external command requests. 
  3. # It is also where the command CGI will write commands that are submitted 
  4. by users, so it must be writeable by the user that the web server 
  5. is running as (usually 'nobody').  Permissions should be set at the 
  6. # directory level instead of on the file, as the file is deleted every 
  7. time its contents are processed. 
  8. 这段话的核心意思是apache的运行用户要有对文件写的权限.权限应该设置在目录上,因为每次文件的内容被处理后文件就会被删掉 
  9.   
  10. command_file=/usr/local/nagios/var/rw/nagios.cmd 

添加apache用户到nagios组,

usermod -aG nagcmd apache

然后重启Httpd服务,一定要重启了,我就忘记了……郁闷了好久;

 
  
  1. Service httpd restart 

然后重启Nagios服务

 
  
  1. service nagios restart 

2.安装nrpe时提示错误:configure: error: cannot find ssl headers

安装nrpe,编译的时候提示以下信息checking for SSL headers... configure: error: Cannot find ssl headers原因是缺少openssl-devel包,使用yum命令安装即可,问题解决!

在Nagios 3.4.1和NRPE v2.13版本中,nrpe直接使用./configure配置然后make & make install即可,自动配置编译SSL

 
  
  1. yum -y install openssl-devel 









本文转自 安安安安森  51CTO博客,原文链接:http://blog.51cto.com/smallc/1050943,如需转载请自行联系原作者
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值