service nagios restart not restarting nagios

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

service nagios restart not restarting nagios

Postby t3dus » Mon Jan 15, 2018 10:01 pm

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
t3dus
 
Posts: 103
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA

Re: service nagios restart not restarting nagios

Postby cdienger » Tue Jan 16, 2018 3:25 pm

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

Re: service nagios restart not restarting nagios

Postby t3dus » Fri Feb 02, 2018 9:27 am

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
t3dus
 
Posts: 103
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA

Re: service nagios restart not restarting nagios

Postby cdienger » Fri Feb 02, 2018 2:42 pm

In that case:

Code: Select all
sudo update-rc.d nagios default
sudo update-rc.d nagios enable
User avatar
cdienger
Support Tech
 
Posts: 919
Joined: Tue Feb 07, 2017 11:26 am

Re: service nagios restart not restarting nagios

Postby npolovenko » Fri Feb 02, 2018 2:50 pm

@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.
User avatar
npolovenko
Support Tech
 
Posts: 1327
Joined: Mon May 15, 2017 5:00 pm

Re: service nagios restart not restarting nagios

Postby t3dus » Mon Feb 05, 2018 10:11 pm

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: 103
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA

Re: service nagios restart not restarting nagios

Postby t3dus » Mon Feb 05, 2018 11:01 pm

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

Re: service nagios restart not restarting nagios

Postby kyang » Tue Feb 06, 2018 4:00 pm

It's possible this website service check was flapping?

Were there any other questions?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
Support Tech
 
Posts: 1514
Joined: Tue Jul 25, 2017 3:35 pm

Re: service nagios restart not restarting nagios

Postby t3dus » Tue Feb 06, 2018 8:30 pm

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

Re: service nagios restart not restarting nagios

Postby kyang » Wed Feb 07, 2018 12:34 pm

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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
Support Tech
 
Posts: 1514
Joined: Tue Jul 25, 2017 3:35 pm

Next

Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 7 guests