Nagios Core 3.5.1 to 4.3.4. Upgrade

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.
Locked
mtripodi
Posts: 61
Joined: Thu Dec 17, 2015 11:15 am

Nagios Core 3.5.1 to 4.3.4. Upgrade

Post by mtripodi »

Hi,

Is it possible to upgrade from Nagios Core 3.5.1 (running on Ubuntu 14.04 LTS) to Core version 4.3.4 (latest stable release)? If so, why does the upgrade process appear to install the files successfully, however when I run the help command to verify the current version it still shows my current version as if no upgrade was performed at all?

I followed the steps in this page: https://assets.nagios.com/downloads/nag ... ading.html

There were no errors or issues preventing the files from installing so it was a bit misleading. I'm willing to upload configuration needed to verify. Any assistance with confirming the process to upgrade from 3.5.1 to 4.3.4 is much appreciated.


Mike
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Post by scottwilkerson »

How was you previous version installed (source or RPM or other package)?

Is the binary located in the same place as the old one? What is the full path to the binary you are running the help command?

Also, you should be following this, it's almost the same but slightly different
https://assets.nagios.com/downloads/nag ... ading.html
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
mtripodi
Posts: 61
Joined: Thu Dec 17, 2015 11:15 am

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Post by mtripodi »

Hi Scott,

I appreciate the reply. I believe it was installed from source back in 2013. However, i'm not certain the method of installation as the person who performed the install is no longer employed here. Is there a way I can verify?

When you say "binary" are you referring to the primary Nagios config folder (e.g. Nagios or Nagios3)? I believe the existing one is currently located in /etc/nagios3 directory. I have attached a screenshot of how i'm verifying the version and what it looks like.

I did follow the article you referenced but still no luck getting to upgraded 4.3.4 version. Is it possible I ran the install from the wrong directly and it didn't overwrite my existing installation files? Please let me know if there is any more information you require.
Attachments
Nagios-config.png
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Post by scottwilkerson »

this is going to be challenging
To find where the current nagios is installed type

Code: Select all

which nagios3
also, to even guess, we are going to need the operating system.

my guess is you are going to need to run the following
make install-init
and then you are going to have to try to migrate your configurations to

Code: Select all

/usr/local/nagios/etc
Finally, instead of running the command nagios3 like you do, you would run

Code: Select all

/usr/local/nagios/bin/nagios
you could symlink the former to the later
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
mtripodi
Posts: 61
Joined: Thu Dec 17, 2015 11:15 am

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Post by mtripodi »

Current Nagios install location: /usr/sbin/nagios3
OS: Ubuntu 14.04 LTS running on a VM

Please provide the steps needed to copy over my config to a different directory if needed. Since I ran all the install commands already, is it now just a matter of copying those config files to the correct directly where I have my current configuration?

Is there a form of IM chat we can connect on to speed this up?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Post by scottwilkerson »

did you run this already?

Code: Select all

make install-init
after that did you restart nagios?

Code: Select all

service restart nagios
if so, it shouldn't be using your configs.

To copy them over you should be able to run something like this

Code: Select all

cp -r /etc/nagios3/* /usr/local/nagios/etc
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
mtripodi
Posts: 61
Joined: Thu Dec 17, 2015 11:15 am

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Post by mtripodi »

I ran the make install-init command from the nagios-4.3.4 folder and it seemed to work. If I run that command from another directory it says "No rule to make target 'install-init'. Stop."
I then restart the Nagios (in my case nagios3) service. (see attached screenshot).

Should I proceed using the last command to copy over the config to another directory? Is that what you think the issue could be or is there something else i'm missing in the upgrade steps? It's misleading since all appeared normal without errors when running the install commands.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Post by scottwilkerson »

There was no screenshot attached.

Also, after running that command you should have a nagios service to start

Code: Select all

service nagios start
If you have a nagios3 service that is from the old install and you are going to want to stop the nagios3 service
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
mtripodi
Posts: 61
Joined: Thu Dec 17, 2015 11:15 am

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Post by mtripodi »

I stopped the Nagios service using service nagios3 stop then ran the make install-init command then started the Nagios service again.
It still only runs successfully when run the command from the 4.3.4 installer folder. Did I run that correctly?

How can I confirm if the 4.3.4 install is using my existing config or new ones? If so, do I still use this command to copy config files to a new directory?

cp -r /etc/nagios3/* /usr/local/nagios/etc
Attachments
screenshot3.png
screenshot2.png
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Post by scottwilkerson »

you are close..

Just run the following

Code: Select all

service nagios3 stop
chkconfig nagios3 off
chkconfig nagios on
and stop using nagios3, your service name is now called nagios

such as

Code: Select all

service nagios restart
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked