Page 1 of 1

nagios 3x to 4 x migration

Posted: Tue Aug 09, 2016 3:02 pm
by maytheforcebeprosper
I inherited a nagios instance install, It's old and I have no idea where anything is.

I have a few questions here and would really appreciate any help.
The existing box: nagios core 3.x.x on bare metal rhel 5.4 24 gig of ram
New box: nagios core 4.2.0 VM rhel 6.8

the 3.x box is running very hot because of all of the checks it has going on. I figure going to 4.x would help thanks to core workers. How much of an improvement would I see just between versions?
NRPE and a few other plugins are going to have to be installed as well which i've done but I am finding it to be a bit obscure.

From what I've read, it it seems my best strategy would be to move the config files in place and turn off all checks and test with one box ? Would that blow up my VM or send out alerts that need not be sent?

What is involved in a migration to a new box?
Is there a way to test one machine at a time? How / where are these config files set up? I can'f find docs that clearly lay them out so I apologize for asking questions that may seem trivial but this is a very well rooted instance with a LOT of checks and I want to make sure it's rebuilt properly.
I just need some direction on where to look for this build.


Other random info, I've compiled from source, installed nagios plugins and did some general system hardening.

Thanks for any suggestions

Re: nagios 3x to 4 x migration

Posted: Tue Aug 09, 2016 5:13 pm
by Box293
maytheforcebeprosper wrote:the 3.x box is running very hot because of all of the checks it has going on. I figure going to 4.x would help thanks to core workers. How much of an improvement would I see just between versions?
Thats a tough question to answer to be honest, too many variables exist to have a helpful answer.
maytheforcebeprosper wrote:From what I've read, it it seems my best strategy would be to move the config files in place and turn off all checks and test with one box ? Would that blow up my VM or send out alerts that need not be sent?
On your new server turn off notifications globally. You can do this from the tactical overview screen by clicking the TICK under notifications.
After that, I would simply copy all the configs from the old server to the new server and restart nagios.
Your concerns about "blowing up Nagios" are valid, however this is also a great way to stress test your new Nagios server to see if it can handle a lot of issues. You want Nagios to be able to work in a major outage.
maytheforcebeprosper wrote:Is there a way to test one machine at a time? How / where are these config files set up?
They are all stored in .cfg files. Have a look in your original Nagios server in nagios.cfg for lines like this:

cfg_file=/usr/local/nagios/etc/commands.cfg
cfg_dir=/usr/local/nagios/etc/hosts


Depending on how your config files are setup will determine how easy / hard it would be to test one at a time.

Re: nagios 3x to 4 x migration

Posted: Wed Aug 10, 2016 8:19 am
by maytheforcebeprosper
This is a great start, thanks.

Let me fiddle with it and I'll post here with more q's

Re: nagios 3x to 4 x migration

Posted: Wed Aug 10, 2016 11:05 am
by maytheforcebeprosper

Code: Select all

Nagios Core 4.2.0
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-01-2016
License: GPL

Website: https://www.nagios.org
Warning: use_embedded_perl_implicitly is deprecated and will be removed.
Warning: enable_embedded_perl is deprecated and will be removed.
Warning: sleep_time is deprecated and will be removed.
Warning: external_command_buffer_slots is deprecated and will be removed. All commands are always processed upon arrival
Warning: command_check_interval is deprecated and will be removed. Commands are always handled on arrival
Nagios 4.2.0 starting... (PID=12032)
Local time is Wed Aug 10 12:03:38 EDT 2016
qh: Failed to init socket '/usr/local/nagios/var/rw/nagios.qh'. bind() failed: No such file or directory
Error: Failed to initialize query handler. Aborting

nagios.qh doesn't exist on my system.

Re: nagios 3x to 4 x migration

Posted: Wed Aug 10, 2016 11:52 am
by maytheforcebeprosper
I just made the file with touch and set the permissions... it worked. Was i wrong to do that? maybe.

Re: nagios 3x to 4 x migration

Posted: Wed Aug 10, 2016 4:24 pm
by Box293
Can you please post your nagios.cfg file for us to look at.