nagios.cmd not there, can't set downtimes

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
CameronWP
Posts: 134
Joined: Fri Apr 17, 2015 2:17 pm

nagios.cmd not there, can't set downtimes

Post by CameronWP »

Hello:

It seems that the nagios.cmd file keeps disappearing:
downtime3.JPG
As a result when we try to set a downtime we receive this error:
downtime2.JPG
Thanks!
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: nagios.cmd not there, can't set downtimes

Post by scottwilkerson »

if you restart nagios is it created?

Code: Select all

service nagios restart
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
CameronWP
Posts: 134
Joined: Fri Apr 17, 2015 2:17 pm

Re: nagios.cmd not there, can't set downtimes

Post by CameronWP »

I actually did try that before opening the issue and I should have mentioned it. Delving further along this track it appears that although it reports that Nagios is started when you restart or even start the service as requested in your reply, when you query the status it says that Nagios isn't started.

I have attached some screenshots. Thanks!
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: nagios.cmd not there, can't set downtimes

Post by scottwilkerson »

lets run the following

Code: Select all

service nagios stop
killall -9 nagios
service nagios start
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
CameronWP
Posts: 134
Joined: Fri Apr 17, 2015 2:17 pm

Re: nagios.cmd not there, can't set downtimes

Post by CameronWP »

Killing all the Nagios processes with pkill worked fine. I will monitor it as it seems the last time I had it running it inexplicably stopped working within a day.

Thanks!
CameronWP
Posts: 134
Joined: Fri Apr 17, 2015 2:17 pm

Re: nagios.cmd not there, can't set downtimes

Post by CameronWP »

Ok, so restarting all of the services seems to have fixed the issue as mentioned in the previous entry. Going back into the GUI shows that the Monitoring Engine is stopped. Starting the monitoring engine from the Interface then seems to break things again. I have attached some screenshots. Thanks!
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: nagios.cmd not there, can't set downtimes

Post by scottwilkerson »

Can you show the output of the following commands

Code: Select all

grep nagios.lock /usr/local/nagios/etc/nagios.cfg
grep nagios.lock /etc/init.d/nagios
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
CameronWP
Posts: 134
Joined: Fri Apr 17, 2015 2:17 pm

Re: nagios.cmd not there, can't set downtimes

Post by CameronWP »

Sure, here you go...
downtime8.JPG
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: nagios.cmd not there, can't set downtimes

Post by scottwilkerson »

Lets edit
change this

Code: Select all

NagiosRunFile=/var/run/nagios.lock
to this

Code: Select all

NagiosRunFile=/usr/local/nagios/var/nagios.lock
then run the following:

Code: Select all

service nagios stop
killall -9 nagios
rm -f /usr/local/nagios/var/nagios.lock /var/run/nagios.lock
service nagios start
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
CameronWP
Posts: 134
Joined: Fri Apr 17, 2015 2:17 pm

Re: nagios.cmd not there, can't set downtimes

Post by CameronWP »

Great, seems obvious now lol!

That seems to have resolved the issue. Thanks for your help!
Locked