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:

Re: service nagios restart not restarting nagios

Post by t3dus »

kyang wrote:Are they using different network devices?
Separate networks, separate systems.
kyang wrote: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!
I may stop using that system because I simply don't understand why it thinks everything is down/up when it isn't...

But I have an issue where nagios isn't starting on startup on my VPS server. No idea why that isn't working right.

I ran this command below to create a symbolic link to fix the startup issue but it already exists.

Code: Select all

# ln -s /etc/init.d/nagios /etc/rc
ln: failed to create symbolic link '/etc/rc': File exists
Nagios still doens't start up on boot.

If I edit /etc/rc I see this in the file.

Code: Select all

DESC="Nagios"
NAME=nagios
DAEMON=/usr/local/nagios/bin/$NAME
DAEMON_ARGS="-d /usr/local/nagios/etc/nagios.cfg"
PIDFILE=/usr/local/nagios/var/$NAME.lock
kyang

Re: service nagios restart not restarting nagios

Post by kyang »

Could you run this command and post the output?

Code: Select all

dpkg --list | grep upstart
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:Could you run this command and post the output?

Code: Select all

dpkg --list | grep upstart
did nothing but bring me back to a command prompt.
kyang

Re: service nagios restart not restarting nagios

Post by kyang »

On your VPS server what's the output of this?

Code: Select all

sudo update-rc.d nagios default
sudo update-rc.d nagios enable
Any errors?
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 »

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!
kyang

Re: service nagios restart not restarting nagios

Post by kyang »

Could you run an strace for us and give us the output?

You may have to install strace first.

Code: Select all

apt-get install strace
Then run this.

Code: Select all

strace service nagios restart &> /tmp/strace.txt
You will have to use something like Filezilla to get the file to us.
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 »

Here you go.
Attachments
strace.txt
(26.97 KiB) Downloaded 492 times
kyang

Re: service nagios restart not restarting nagios

Post by kyang »

It didn't actually go through.

Could you run the command as root or sudo.

Code: Select all

strace sudo service nagios restart &> /tmp/strace.txt
Locked