Upgrade FAN 2.3 to FAN 2.4

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.
(FAN Standalone, Poller, Central or Database)

# yum install fan-backup
# /opt/fan_backup.pl [-d|--fan-database] | [-c|--fan-central] | [-p|--fan-poller] | [-s|--fan-standalone]

 

Pre-requisites : Update YUM repository

Clean yum cache

# yum clean all

 

Install FAN 2.4 repository

# rpm -Uvh http://www.fullyautomatednagios.org/FAN/repository/2.4/i386/fan-repo-2.4-fan.1.noarch.rpm

Create the file /etc/yum.repos.d/graphviz.repo (FAN Standalone or Central) :

[graphviz-stable]
name=Graphviz - RHEL $releasever - $basearch 
baseurl=http://www.graphviz.org/pub/graphviz/stable/redhat/el$releasever/$basearch/os/ 
enabled=0
gpgcheck=0
skip_if_unavailable=1

Enable or install EPEL repository (FAN Standalone Central or Poller) :

# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

Install lua package need by rrdtool (FAN Standalone or Central) :

# yum install lua

 

Upgrade FAN 2.4

FAN Standalone, Central

# yum --disablerepo=* --enablerepo=graphviz-stable --enablerepo=FAN update
Updating:
centreon-core              noarch      2.4.1-fan.1
centreon-database          noarch      2.4.1-fan.1
centreon-plugins           noarch      2.4.1-fan.1
centreon-storage           noarch      2.4.1-fan.1
centreon-trap              noarch      2.4.1-fan.1
centreon-www               noarch      2.4.1-fan.1
graphviz                   i386        2.30.1-1.el5
graphviz-gd                i386        2.30.1-1.el5
nagios                     i386        3.4.4-fan.1
nagios-ndoutils            i386        1.4-fan.30
nagios-ndoutils-database   i386        1.4-fan.30
nagios-plugins             i386        1.4.16-fan.1
nagios-plugins-setuid      i386        1.4.16-fan.1
nagvis                     i386        1.7.6-fan.1
pear-centreon              noarch      0.2-fan.1
rrdtool                    i386        1.4.3-fan.1
pear-Archive_Zip           noarch      0.1.2-1

FAN Poller

# yum --disablerepo=* --enablerepo=FAN update
centreon-plugins        noarch       2.4.1-fan.1
centreon-trap           noarch       2.4.1-fan.1
nagios                  x86_64       3.4.4-fan.1
nagios-ndoutils         x86_64       1.4-fan.30
nagios-plugins          x86_64       1.4.16-fan.1
nagios-plugins-setuid   x86_64       1.4.16-fan.1 

 

Install new plugin (Standalone, Central or Poller)

# yum --disablerepo=* --enablerepo=base --enablerepo=updates --enablerepo=epel --enablerepo=FAN install nagios-plugin-esxi-hardware nagios-plugin-nwc-health nrdp nrdp-plugin nagios-plugin-wmi-plus wmi-client

FAN Database

# yum --disablerepo=* --enablerepo=FAN update

Update /etc/issue

Modify /etc/issue file, replace

System      : FAN 2.3

by :

System      : FAN 2.4

Update Centreon

Now, connect to interface Centreon and follow the steps to update the database.

(FAN Standalone or Central)

Go to http://FAN-SERVER/centreon. Follow that link and follow the instructions. This will update your database.

 

 

Trap Configuration

If your poller receive snmp trap, you have to change the configuration.

Go to Configuration > Centreon > Pollers > choose your poller

Add /etc/init.d/snmptt in “SNMPTT Traps Collector”

Go to Configuration > SNMP Traps > Generate :

  • Select your poller
  • check box : Generate configuration files for SNMP Traps
  • check box : Apply configurations
  • check box : Restart SNMPTT
  • Clic on Generate

Finish (FAN Standalone, Central, Poller and Database)

Finally, reboot the server

# reboot

Troubleshouting

Nagvis

If you have some error in web interface, use the nagvis config file 1.7

# cd /etc/nagvis
# cp nagvis.ini.php nagvis.ini.php.old
# cp nagvis.ini.php.rpmnew nagvis.ini.php

Centreon config on poller

Check /etc/centreon/conf.pm file config. Add these lines if they are not present

# Central or Poller ?
$instance_mode = "poller";

# Centreon Centcore Command File
$cmdFile = "/var/log/nagios/nagios.cmd";

Config SNMPTT.ini for Snmp Trap

The centTrapHandler-2.x plugin needs a new configuration snmptt. During the update, yum don’t replace the config file.
Run this command (on the fan-central or fan-standalone) to replace manually the file :

# cp /etc/snmp/centreon_traps/snmptt.ini.rpmnew /etc/snmp/centreon_traps/snmptt.ini

 

