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.
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 hope so, I was able to stop the nagios3 service. However, the chkconfig commands were unrecognized. Am I running them correctly? See attached screenshot.
Attachments
screenshot4.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 »

I forgot this was Ubuntu, you can just skip that
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 »

If my service name is now nagios instead of nagios3, how come I still receive an error when restarting using the command you suggested? See attachment.

Also, how can I verify the upgrade ran successfully? Using the same help command or is there another pointing to the nagios file rather than nagios3?
Attachments
screenshot5.png
screenshot5.png (6.51 KiB) Viewed 2987 times
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 may need to touch that file

Code: Select all

touch /usr/local/nagios/var/nagios.configtest
Then you should verify your configuration

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
This was basically a new install and moving configs.

There isn't really anyway to upgrade the old install for several reasons, you didn't know how it was installed, and b the binary was named and located in a completely different location
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 »

Ok that worked! I'm glad I was able to confirm why I was continuing to see the existing Nagios Core 3.5.1 version. It's because the there are now currently two separate Nagios instances under different configuration folders. I agree to all your points as to why this considered a fresh 4.3.4 install alongside my existing 3.5.1 version.

That just leaves the last part, how can I move all my existing configuration from nagios3 folder to the new 4.3.4 directories and wipe out the old 3.5.1 directories? When verifying and comparing both config files with 4.3.4 in my test environment to 3.5.1 in production, it appears there is a lot of config (host files and such) missing. See screenshots of 4.3.4 test environment vs. 3.5.1 production.

Are there a few simple commands I can use to copy over the remaining config from old Nagios to new 4.3.4 Nagios?
Attachments
nagios 3.5.1 prod config.png
Nagios core 4.3.4 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 »

I gave you this earlier:
scottwilkerson wrote:
To copy them over you should be able to run something like this

Code: Select all

cp -r /etc/nagios3/* /usr/local/nagios/etc/
then you can re-verify the config.

Once you see everything running correctly you can remove the old config files with

Code: Select all

rm -rf /etc/nagios3 /etc/init.d/nagios3
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 copy command, when verifying the files in the new directory I now have duplicates of some of the config files (see screenshot). I then run the test config to verify and see multiple "attribute is deprecated" warnings along with an error "service has no hosts and /or service _description. It's pointing to the Nagios3 directory. Will these warnings/errors go away once I remove the old nagios3 config directory?

See attached screenshot.
Attachments
config move.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 »

Wow, you have config files in many locations....

you are going to have to go through all of the linked files and fix all the errors
The lines that are listed as deprecated will need to be removed, and for now I guess I would suggest leaving the items in the /usr/local/lib/nagios3/* directories.

The person who administered this before you sure didn't make things easy on you.
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 »

Tell me about it, this could end up taking me a long time. Is there no other upgrade method I can follow to get me up to version 4.3.4 without having to perform all this clean up and moving config files into different directories?

Are there previous core versions I can upgrade to in steps that will make this process more seamless and avoid all this manual clean up? I'm open to any suggestions at this point that will speed up the process and get me to 4.3.4 with my working existing config. Thanks!
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 »

mtripodi wrote:Tell me about it, this could end up taking me a long time. Is there no other upgrade method I can follow to get me up to version 4.3.4 without having to perform all this clean up and moving config files into different directories?
No, and on top of that the person who did you install not only used unconventional directory locations they are in odd locations.
mtripodi wrote:Are there previous core versions I can upgrade to in steps that will make this process more seamless and avoid all this manual clean up? I'm open to any suggestions at this point that will speed up the process and get me to 4.3.4 with my working existing config. Thanks!
This is also a no, there are some config options that were deprecated in version 4 so there will be config cleanup to do if your setup was using them.

In Nagios XI commercial solution we always cover backwards compatibility, but in Core the standalone open source solution there is so much flexibility someone can shoot themselves in the foot if they want to and it doesn't stop them until the configuration doesn't work.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked