Nagios Core 3.5.1 to 4.3.4. Upgrade

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.

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby mtripodi » Tue Apr 17, 2018 2:46 pm

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

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby scottwilkerson » Tue Apr 17, 2018 2:54 pm

I forgot this was Ubuntu, you can just skip that
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
CTO
 
Posts: 9623
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby mtripodi » Tue Apr 17, 2018 3:07 pm

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 153 times
mtripodi
 
Posts: 23
Joined: Thu Dec 17, 2015 11:15 am

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby scottwilkerson » Tue Apr 17, 2018 3:15 pm

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
CTO
 
Posts: 9623
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby mtripodi » Tue Apr 17, 2018 3:50 pm

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

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby scottwilkerson » Tue Apr 17, 2018 3:55 pm

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
CTO
 
Posts: 9623
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby mtripodi » Wed Apr 18, 2018 8:44 am

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

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby scottwilkerson » Wed Apr 18, 2018 8:55 am

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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
CTO
 
Posts: 9623
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby mtripodi » Wed Apr 18, 2018 3:00 pm

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

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby scottwilkerson » Wed Apr 18, 2018 3:42 pm

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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
CTO
 
Posts: 9623
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

PreviousNext

Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 15 guests