Page 4 of 9

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Thu May 10, 2018 10:29 am
by mtripodi
Is it possible to download a Linux image that comes preloaded with Nagios Core 4.3.4 so I don't have to run through the Nagios install? I would like either Ubuntu 16.04 or CentOS 7 or both.

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Thu May 10, 2018 10:59 am
by mtripodi
The reason I ask is because the test VM's I have running Ubuntu 16.04 and CentOS 7 are not connected to the network. I would like it to remain off the network for now until i've moved all configuration over.

If no image with preinstalled Nagios core, is there an easy way to move the 4.3.4 installer to the VM without it being on the network?

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Thu May 10, 2018 2:25 pm
by npolovenko
Hi, @mtripodi. We do have precompiled CentOS OVAs with Nagios XI. We do not have any with Nagios Core.
Short answer is that there is no easy way to move the installer to an OVA. You would need to either set up an offline repo with all the required packages or preinstall the rpm versions manually before starting Nagios Core installation. In order to do that, you'd need to download rpms from another online server and then transfer the downloaded packages to the offline nagios OVA.
In the ideal situation, you'd connect the VM to the internet during the installation process for 10-15 minutes and disconnect it right after the installation is complete.

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Thu May 31, 2018 2:04 pm
by mtripodi
Hi there,

One last question, I successfully installed Nagios Core 4.3.4 on two test VM's, one running Ubuntu 16.04 LTS and the other CentOS 7. I have made a snapshot of both post install. My next step is to either:

1.Import current Nagios production configuration into appropriate directories and test
2. Create configuration from scratch based on our existing server.

I would much prefer option 1 and tweak it a bit or move to directories needed. However, i'm ok with option 2 if needed.

My question, what is the easiest most efficient method to copy/import our existing configuration from production server to my test VM's without affecting the service checks. Can you also please list for me the directories it will need to be imported/copied into?

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Thu May 31, 2018 4:30 pm
by npolovenko
@mtripodi, Are you looking into copying service and host checks from the old server?
Use Filezilla to FTP into the old server, navigate to /usr/local/nagios/etc/ and copy the following files:

Code: Select all

commands.cfg
contactgroups.cfg 
services folder
hosts folder
services folder
hostescalations.cfg      
servicetemplates.cfg
contactgroups.cfg    
hostgroups.cfg      
servicedependencies.cfg 
contacts.cfg                      
 serviceescalations.cfg   
timeperiods.cfg
contacttemplates.cfg  
hosttemplates.cfg   
hostdependencies.cfg 
     servicegroups.cfg
And then just replace the files on the new core server.
Then run:

Code: Select all

service nagios restart

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Fri Jun 01, 2018 3:22 pm
by mtripodi
I managed to FTP into my production Nagios server and copy all config files to the Hyper-V host running my test Nagios VM. What is the best method to move those files from the Hyper-V host local folder to the appropriate locations on the Nagios VM? Is there a specific command or can I use? I attempted to run Filezilla on the host and connect to the VM but i'm unable to.

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Mon Jun 04, 2018 3:00 pm
by mtripodi
Is there any easier approach to copying the Nagios config files from the Hyper-V host server to my test VM? Both FileZilla and WinSCP failed to connect to the VM's.

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Mon Jun 04, 2018 3:03 pm
by npolovenko
@mtripodi, I'd try to find out why you're unable to SFTP to the new server. Perhaps you need to disable the firewall? But if that doesn't work you can manually open files in the etc directory on the old server CRL+C and CRL+V the definitions to the appropriate files on the new server.

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Tue Jun 05, 2018 11:05 am
by mtripodi
I was able to successfully disable the firewall and connect via SFTP on one of my VM's running Centos 7. However, still unable to connect to the other VM running Ubuntu 16.04 after disabling the firewall. The CTRL+C and CTRL+V commands are also not working for copying over the config to the new server (VM). Can I use an SCP command instead for the Ubuntu VM?

For the Centos 7 VM, I have attached a screenshot of the folder directories from my existing config versus the current Centos7 config directories. As you can see I have my files grouped in folders to easily manage. If I copy all these folders into the /usr/local/nagios/etc/objects/ directory will it impact anything or will the checks continue to work? Just curious whether this folder structure will still be accepted.

Re: Nagios Core 3.5.1 to 4.3.4. Upgrade

Posted: Tue Jun 05, 2018 12:18 pm
by mtripodi
I was able to finally connect to the Ubuntu VM via Filezilla using FTP port 21. So my final question, can I simply delete the existing objects folder located under /usr/local/nagios/etc/ and copy my existing objects folder from production server to replace it or should I leave what's there on the new servers then copy over my files? Will it break anything? I guess if something does I can still revert back to my snapshot.