Upgrade centreon 2.0.X to centreon 2.1

Take a Backup

The next thing to do is to take a backup of your database. Because if you want go back, you’ll need to restore the database.

# mysqldump centreon2 | gzip > centreon2-backup.sql.gz
# mysqldump centreon2_storage | gzip > centreon2_storage-backup.sql.gz

Installation

Centreon 2.1.X is not in FAN2PROD repository but you can test it. It’ll integrated into the next release FAN 2.1.

Add an entry in /etc/yum.repos.d/FAN.repo :

[FAN2TEST]
name=FAN2TEST
baseurl=http://lkco.gezen.fr/FAN/repository/fan2test/
gpgkey=http://lkco.gezen.fr/FAN/repository/fan2prod/RPM-GPG-KEY-FAN-1
enabled=0

First, you need to remove centreon 2.0.2 and packs language :

# /etc/init.d/nagios stop
# /etc/init.d/ndo2db stop
# /etc/init.d/centcore stop
# /etc/init.d/centstorage stop
# yum remove centreon  centreon-2.0-de_DE centreon-2.0-nl_NL  centreon-2.0-es_ES  centreon-2.0-fr_FR centreon-2.0-no_NO centreon-2.0-ru_RU  centreon-database centreon-plugins centreon-2.0-es_PR centreon-2.0-pt_BR

Now, you can install centreon 2.1 :

# yum install --disablerepo=FAN --enablerepo=FAN2TEST php-xml centreon-core centreon-database centreon-plugins centreon-storage centreon-trap centreon-www
# /etc/init.d/ndo2db start
# /etc/init.d/nagios start
# /etc/init.d/centcore start
# /etc/init.d/centstorage start

Finally, it must connect to interface Centreon and follow the steps to update the database. Go to http://FAN-SERVER/centreon/

Troubleshooting

If you encounter problems in reporting Centreon, run the following commands to regenerate.

# su - nagios -c "/usr/share/centreon/bin/logAnalyser -a"
# su - nagios -c "/usr/share/centreon/cron/archiveDayLog -r" 

If you lose your rrd graph, rebuild Views

# mkdir -p /var/lib/centreon
# chown -R nagios:nagios /var/lib/centreon

In Centreon, go to Administration -> CentStorage -> Manage
Select all data and do Rebuild RRD Database
So all rrd file will be generated in Views and wait few minutes (between 15 and 90 min) by centstorage daemon.