Upgrade FAN 2.0 to FAN 2.1

Recommendations

Before performing the update, there are significant changes in FAN 2.1.

  • Nagios CGI don’t use Nuvola’s theme. It’s use Vautor theme
  • For Centreon 2.1.13, the packs languages don’t available.
  • Nareto is not maintained.
  • Nagvis : You need to migrate your maps nagvis-1.4.X to nagvis 1.5.X

 

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
# mysqldump nagios | gzip > nagios-backup.sql.gz

Backup your nagvis maps

# tar czf nagvis-maps-backup.tar.gz /usr/share/nagios/nagvis

Pre-requisites : update YUM

Make you sure, FAN 2.0 is updated and all packages CentOS. Above all, it is advisable to use the latest version centreon*2.0.2-fan.17 who is available in repository : http://lkco.gezen.fr/FAN/repository/fan2prod/

Modify the file /etc/yum.repos.d/FAN.repo :

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

Run :

# yum update

Installation

Modify Yum repository

Modify the file /etc/yum.repos.d/FAN.repo :

[FAN]
name=FAN2.1
baseurl=http://lkco.gezen.fr/FAN/repository/2.1/$basearch/
gpgkey=http://lkco.gezen.fr/FAN/repository/RPM-GPG-KEY-FAN-1
enabled=1
priority=5

Create the file /etc/yum.repos.d/graphviz.repo :

[Graphviz]
name=graphviz
gpgcheck=1
baseurl=http://www.graphviz.org/pub/graphviz/stable/redhat/el5/$basearch/os/
enabled=0
gpgcheck=0

Clear yum cache :

# yum clean all

Update centreon 2.0.X to centreon 2.1.X

[INFO] If you have already installed centreon 2.1.X, go to next section

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 --disablerepo=* --enablerepo=base --enablerepo=updates --enablerepo=FAN install php-xml centreon-core centreon-database centreon-plugins centreon-storage centreon-trap centreon-www
# /etc/init.d/ndo2db start
# /etc/init.d/nagios start

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

Full update

Run a full update

# yum --disablerepo=* --enablerepo=base --enablerepo=updates --enablerepo=FAN --enablerepo=Graphviz update

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

Update Nagvis 1.5.X

Download update-nagvis-1.4-to-1.5.sh script.

# wget https://fannagioscd.svn.sourceforge.net/svnroot/fannagioscd/tag/fannagioscd-2.1/extensions/update-nagvis-1.4-to-1.5.sh
# chmod +x update-nagvis-1.4-to-1.5.sh
# ./update-nagvis-1.4-to-1.5.sh

Finally, reboot the server

# reboot

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 in Views interface, there’re 2 options :

  • First solution
Clear the cache of your browser.
  • Second solution

During the update, it’s possible the directory /var/lib/centreon be deleted. You just recreate it :

# 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.

  • #1 written by Alibaskins
    about 5 years ago

    Félicitations pour votre travail et ce tuto qui a parfaitement fonctionné !

  • #2 written by Yaya
    about 4 years ago

    Bonjour,
    j’ai configure FAN avec gnokii ,les test gnokii passent en ligne de commande mais je ne recois aucune notifications SMS.Pourtant jai tt configure dans nagios puis dans centreon mais aucun retour…

    Aidez SVP

    • #3 written by lkco
      about 4 years ago

      Bonjour,
      dans Centreon, as-tu bien crée ta commande de notification, puis créé un contact qui utilise cette commande ?
      Puis rattaché à ton service ton contact ?


four − = 1