Test Migration Centreon 1.4.2.7 to 2.0.2

: Dont run this howto in production server !!! If you find a bug, report it in FAN tracker's here

Assuming

  • server1 : is FAN-1.1 server. Centreon data (Reporting, View, Nagios Configuration) will be migrating from here.
  • server2 : is a fresh install to FAN-2-beta. Centreon data will be migrating to here.

Run MysqlDump

On server1, dump centreon 1.4.2.7 database

server1:# mysqldump centreon > centreon1.sql
server1:# mysqldump centreon_cds > centreon_cds.sql

Copy sql file

Send sql files from server1 to server2, for example :

server1:# scp centreon1.sql centreon_cds.sql root@server2:.

Import sql

server2:# mysqladmin create centreon
server2:# mysqladmin create centreon_cds
server2:# mysql centreon -u root -p < centreon1.sql
server2:# mysql centreon_cds -u root -p < centreon_cds.sql

Stop Services

server2:# /etc/init.d/nagios stop
server2:# /etc/init.d/centcore stop
server2:# /etc/init.d/centstorage stop
server2:# /etc/init.d/ndo2db stop

Data migration

Download update_centreon_1.4.2.7_to_2.0.2.pl

server2:# wget http://fannagioscd.svn.sourceforge.net/svnroot/fannagioscd/trunk/extensions/update_centreon_1.4.2.7_to_2.0.2.pl
server2:# chmod +x update_centreon_1.4.2.7_to_2.0.2.pl

If you have changed the default configuration database, configure globals variables. Edit update_centreon_1.4.2.7_to_2.0.2.pl and apply your changes :

my $CENTREON_1_MYSQL_HOST                = "127.0.0.1"; 
my $CENTREON_1_MYSQL_CENTREON_DB_NAME    = "centreon";
my $CENTREON_1_MYSQL_ODS_DB_NAME         = "centreon_cds";
my $CENTREON_1_MYSQL_USER_DB             = "root";
my $CENTREON_1_MYSQL_PASSWORD_DB         = "";
my $CENTREON_2_MYSQL_HOST                = "127.0.0.1"; 
my $CENTREON_2_MYSQL_CENTREON_DB_NAME    = "centreon2";
my $CENTREON_2_MYSQL_CENTSTORAGE_DB_NAME = "centreon2_storage";
my $CENTREON_2_MYSQL_USER_DB             = "root";
my $CENTREON_2_MYSQL_PASSWORD_DB         = "";
my $NAGIOS_SERVER                        = "1";

METHODE 1

Use option ”-s” and 2 sql files will be generated. See variables $SQL_FILE_CENTREON2 and $SQL_FILE_CENTSTORAGE

server2:# ./update_centreon_1.4.2.7_to_2.0.2.pl -s 

Import sql file into centreon databases :

server2:# mysql -u root -p centreon2 < /root/update_centreon2.sql
server2:# mysql -u root -p centreon2_storage < /root/update_centstorage.sql

METHODE 2

Run update_centreon_1.4.2.7_to_2.0.2.pl. Changes will be apply into Centreon2 databases

server2:# ./update_centreon_1.4.2.7_to_2.0.2.pl

Starting services

server2:# /etc/init.d/nagios start
server2:# /etc/init.d/centcore start
server2:# /etc/init.d/centstorage start
server2:# /etc/init.d/ndo2db start

Rebuild Views

Connect you on Centreon Web, export your Nagios Configuration

Go to Configuration→Nagios

Check “Move Export Files”, “Restart Nagios” and finally clic on “Export”

Now, wait few minutes (5 and 15 min) while nagios launch all services.

Go to Administration→CentStorage→Manage

Select all data and do “Rebuild RRD Database”

So all rrd file will be generated in Views

Rebuild Reporting

Be careful, you may lose data on the reporting

server2:# /usr/bin/perl /usr/share/centreon/cron/archiveDayLog -r
supervision/test_upgrade_centreon_1.42.7_-_2.0.2.txt · Dernière modification: 2017/07/07 14:42 (modification externe)
CC Attribution-Noncommercial-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0