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 lmiltchev » Fri Jul 06, 2018 4:00 pm

Is the ip accessible from your workstation? Can you ping it? Do you have iptables/firewalld or another firewall running? Is port 80 open?
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!
User avatar
lmiltchev
QA Manager
 
Posts: 10259
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby scottwilkerson » Fri Jul 06, 2018 4:01 pm

what is the current output of now that you have fixed the config

Code: Select all
systemctl status nagios
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 10396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby mtripodi » Mon Jul 09, 2018 1:18 pm

I disabled the firewall, noticed Nagios wasn't started automatically after reboot so I ran a command to set that. Confirmed both Nagios and httpd service are currently running. See attached imaged.
I can reach the test page when entering 172.19.1.7 with the /nagios at the end.
It was working initially, I ran through some of the configuration I copied over and resolved the errors. Once they were all corrected, I tried hitting the webpage again and ran into that message.
Attachments
nagios status.png
nagios web error.png
mtripodi
 
Posts: 37
Joined: Thu Dec 17, 2015 11:15 am

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby mtripodi » Mon Jul 09, 2018 3:37 pm

Ok I figured out that one on my own as well. The htpasswd.users and cgi.cfg files were moved and not in the /usr/local/nagios/etc/ directory. The last part preventing me from proceeding with testing is that I have no hosts or services listed, even though I copied my existing configuration from our production server to the test one. They are currently in the following directories on the test VM:

Root folder: /usr/local/nagios/etc/objects/
Hosts: /usr/local/nagios/etc/objects/hosts/
Services: /usr/local/nagios/etc/objects/services

I attached screenshots of what I see in the web interface and how the directory structure looks on my test server. I renamed some of the files that came with the 4.4.1 installation to .default so I can use my existing files instead for the new server.

Please let me know if there are conflicts in the files, in the wrong directories or if I didn't perform the step process correctly. I would like to have the web interface reflect the current hosts and service checks we have in place so I can test receiving an output from service check and notifications. Thanks!
Attachments
Nagios hosts.png
Nagios services.png
Test_server_directories.png
mtripodi
 
Posts: 37
Joined: Thu Dec 17, 2015 11:15 am

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby scottwilkerson » Tue Jul 10, 2018 8:23 am

mtripodi wrote:The last part preventing me from proceeding with testing is that I have no hosts or services listed, even though I copied my existing configuration from our production server to the test one.


if you look in the nagios.cfg that is being used, it will have paths to both files and folder that need to be included, you need to make sure that your new setup is looking at the correct full paths.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 10396
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 Jul 11, 2018 4:00 pm

I was able to edit the nagios.cfg file by adding the directories containing the configuration I copied over. Confirmed Nagios test server is now looking at all my files. However, now when I run the config test command i'm getting a "invalid max_check_attempts value for host" error. I confirmed each host is pointing to an existing template that Nagios should see and that those templates (generic-host and generic-service) have this value set. So i'm not sure why it keeps complaining. See attached screenshot.

Please HELP.
Attachments
Nagios error.png
mtripodi
 
Posts: 37
Joined: Thu Dec 17, 2015 11:15 am

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby scottwilkerson » Wed Jul 11, 2018 4:05 pm

If you attach those 2 files I can look at them but you may have a definition in multiple locations and it is using the wrong one, for example there is a host defined in the hostgroups file and it ALSO has a hosts file, this sounds wrong.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 10396
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 Jul 11, 2018 8:29 pm

Yes, I understand what your saying. However, all the same configuration is working on my production server. Something must have been changed recently when moving around files to correct errors. I have attached 4 files: host template, service template, hostgroups, and nagios.cfg file.
I have edited the nagios.cfg file to point to the directories containing my config files. Nothing has changed so i'm confused as to why those host files are complaining about not seeing the max_attempts value when they are in the templates associated.

I will continue looking around but spent a almost 2 days and i'm hoping you can help figure this out so I can continue testing and replace this working server with our existing one.
Attachments
nagios config file.png
generic-service template.png
generic-host template.png
mtripodi
 
Posts: 37
Joined: Thu Dec 17, 2015 11:15 am

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby scottwilkerson » Thu Jul 12, 2018 6:52 am

The config files were not attached
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 10396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Postby mtripodi » Thu Jul 12, 2018 8:39 am

I meant I attached the 4 screenshots of my config. If that's not enough information, I have attached the zipped config files along with the host config file referenced in the error message.
Let me know if there is anything else you require.
Attachments
Nagios_config.7z
(18.09 KiB) Downloaded 4 times
mtripodi
 
Posts: 37
Joined: Thu Dec 17, 2015 11:15 am

PreviousNext

Return to Nagios Core

Who is online

Users browsing this forum: davidjumani, Google [Bot], hellheim and 22 guests