Page 1 of 1

nagios.cmd file is missing

Posted: Tue Sep 03, 2013 1:52 am
by vgeyser
Hi,

I have a problem where I can't find the file called nagios.cmd

This problem I came accross when I got the following error: Could not Stat().
In other forums I read by changing the permissions this will solve the problem but I can't even find the file. The file it self is missing.

Question: where can I find this file and how to solve this problem?

Thanks,
Verster

Re: nagios.cmd file is missing

Posted: Tue Sep 03, 2013 10:06 am
by slansing
Should be located here:

Code: Select all

/usr/local/nagios/var/rw/nagios.cmd
Is nagios running?

Code: Select all

service nagios status

Re: nagios.cmd file is missing

Posted: Wed Sep 04, 2013 1:03 am
by vgeyser
hi,

we have two nagios servers on Ubuntu, both of them Nagios is running with the "service nagios status" command
also both of them is giving the "error: could not stat() when you try to make any changes to the host like "disable notifications..."

now here is the strange thing.
the one server when you get the could not stat() error the command file is '/usr/local/nagios/var/rw/nagios.cmd' and you can find the file in that directory
but still the error could not stat() error

and then the other server command file path is different '/var/nagios/rw/nagios.cmd' for the file but that file is not there, even if I go and check in the /usr/local/nagios/var folder you will not even find the rw folder.

hope you can help

Re: nagios.cmd file is missing

Posted: Wed Sep 04, 2013 9:51 am
by abrist
Nagios was installed on these servers differently. One, from the nagios source, the other from the ubuntu repos.
Lets stop nagios, and then kill any orphaned/defunct parent processes:

Code: Select all

service nagios stop
killall nagios
ps -aef | grep nagios.cfg
service nagios start

Re: nagios.cmd file is missing

Posted: Thu Sep 05, 2013 6:00 am
by vgeyser
that was excellent,

both of these servers is working

thank you very much.

Re: nagios.cmd file is missing

Posted: Thu Sep 05, 2013 9:30 am
by slansing
Great! Locking er' up.