Upgrade nagios core from 3.2.0 to 4.4.5

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
sabbir
Posts: 3
Joined: Fri Oct 18, 2019 10:12 pm

Upgrade nagios core from 3.2.0 to 4.4.5

Post by sabbir »

Hello ..
i have a very old version of nagios which is 3.2.0. Currently i have installed newer version nagios core 4.4.5 onto another server (centos 7) and want to move all hosts and configuration to the new server. I am very new to this nagios and need a help to do that. Please help me out.. :!:
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Upgrade nagios core from 3.2.0 to 4.4.5

Post by mbellerue »

You should have a number of configuration file in /usr/local/nagios/etc/. It's probably best to just tar up the entire /usr/local/nagios/etc/ directory, and copy it to the 4.4.5 server, and then untar it. You will likely run into some syntax errors in the configuration files. You can use the following command to verify your files, and find any syntax errors before you attempt to start up Nagios Core.

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
sabbir
Posts: 3
Joined: Fri Oct 18, 2019 10:12 pm

Re: Upgrade nagios core from 3.2.0 to 4.4.5

Post by sabbir »

Thanks for your reply mbellerue, I got these files/folders under /etc but nothing in /usr/local directory.

/etc/nagios3
apache2.conf cgi.cfg commands.cfg conf.d htpasswd.users nagios.cfg nagios.cfg.ori nagvis resource.cfg stylesheets

/etc/nagios-plugins
config

/etc/nagiosql
backup contactgroups.cfg contacttemplates.cfg hosts servicegroups.cfg servicetemplates.cfg
commands.cfg contacts.cfg hostgroups.cfg hosttemplates.cfg services timeperiods.cfg

So please suggest what can i do now?
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Upgrade nagios core from 3.2.0 to 4.4.5

Post by mbellerue »

I would take nagios.cfg from /etc/nagios3, and copy it to /usr/local/nagios/etc/ on the new system.

Then all of the files from /etc/nagiosql, and copy them to /usr/local/nagios/etc/objects/ on the new system.

Likely you will want to look through these config files, specifically nagios.cfg, and make sure that any paths are updated from /etc/nagios3 to /usr/local/nagios/etc. There will likely also be configuration syntax changes. This will help you track down the changes that need to be made. /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
sabbir
Posts: 3
Joined: Fri Oct 18, 2019 10:12 pm

Re: Upgrade nagios core from 3.2.0 to 4.4.5

Post by sabbir »

After changing lots of settings i got it working but hosts are not working.

Nagios Core 4.4.5
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2019-08-20
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 15 services.
Checked 4 hosts.
Checked 73 host groups.
Checked 0 service groups.
Checked 11 contacts.
Checked 10 contact groups.
Checked 26 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 4 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

Can you say me where can i put differenthosts.cfg into?
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Upgrade nagios core from 3.2.0 to 4.4.5

Post by mbellerue »

In Nagios 4.4.5, configuration files are kept in /usr/local/nagios/etc/objects/. That is where your new hosts configuration file should go.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked