在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.
這個主要是apache 用戶 沒有執行權限 /usr/local/nagios/var/rw/nagios.cmd 造成,解決方法有幾種:
1.在啓動nagios的時候給nagios.cmd權限
通過修改nagios的啓動腳加入chmod -R 777 $NagiosVarDir/rw
[root@localhost nagios]# vim /etc/init.d/nagios