Need help : post your message into the forum

  • #1 written by Philippe Meurier
    about 5 years ago

    Hi,
    fan 2.3.3 is running pretty well on my RHEL 5.7 x86_64 server in standalone mode.
    I tried to upgrade the server executing the procedure “Upgrade FAN 2.3 to FAN 2.4″, and I got 3 problems :
    1/ Problem in upgrading nagvis :
    The execution of the command : ” yum –disablerepo=* –enablerepo=FAN update” resulted in the messages :

    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Updating : nagvis 1/2
    Error unpacking rpm package nagvis-1.7.6-fan.1.x86_64
    warning: /etc/nagvis/maps/demo-germany.cfg created as /etc/nagvis/maps/demo-germany.cfg.rpmnew
    warning: /etc/nagvis/maps/demo-ham-racks.cfg created as /etc/nagvis/maps/demo-ham-racks.cfg.rpmnew
    warning: /etc/nagvis/maps/demo-load.cfg created as /etc/nagvis/maps/demo-load.cfg.rpmnew
    warning: /etc/nagvis/maps/demo-muc-srv1.cfg created as /etc/nagvis/maps/demo-muc-srv1.cfg.rpmnew
    warning: /etc/nagvis/maps/demo-overview.cfg created as /etc/nagvis/maps/demo-overview.cfg.rpmnew
    warning: /etc/nagvis/nagvis.ini.php created as /etc/nagvis/nagvis.ini.php.rpmnew
    error: unpacking of archive failed on file /usr/share/nagvis/etc: cpio: rename

    Failed:
    nagvis.x86_64 0:1.7.6-fan.1

    2/ Errors with plugins
    yum –disablerepo=* –enablerepo=base –enablerepo=updates –enablerepo=epel –enablerepo=FAN install nagios-plugin-esxi-hardware nagios-plugin-nwc-health nrdp nrdp-plugin nagios-plugin-wmi-plus wmi-client
    Loaded plugins: aliases, changelog, downloadonly, fastestmirror, filter-data, keys, kmod, list-data, priorities, protect-packages, protectbase, security,
    : tmprepo, verify, versionlock

    Error getting repository data for base, repository not found

    3/ Error with the Web interface
    Currently upgrading database… please do not interrupt this process.

    Step Status
    2.3.3 to 2.3.4 Update-CSTG-2.3.3_to_2.3.4.sql Line 3:DB Error: constraint violation
    You seem to be having trouble with your upgrade.
    You may refer to the line that causes problem in order to find out more about the issue.
    The SQL files are located in /usr/share/centreon/www/install/sql/
    But do not edit the SQL files unless you know what you are doing. Refresh this page when the problem is fixed.

    Could you please give me some help ?
    Thanks.

    • #2 written by lkco
      about 5 years ago

      Hi,
      1) have you run “yum clean all” ? it seems that the nagvis rpm was comrrupted during the download. Or download directly the rpm and run “yum localinstall”
      2) do you use a proxy http ? because i dont understand “Error getting repository data for base” message. I run this command and i havent issue.
      3) i dont know this problem. Try contact centreon community on #centreon or #fullyautomatednagios

  • #3 written by Philippe Meurier
    about 5 years ago

    Hi,
    Thanks for your answer.
    1/ Yes I did all the procedure, beginning with “yum clean all”. So I’ll try to download package and “yum localinstall”.
    2/ I don’t have a proxy. Perhaps, I can download and install these plugins by other ways ?
    3/ OK, I’ll post something on the centreon’s forum.
    Thanks anyway.

  • #4 written by Philippe Meurier
    about 5 years ago

    1/ I have the same problem installing it manually with yum localinstall or rpm -Uvh :
    [root@fan-test home]# rpm -Uvh nagvis-1.7.6-fan.1.x86_64.rpm
    Préparation… ########################################### [100%]
    1:nagvis attention: /etc/nagvis/maps/demo-germany.cfg créé en tant que /etc/nagvis/maps/demo-germany.cfg.rpmnew
    attention: /etc/nagvis/maps/demo-ham-racks.cfg créé en tant que /etc/nagvis/maps/demo-ham-racks.cfg.rpmnew
    attention: /etc/nagvis/maps/demo-load.cfg créé en tant que /etc/nagvis/maps/demo-load.cfg.rpmnew
    attention: /etc/nagvis/maps/demo-muc-srv1.cfg créé en tant que /etc/nagvis/maps/demo-muc-srv1.cfg.rpmnew
    attention: /etc/nagvis/maps/demo-overview.cfg créé en tant que /etc/nagvis/maps/demo-overview.cfg.rpmnew
    attention: /etc/nagvis/nagvis.ini.php créé en tant que /etc/nagvis/nagvis.ini.php.rpmnew
    ########################################### [100%]
    erreur: échec du déballage de l’archive dans fichier /usr/share/nagvis/etc: cpio: rename échec – est un répertoire
    [root@fan-test home]# cd -
    /usr/share/nagvis
    [root@fan-test nagvis]# ll
    total 36
    drwxrwxr-x 7 apache apache 4096 mai 30 2012 etc
    lrwxrwxrwx 1 root root 19 mar 19 17:57 etc;514898e5 -> ../../../etc/nagvis
    -rw-rw-r– 1 apache apache 18182 mai 13 2012 LICENCE
    -rw-rw-r– 1 apache apache 1538 mai 13 2012 README
    drwxrwxr-x 8 apache apache 4096 mai 30 2012 share
    drwxrwxr-x 3 apache apache 4096 fév 28 12:45 var
    [root@fan-test nagvis]# rpm -qa | grep nagvi
    nagvis-1.6.4-fan.1

    Strange : A symbolic link have been created but nagvis-1.7.6-fan.1 isn’t installed.
    Is there a problem with my directories ?

  • #6 written by Maxime
    about 5 years ago

    I’ve this error when i go to nagvis :

    “The attribute showinlists in section automap in main configuration file is deprecated. Please take a look at the documentation for updating your configuration.”

    Can you help me please ?

Comments are closed.