Migration to Another Server

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Migration to Another Server

Post 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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Migration to Another Server

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Migration to Another Server

Post by amitgupta19 »

Can you please help me with the names of the config files, which we need to copy from one server to another?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Migration to Another Server

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Migration to Another Server

Post 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 ?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Migration to Another Server

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Migration to Another Server

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Migration to Another Server

Post by scottwilkerson »

I'm not sure I know what you mean, there is the Reports -> Legacy Reports -> Trends
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Migration to Another Server

Post 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.
Attachments
View Trends for This Host.JPG
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: Migration to Another Server

Post by amitgupta19 »

In the screenshot(Red Highlighted Area) in there used to be the option of "View Trends for this Host".
Locked