nagios.cmd file is missing

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
vgeyser
Posts: 8
Joined: Tue Sep 03, 2013 1:34 am

nagios.cmd file is missing

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: nagios.cmd file is missing

Post 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
vgeyser
Posts: 8
Joined: Tue Sep 03, 2013 1:34 am

Re: nagios.cmd file is missing

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: nagios.cmd file is missing

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vgeyser
Posts: 8
Joined: Tue Sep 03, 2013 1:34 am

Re: nagios.cmd file is missing

Post by vgeyser »

that was excellent,

both of these servers is working

thank you very much.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: nagios.cmd file is missing

Post by slansing »

Great! Locking er' up.
Locked