Page 5 of 9

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Tue Jun 05, 2018 1:36 pm
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

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Tue Jun 12, 2018 11:42 am
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?

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Tue Jun 12, 2018 4:59 pm
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.

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Wed Jul 04, 2018 11:30 am
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!

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Thu Jul 05, 2018 4:47 pm
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.

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Fri Jul 06, 2018 9:00 am
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!

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Fri Jul 06, 2018 1:43 pm
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?

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Fri Jul 06, 2018 2:28 pm
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.

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Fri Jul 06, 2018 3:03 pm
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.

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Fri Jul 06, 2018 3:35 pm
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.