Page 1 of 2

service nagios restart not restarting nagios

Posted: Mon Jan 15, 2018 10:01 pm
by t3dus
The command "service nagios restart" isn't actually restarting nagios for some unknown reason.

I can type it until i'm blue in the face and my config changes will never take effect because the service doesn't restart. My only work around is to reboot the whole server.

Nagios also doesn't start at boot up. I have to manually start it.

Any ideas how to resolve this?

Re: service nagios restart not restarting nagios

Posted: Tue Jan 16, 2018 3:25 pm
by cdienger
What OS is this? Does running service nagios restart say anything about stopping and starting or does it bring you directly to a prompt? What if you run /etc/init.d/nagios restart?

Run:

chkconfig --add nagios
chkconfig nagios on


and then that you can see nagios listed when you run chkconfig.

Re: service nagios restart not restarting nagios

Posted: Fri Feb 02, 2018 9:27 am
by t3dus
cdienger wrote:What OS is this?
Ubuntu 16.04
cdienger wrote:Does running service nagios restart say anything about stopping and starting or does it bring you directly to a prompt?
it just runs and doesn't display anything and brings me back to a prompt when I check the nagios page nothing has changed..
cdienger wrote:What if you run /etc/init.d/nagios restart?
when I run that it says

Code: Select all

[ ok ] Restarting nagios (via systemctl): nagios.service.
However the changes still aren't applied.
cdienger wrote:Run:

chkconfig --add nagios
chkconfig nagios on
when I try chkconfig --add nagios it returns: chkconfig: command not found
cdienger wrote:and then that you can see nagios listed when you run chkconfig.
root@nagios:~# chkconfig
chkconfig: command not found

Re: service nagios restart not restarting nagios

Posted: Fri Feb 02, 2018 2:42 pm
by cdienger
In that case:

Code: Select all

sudo update-rc.d nagios default
sudo update-rc.d nagios enable

Re: service nagios restart not restarting nagios

Posted: Fri Feb 02, 2018 2:50 pm
by npolovenko
@t3dus, What version of Nagios core are you running? How did you install it? If you provide us with the manual you used that would help.
Also, was this a clean install or has your Nagios Core been working for a while?
Can you also run the following command:

Code: Select all

tar -zcvf /tmp/supporttar.tar.gz /usr/local/nagios/
That would create a supporttar.tar.gz in the /tmp/ directory that you can upload here.

Re: service nagios restart not restarting nagios

Posted: Mon Feb 05, 2018 10:11 pm
by t3dus
cdienger wrote:In that case:

Code: Select all

sudo update-rc.d nagios default
sudo update-rc.d nagios enable
Got some errors..

Code: Select all

# sudo update-rc.d nagios default
usage: update-rc.d [-n] [-f] <basename> remove
       update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]
                -n: not really
                -f: force

The disable|enable API is not stable and might change in the future.

Code: Select all

# sudo update-rc.d nagios enable
update-rc.d: error: no runlevel symlinks to modify, aborting!
npolovenko wrote:@t3dus, What version of Nagios core are you running? How did you install it? If you provide us with the manual you used that would help.
Nagios Core 4.3.4 Compiled from source.
npolovenko wrote:Also, was this a clean install or has your Nagios Core been working for a while?
Clean Install on a VM hosted by KVM
npolovenko wrote:Can you also run the following command:

Code: Select all

tar -zcvf /tmp/supporttar.tar.gz /usr/local/nagios/
That would create a supporttar.tar.gz in the /tmp/ directory that you can upload here.
Uploaded it to my owncloud server at https://cloud.snapgeek.com/index.php/s/EY5Ak2AuV5OXoiI

Re: service nagios restart not restarting nagios

Posted: Mon Feb 05, 2018 11:01 pm
by t3dus
Think I may nuke this server.

Seems flaky because websites it's monitoring keep going up/down every few minutes so it's spamming my e-mail with false alerts. Must be some sort of a hardware issue or something. I'm not sure though but not sure it's worth my time...

My VPS nagios server is working fine yet so whatever.. I just wanted this one to monitor my home network but seems it isn't going to work for that.

Re: service nagios restart not restarting nagios

Posted: Tue Feb 06, 2018 4:00 pm
by kyang
It's possible this website service check was flapping?

Were there any other questions?

Re: service nagios restart not restarting nagios

Posted: Tue Feb 06, 2018 8:30 pm
by t3dus
kyang wrote:It's possible this website service check was flapping?

Were there any other questions?
No cuz my other nagios server isn't reporting any issues. Just my home nagios server is.

I have two nagios servers monitoring the same sites.

Re: service nagios restart not restarting nagios

Posted: Wed Feb 07, 2018 12:34 pm
by kyang
Are they using different network devices?
Think I may nuke this server.

Seems flaky because websites it's monitoring keep going up/down every few minutes so it's spamming my e-mail with false alerts. Must be some sort of a hardware issue or something. I'm not sure though but not sure it's worth my time...

My VPS nagios server is working fine yet so whatever.. I just wanted this one to monitor my home network but seems it isn't going to work for that.
Will you stop using this Nagios server? Or did you want to continue troubleshooting this?

Let us know how you would like to continue. Thanks!