Ubuntu 12.04 Nagios 4.0.2 issue w/ /etc/init.d/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.
mkot
Posts: 68
Joined: Tue Feb 25, 2014 1:47 am
Location: Poland

Re: Ubuntu 12.04 Nagios 4.0.2 issue w/ /etc/init.d/nagios

Post by mkot »

I've copied it to

Code: Select all

/etc/init.d/
as nagios. Then I've made it runnable

Code: Select all

chmod +x /etc/init.d/nagios
. When I put

Code: Select all

service nagios restart
or

Code: Select all

/etc/init.d/nagios restart
error ocoured:

Code: Select all

Executable file @bindir@/nagios not found. Exiting.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Ubuntu 12.04 Nagios 4.0.2 issue w/ /etc/init.d/nagios

Post by slansing »

This should actually be patched and resolved in version 4.0.3 which is now released. If you wish to stay on version 4.0.2 we can continue to help you on that end, though upgrading should resolve this.
mkot
Posts: 68
Joined: Tue Feb 25, 2014 1:47 am
Location: Poland

Re: Ubuntu 12.04 Nagios 4.0.2 issue w/ /etc/init.d/nagios

Post by mkot »

Acctually I've got Nagios 4.0.3 with this issue ;]
I've upgradet Nagios from v4.0.2 to 4.0.3...

EDIT:
I've upgraded Nagios from v4.0.3 to 4.0.4 and issue is still present when I try stop/reload Nagios' process...
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Ubuntu 12.04 Nagios 4.0.2 issue w/ /etc/init.d/nagios

Post by scottwilkerson »

In the upgrade did you run

Code: Select all

make install-init 
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mkot
Posts: 68
Joined: Tue Feb 25, 2014 1:47 am
Location: Poland

Re: Ubuntu 12.04 Nagios 4.0.2 issue w/ /etc/init.d/nagios

Post by mkot »

No, i didn't. I upgraded Nagios via this procedure: http://nagios.sourceforge.net/docs/3_0/upgrading.html. Can I use it now? Is it safe for my ocnfiguration? ;)
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Ubuntu 12.04 Nagios 4.0.2 issue w/ /etc/init.d/nagios

Post by slansing »

We recommend using this document as it is much more up to date than the 3_0 upgrading/installing document found on sourceforge:

http://assets.nagios.com/downloads/nagi ... Source.pdf

Please run through the entire procedure, remember, an upgrade is essentially a re-compile, the above link includes the make install-init that Scott mentioned, please let us know if you need help.
mkot
Posts: 68
Joined: Tue Feb 25, 2014 1:47 am
Location: Poland

Re: Ubuntu 12.04 Nagios 4.0.2 issue w/ /etc/init.d/nagios

Post by mkot »

It worked, I can restart Nagios from ssh ;)

So if I want upgrade Nagios all I need to do is:

Code: Select all

./configure --with-nagios-group=nagios --with-command-group=nagcmd -–with-mail=/usr/bin/sendmail
All systems:
make all
make install 
make install-init 
cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/etc/init.d/nagios start
I didn't make

Code: Select all

make install-config 
make install-commandmode 
make install-webconf 
because I'll loose my configuration ;)
Locked