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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Post by npolovenko »

@mtripodi, Good idea, let me know how it goes. After you copy the folder over to the new server run the following command:

Code: Select all

service nagios restart
Then run the following command to check for any errors:

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.
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 thanks, I was able to successfully copy all my folders containing existing config files into the location: /usr/local/nagios/etc/objects/

I noticed we also have a bunch of plugins which are likely associated with service checks we have setup. Located in:
/usr/lib/nagios/plugins/ and /usr/local/lib/nagios-plugins/ .

Should I be copying all these plugins over as well? If so, to which directory on the new Nagios server?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Post by npolovenko »

@mtripodi, Hmm. Did you install any special plugins or are these just the standard core plugins? Try to import the checks without plugins fist and see if they start erroring out. Then please upload the failing service checks definitions here.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
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 there,

I noticed Nagios Core 4.4.1 was recently released. Successfully updated both Ubuntu and CentOS 7 VM. However, i'm encountering 2 issues preventing me from further testing:

1. I moved my old configuration to the following locations on both VM's but when logging into the web interface I don't see any of my hosts or services listed. I restarted the services several times, anything i'm missing?
Nagios config on Centos Nagios config: /local/nagios/etc/objects
Nagios config on Ubuntu 16.04: /usr/local/nagios/etc/objects

2. After the upgrade on my Ubuntu 16.04 VM from 4.3.4 to 4.4.1 i'm no longer able to run the nagios.service. I have restarted the services, VM and ran latest updates. I continue to see the error in my attached screenshot. Please HELP!
Attachments
Nagios service error 4.4.1.png
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Post by npolovenko »

@mtripodi, Please run the following command to verify the configuration:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Let me know if it returns any errors.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
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 »

Long story short, I had my Nagios server up and running, however I did not see the hosts/service checks. I sent a custom notification via the web console but needed it to arrive in our mailbox. So I updated the contacts.cfg file with my own from our current server. Then ran the command to verify the config and Nagios complained it didn't have the "service notification period" definition.
This is defined in one of my templates. I noticed Nagios is only looking at the default templates.cfg and not my other template config files so I decided to copy/paste a couple of my host definitions into the one templates.cfg file. Now when running the command to verify the config I get the following, see screenshot attached. I also attached a screenshot of the error I get when attempting to start the Nagios service. Not sure if it's related.

I may have messed up the configuration further. Please HELP!
Attachments
nagios 441 service issue.png
Nagios 441 config.png
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Post by lmiltchev »

Can you show us the code around line 132 in the templates.cfg file?

According to the error, you are missing a timeperiod definition... Is "24x7" defined in the timeperiods.cfg?
Be sure to check out our Knowledgebase for helpful articles and 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 actually worked through all the errors today and ran the config test. All looks good now (see screenshot). I was even able to reload the nagios config and start the service. However, i'm no longer able to reach the web console after logging in. I confirmed the Apache HTTP server and service is running. Any ideas to help resolve? See second screenshot for error.
Attachments
nagios441_web.png
Nagios441_config_success.png
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Post by lmiltchev »

1. Make sure selinux is disabled (not running).

Code: Select all

sestatus
2. Clear cookies and the browser cache.

3. Verify the ip address by running in terminal:

Code: Select all

ip addr
4. Try accessing the web UI by typing the following in the browser's address bar:

Code: Select all

http://x.x.x.x/nagios
where you substitute the x.x.x.x with the actual IP address of your nagios server.
Be sure to check out our Knowledgebase for helpful articles and 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 »

Thanks, I have done all those steps, rebooted the server and continue to receive the same message after logging in. Any other ideas? I really need this working soon.
Locked