Hi
i have an issue with nagios.cmd missing ,and as a result i keep getting an error "Error: Could not stat() command file '/usr/local/nagios/var/rw/nagios.cmd'!"
if i stop the service , kill all the nagios processes running and start the service again, the nagios.cmd return to "/usr/local/nagios/var/rw", but after a day or two ,the problem returns and the file is missing again
i encounter this issue before and solved it with fixing the permission on the nagios directories , but it didn't work.
any ideas how to solve it?
thanks
Error: Could not stat() command file '/usr/local/nagios/var/
Re: Error: Could not stat() command file '/usr/local/nagios/
The nagios.cmd file should be opened by the child process which could be crashing for some reason and then unable to open a new nagios.cmd(maybe due to the parent still being alive). Try running nagios in the foreground to see if any errors occur around the time you notice the problem:
/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg
You can also check the process ids and verify which one has nagios.cmd open with:
lsof /usr/local/nagios/var/rw/nagios.cmd
ps -Fa | grep nagios.cfg
/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg
You can also check the process ids and verify which one has nagios.cmd open with:
lsof /usr/local/nagios/var/rw/nagios.cmd
ps -Fa | grep nagios.cfg
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.