Page 1 of 2
nagios.cmd not there, can't set downtimes
Posted: Wed Aug 29, 2018 8:53 am
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!
Re: nagios.cmd not there, can't set downtimes
Posted: Wed Aug 29, 2018 9:30 am
by scottwilkerson
if you restart nagios is it created?
Re: nagios.cmd not there, can't set downtimes
Posted: Wed Aug 29, 2018 10:08 am
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!
Re: nagios.cmd not there, can't set downtimes
Posted: Wed Aug 29, 2018 10:21 am
by scottwilkerson
lets run the following
Code: Select all
service nagios stop
killall -9 nagios
service nagios start
Re: nagios.cmd not there, can't set downtimes
Posted: Thu Aug 30, 2018 7:19 am
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!
Re: nagios.cmd not there, can't set downtimes
Posted: Thu Aug 30, 2018 7:34 am
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!
Re: nagios.cmd not there, can't set downtimes
Posted: Thu Aug 30, 2018 7:41 am
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
Re: nagios.cmd not there, can't set downtimes
Posted: Thu Aug 30, 2018 7:55 am
by CameronWP
Sure, here you go...
downtime8.JPG
Re: nagios.cmd not there, can't set downtimes
Posted: Thu Aug 30, 2018 8:12 am
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
Re: nagios.cmd not there, can't set downtimes
Posted: Thu Aug 30, 2018 9:16 am
by CameronWP
Great, seems obvious now lol!
That seems to have resolved the issue. Thanks for your help!