how to migrate configuration from one nagios server to other

Discuss new project and feature ideas here.
See labs.nagios.com for new projects under development.

how to migrate configuration from one nagios server to other

Postby pfsweb » Thu May 17, 2018 7:01 am

Hi,

how to migrate configuration file from one nagios server to other nagios server. Please provide document.

We have one running nagios server, created new nagios one need to move the all configuration from old to new.
pfsweb
 
Posts: 47
Joined: Fri Jun 27, 2014 9:01 am

Re: how to migrate configuration from one nagios server to o

Postby kyang » Thu May 17, 2018 11:56 am

Which "Nagios" are you using?

Nagios XI or Nagios Core? Or a different product? Nagios Fusion, Nagios Log Server, Nagios Network Analyzer?

What version is the old and what version is the new?
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!
kyang
Support Tech
 
Posts: 1792
Joined: Tue Jul 25, 2017 3:35 pm

Re: how to migrate configuration from one nagios server to o

Postby pfsweb » Fri May 18, 2018 1:55 am

Our old nagios server is Nagios XI 5.2.0 and the new server is Nagios XI 5.4.13
pfsweb
 
Posts: 47
Joined: Fri Jun 27, 2014 9:01 am

Re: how to migrate configuration from one nagios server to o

Postby scottwilkerson » Fri May 18, 2018 1:28 pm

You should be able to perform a backup and then restore just fine
https://assets.nagios.com/downloads/nagiosxi/docs/Backing-Up-And-Restoring-Nagios-XI.pdf

However, one thing to point out is that I want to point out is that this restore will bring you back to 5.2.0, so you will then want to perform an upgrade.

Code: Select all
cd /tmp
rm -rf nagiosxi xi*
wget https://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
tar xzf xi*.tar.gz
cd /tmp/nagiosxi
./upgrade
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: 11551
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: how to migrate configuration from one nagios server to o

Postby pfsweb » Mon May 21, 2018 2:32 am

If we have take the backup from Nagios XI 5.2.0 and can we restore the backup to new server Nagios XI 5.4.13
pfsweb
 
Posts: 47
Joined: Fri Jun 27, 2014 9:01 am

Re: how to migrate configuration from one nagios server to o

Postby tmcdonald » Mon May 21, 2018 10:07 am

Whatever version the software is when you back it up is the version it will be when you restore it. We do not advise restoring an older version over a newer one.
Former Nagios employee
tmcdonald
 
Posts: 9118
Joined: Mon Sep 23, 2013 8:40 am

Re: how to migrate configuration from one nagios server to o

Postby pfsweb » Tue May 22, 2018 2:18 am

then except restore, is there any way to move configuration file from old nagios server Nagios XI 5.2.0 to nagios server Nagios XI 5.4.13?
pfsweb
 
Posts: 47
Joined: Fri Jun 27, 2014 9:01 am

Re: how to migrate configuration from one nagios server to o

Postby pfsweb » Tue May 22, 2018 6:24 am

i tried restore the backup but i got a warning saying resore a OS 6 backup on a OS 7 system

Compiled plugins and other binaries as welll as httpd configurations will not be restored
pfsweb
 
Posts: 47
Joined: Fri Jun 27, 2014 9:01 am

Re: how to migrate configuration from one nagios server to o

Postby pfsweb » Tue May 22, 2018 6:46 am

after restore getting the below error


Message: A database connection error has been detected, we are attempting to repair the server, if the repair does not resolve the issue, please contact Nagios support.

Run the following from the CLI as root to attempt to repair the DB

/usr/local/nagiosxi/scripts/repair_databases.sh
Message: A database connection error has been detected, we are attempting to repair the server, if the repair does not resolve the issue, please contact Nagios support.

Run the following from the CLI as root to attempt to repair the DB

/usr/local/nagiosxi/scripts/repair_databases.sh
Message: A database connection error has been detected, we are attempting to repair the server, if the repair does not resolve the issue, please contact Nagios support.

Run the following from the CLI as root to attempt to repair the DB

/usr/local/nagiosxi/scripts/repair_databases.sh
pfsweb
 
Posts: 47
Joined: Fri Jun 27, 2014 9:01 am

Re: how to migrate configuration from one nagios server to o

Postby cdienger » Tue May 22, 2018 4:18 pm

Run the following on the new server:

cat /usr/local/nagiosxi/html/config.inc.php | sed -rn "/\"ndoutils\" => array\(*/,/\"dbmaint\"/p" | grep -o -P '(?<="dbserver" => ).*(?=,)' | tr -d \'

If the database is not hosted on localhost, then you'll need to update your datbase's config to allow the new machine to connect. https://assets.nagios.com/downloads/nag ... Server.pdf contains the commands to be run on the database server:

mysql -u root -p'mypassword'
create database nagios;
GRANT ALL ON nagios.* TO nagios@'<IP_OF_NAGIOS_XI_SERVER>' IDENTIFIED BY 'nagios';
create database nagiosql;
GRANT ALL ON nagiosql.* TO nagiosql@'<IP_OF_NAGIOS_XI_SERVER>' IDENTIFIED BY 'nagiosql';
create database nagiosxi;
GRANT ALL ON nagiosxi.* TO nagiosxi@'<IP_OF_NAGIOS_XI_SERVER>' IDENTIFIED BY 'nagiosxi';
quit;
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 1770
Joined: Tue Feb 07, 2017 11:26 am

Next

Return to Nagios Ideas

Who is online

Users browsing this forum: No registered users and 2 guests