Page 1 of 2

Migration to Another Server

Posted: Tue Mar 03, 2020 7:08 am
by amitgupta19
Currently the Nagios is installed on the Centos 7.

I am planning to Migrate the Current Nagios to the OEL 7 Server.

Is there a Way or Process to do the Same.

After the Migration i am planning to change the IP of the OEL7 server to the IP of the Centos7 Server.

Re: Migration to Another Server

Posted: Tue Mar 03, 2020 8:57 pm
by Box293
Install all the components the same way and then you should be able to copy / paste the entire configs and it will just work.

What installation methods are you planning on using.

Re: Migration to Another Server

Posted: Wed Mar 04, 2020 4:36 am
by amitgupta19
Can you please help me with the names of the config files, which we need to copy from one server to another?

Re: Migration to Another Server

Posted: Wed Mar 04, 2020 3:27 pm
by scottwilkerson
This is hard to say because everyone configures nagios differently, but running a command like the following should give you a list of the files and directories that need to be copied for the configuration

Code: Select all

grep cfg_ /usr/local/nagios/etc/nagios.cfg|grep -v ^#
Additionally you are going to need to copy any custom plugins you have added

Re: Migration to Another Server

Posted: Thu Mar 12, 2020 10:55 am
by amitgupta19
Thanks Scott for the Help, i hope that it will help me.

I have noticed one error in my New nagios Server,

Mar 01 08:39:08 xxxnagios3 ndo2db[20501]: Trimming logentries.
Mar 01 08:39:12 xxxnagios3 ndo2db[20501]: Trimming acknowledgements.
Mar 01 08:39:20 xxxnagios3 ndo2db[20500]: Error: mysql_query() failed for 'UPDATE nagios_conninfo SET disconnect_time=NOW(), last_checkin_time=NOW(), data_...fo_id='0''
Mar 01 08:39:20 xxxnagios3 ndo2db[20500]: mysql_error: 'MySQL server has gone away'
Mar 01 08:39:20 xxxnagios3 ndo2db[20500]: Error: Connection to MySQL database has been lost!
Mar 01 08:39:20 xxxnagios3 ndo2db[20500]: Successfully disconnected from MySQL database
Mar 12 11:51:41 xxxnagios3 ndo2db[14308]: Successfully connected to MySQL database
Mar 12 11:51:41 xxxnagios3 ndo2db[14309]: Successfully connected to MySQL database
Mar 12 11:51:41 xxxnagios3 ndo2db[14309]: Trimming timedevents.
Mar 12 11:51:41 xxxnagios3 ndo2db[14309]: Trimming systemcommands.
Hint: Some lines were ellipsized, use -l to show in full.

Hope that it can be ignored ?

Re: Migration to Another Server

Posted: Thu Mar 12, 2020 11:08 am
by scottwilkerson
amitgupta19 wrote:Hope that it can be ignored ?
I'm pretty sure it can, I would guess that on Mar 01 when this error occurred the DB service wasn't running, but you can see from this line that it re-connected in the same second

Code: Select all

Mar 01 08:39:20 xxxnagios3 ndo2db[20500]: Successfully disconnected from MySQL database

Re: Migration to Another Server

Posted: Thu Mar 26, 2020 5:15 am
by amitgupta19
Hi Scott,

I have Successfully migrated to the New Server OEL 7.7.

But i noticed one problem on this server that i do not get the option of Host and Service Trends.

Can you please suggest what could be the reason?

I have Installed the Nagios Version 4.4.5

Re: Migration to Another Server

Posted: Thu Mar 26, 2020 7:08 am
by scottwilkerson
I'm not sure I know what you mean, there is the Reports -> Legacy Reports -> Trends

Re: Migration to Another Server

Posted: Thu Mar 26, 2020 8:41 am
by amitgupta19
When We Click on a Host in Nagios. Then there is a link which gives us the trends for the past days.

Please refer to the attached screenshot.

Re: Migration to Another Server

Posted: Thu Mar 26, 2020 1:10 pm
by amitgupta19
In the screenshot(Red Highlighted Area) in there used to be the option of "View Trends for this Host".