I got an error when I was in External Command Interface. After I clicked the commit button, I got the following error:
Error: Could not stat() command file '/usr/local/nagios/var/rw/nagios.cmd"!
The external command file may be missing, Nagios may not be running, and /or Nagios may not be checking external commands.
An error occurred whil attempting to commit your command by processing.
ls -la /usr/local/nagios/var is???
ps -ef|grep nagios to get user that runs the nagios proc is ?
ps -ef|grep httpd user that runs httpd is?
Now, those 2 users that you just found, are they of proper user/group to access rw from the ls -la above? nagios.sourceforge.net/docs/1_0/commandfile.html
Those 2 users (nagios & apache) have proper access to rw folder. Here below is the output for your information. Moreover, my setup have already configured as the url link. Any idea? Thanks!
In nagios.cfg what is:
check_external_commands=???
command_check_interval=???
command_file=??
Are you authenticating?
You must restart nagios and the httpd.
In cgi.cfg what is…
authorized_for_all_service_commands=??
authorized_for_all_host_commands=??
authorized_for_system_commands=??
And who are you authenticating as?
If you aren’t authenticating, what is…
default_user_name=
In nagios.cfg what is:
check_external_commands=??? 1
command_check_interval=??? 1
command_file=?? /usr/local/nagios/var/rw/nagios.cmd
Are you authenticating? I was authenticated as nagiosadmin in Nagios
You must restart nagios and the httpd. -> Yes
In cgi.cfg what is…
authorized_for_all_service_commands=?? nagiosadmin
authorized_for_all_host_commands=?? nagiosadmin
authorized_for_system_commands=?? nagiosadmin
And who are you authenticating as? I was authenticated as root in FC4
If you aren’t authenticating, what is…
default_user_name= root
Please ignore my previous post due to typing mistake. Moreover, I tried to re-install nagios to a fresh FC4 linux machine. However, I got the same error.
Please see my reply below in bold:
In nagios.cfg what is:
check_external_commands=??? 1
command_check_interval=???** -1**
command_file=?? /usr/local/nagios/var/rw/nagios.cmd **
Are you authenticating? I was authenticated as nagiosadmin in Nag**ios
You must restart nagios and the httpd. -> Yes
In cgi.cfg what is…
authorized_for_all_service_commands=?? nagiosadmin
authorized_for_all_host_commands=?? nagiosadmin
authorized_for_system_commands=?? nagiosadmin
And who are you authenticating as? **I was authenticated as root in FC4 **
If you aren’t authenticating, what is…
default_user_name= root
I guess SELinux is enabled as I didn’t change much settings after FC4 installation. Is there any way I can disable SELinux to have a try? (I am sorry that I am new to Linu:evil:. Thanks!
no idea i don’t use Fedora… but i suppose you could try setup and see if you have the option… or the selinux command possibly. if all fails have a search in teh forum… i’m quite sure it has been discussed preiously
You are right. My problem is coming from SELinux. After I disable SELinux in FC4, it is working. I also did some testing and found that only enable “Disable SELinux protection for httpd daemon” setting is enough.