service nagios restart not restarting nagios

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.
User avatar
t3dus
Posts: 161
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:

service nagios restart not restarting nagios

Post 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?
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: service nagios restart not restarting nagios

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
t3dus
Posts: 161
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:

Re: service nagios restart not restarting nagios

Post 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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: service nagios restart not restarting nagios

Post by cdienger »

In that case:

Code: Select all

sudo update-rc.d nagios default
sudo update-rc.d nagios enable
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: service nagios restart not restarting nagios

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
t3dus
Posts: 161
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:

Re: service nagios restart not restarting nagios

Post 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
User avatar
t3dus
Posts: 161
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:

Re: service nagios restart not restarting nagios

Post 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.
kyang

Re: service nagios restart not restarting nagios

Post by kyang »

It's possible this website service check was flapping?

Were there any other questions?
User avatar
t3dus
Posts: 161
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:

Re: service nagios restart not restarting nagios

Post 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.
kyang

Re: service nagios restart not restarting nagios

Post 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!
Locked