1.在Nagios的发现在Web界面中测试手动发送报警消息时报以下错误
- Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!
- The permissions on the external command file and/or directory may be incorrect. Read the FAQs on how to setup proper permissions.
- An error occurred while attempting to commit your command for processing.
官网提供的解决方法地址:http://nagios.manubulon.com/traduction/docs25en/commandfile.html
但是按照官网的做下来依旧是不行。
关于这部分在nagios.cfg中有下面的内容
- # EXTERNAL COMMAND FILE
- # This is the file that Nagios checks for external command requests.
- # It is also where the command CGI will write commands that are submitted
- # by users, so it must be writeable by the user that the web server
- # is running as (usually 'nobody'). Permissions should be set at the
- # directory level instead of on the file, as the file is deleted every
- # time its contents are processed.
- 这段话的核心意思是apache的运行用户要有对文件写的权限.权限应该设置在目录上,因为每次文件的内容被处理后文件就会被删掉
- command_file=/usr/local/nagios/var/rw/nagios.cmd
添加apache用户到nagios组,
usermod -aG nagcmd apache
然后重启Httpd服务,一定要重启了,我就忘记了……郁闷了好久;
- Service httpd restart
然后重启Nagios服务
- 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
- yum -y install openssl-devel
本文转自 安安安安森 51CTO博客,原文链接:http://blog.51cto.com/smallc/1050943,如需转载请自行联系原作者