在web界面开启服务状态报警,提示:

Error: 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.  

Return from whence you came 
Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!


这个主要是apache 用户 没有执行权限 /usr/local/nagios/var/rw/nagios.cmd 造成,解决方法有几种:

1.在启动nagios的时候给nagios.cmd权限
通过修改nagios的启动脚加入chmod -R 777 $NagiosVarDir/rw

[[email protected] nagios]# vim /etc/init.d/nagios 
Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!


转载于:https://blog.51cto.com/singler/1851446

相关文章: