Centreon installation in CentOS

What is Centreon ?

Centreon is frontend GUI applications that manages Nagios (similar to Groundwork’s Fruity), uses MySQL database to create the /etc/nagios/*.cfg files necessary for the Nagios daemon.


Requirements : Before you install Centreon you need to install & configure the following packages in your machine :
– Nagios
– GCC
– Make
– Sudo
– Apache (httpd server)
– MySQL-Server (database server)
– PHP (PHP support)
– GD & GD-Devel
– Perl
– RRDTOOL

Nagios
Nagios (pronounced /ˈnɑːɡi.oʊs/) is a popular open source computer system and network monitoring software application. It watches hosts and services, alerting users when things go wrong and again when they get better.

Nagios, originally created under the name NetSaint, was written and is currently maintained by Ethan Galstad, along with a group of developers actively maintaining both official and unofficial plugins.

N.A.G.I.O.S. is a recursive acronym: “Nagios Ain’t Gonna Insist On Sainthood”[3], “Sainthood” being a reference to the original name of the software, which was changed in response to a legal challenge by owners of a similar trademark.[4]
Nagios was originally designed to run under Linux, but also runs well on other Unix variants. It is free software, licensed under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Centreon installation

Installation :
Download and extract Centreon packages :

[root@t2 centreon]# wget http://download.centreon.com/centreon/centreon-1.4.2.7.tar.gz
[root@t2 centreon]# tar zxvf centreon-1.4.2.7.tar.gz

Move to source directory, run install script, and follow all instruction suitable to your configuration :

[root@local centreon]# cd centreon-1.4.2.7
[root@local centreon-1.4.2.7]# ./install.sh

###############################################################################
#                            Centreon (www.centreon.com)                      #
#                            Thanks for using Centreon                        #
#                                                                             #
#                                   v 1.4.2.7                                 #
#                                                                             #
#                             infos@oreon-project.org                         #
#                                                                             #
#                     Make sure you have installed and configured             #
#                                   sudo - sed                                #
#                          php - apache - rrdtool - mysql                     #
#                                                                             #
#                                                                             #
###############################################################################
#                                 The Team Centreon                           #
###############################################################################

WARNING : Setup will delete all previous informations in your Centreon DATABASE.

Are you sure to continue ?
[y/n], default to [n]:
Where is installed Nagios ?
default to [/usr/local/nagios]:

Where is your nagios etc directory ?
default to [/usr/local/nagios/etc]:
Path /usr/local/nagios/etc                                 OK

Where is your nagios var directory ?
default to [/usr/local/nagios/var]:
Path /usr/local/nagios/var                                 OK

Where is your nagios plugins (libexec) directory ?
default to [/usr/local/nagios/libexec]:
Path /usr/local/nagios/libexec                             OK

Where is your nagios bin directory?
default to [/usr/local/nagios/bin]:
Path /usr/local/nagios/bin                                 OK

Where is your nagios image directory ?
default to [/usr/local/nagios/share/images]:
Path /usr/local/nagios/share/images                        OK

Where do I install centreon ?
default to [/usr/local/centreon]:
Directory /usr/local/centreon does not exits.              CRITICAL

Do you want me to create this directory [/usr/local/centreon]?[Y/n]Y
Path /usr/local/centreon                                   OK

Where is sudo configuration file?
default to [/etc/sudoers]:
File /etc/sudoers                                          OK
Cannot find /usr/local/rrdtool/lib/perl/RRDs.pm.           CRITICAL
Where is installed RRD perl modules [RRDs.pm] ?
Just put directory, not full path.
default to [/usr/local/rrdtool/lib/perl]:/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
File /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-mulOK

Where is rrdtool binary ?
default to [/usr/bin/rrdtool]:
/usr/bin/rrdtool                                           OK

Where is mail binary ?
default to [/usr/bin/mail]:
/usr/bin/mail not found or not runnable                    CRITICAL
Where is mail binary ?
default to [/usr/bin/mail]:/bin/
/bin/                                                      OK

Where is PEAR Path ?
default to [/usr/share/pear]:
PEAR Path /usr/share/pear                                  OK

————————————————————————
User Management
————————————————————————

Finding Apache group :                                     apache
Finding Apache user :                                      apache
Finding Nagios group :                                     nagios
Finding nagios group ‘nagios’ in /etc/group                YES
Finding Nagios user :                                      nagios
Finding nagios user ‘nagios’ in /etc/passwd                YES

————————————————————————
Other Stuff
————————————————————————

TrueType directory created                                 OK
TrueType verdana installed                                 OK
Finding PEAR Path : /usr/share/pear                        OK
PEAR Font installed                                        OK

————————————————————————
Configure Apache server
————————————————————————

Create ‘/etc/httpd/conf.d/oreon.conf’                      OK
Configuring Apache                                         OK
User apache added to nagios group                          OK

Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

————————————————————————
Start Centreon Installation
————————————————————————

Centreon Directory already exists                          PASSED
Copy ‘filesGeneration’                                     OK
Copy ‘filesUpload’                                         OK
Copy ‘GPL_LIB’                                             OK
Copy ‘log’                                                 OK
Copy ‘www’                                                 OK
Copy ‘cron’                                                OK
Copy ‘ODS’                                                 OK
Copy ‘ODS_SRC_ETC’                                         OK
Copy ‘doc’                                                 OK

————————————————————————
Start Plugins Centreon Installation
————————————————————————

/usr/local/nagios/libexec already exists                   PASSED

Preparing Oreon Plugins…
-> centreon.conf                                         OK
-> centreon.pm                                           OK
-> check_centreon_dummy                                  OK
-> check_centreon_MS_multiple_services                   OK
-> check_centreon_nt                                     OK
-> check_centreon_ping                                   OK
-> check_centreon_snmp_cpu                               OK
-> check_centreon_snmp_IF_adminstatus                    OK
-> check_centreon_snmp_loadaverage                       OK
-> check_centreon_snmp_multiple_process                  OK
-> check_centreon_snmp_packetErrors                      OK
-> check_centreon_snmp_packetLost                        OK
-> check_centreon_snmp_process                           OK
-> check_centreon_snmp_process_detailed                  OK
-> check_centreon_snmp_remote_storage                    OK
-> check_centreon_snmp_TcpConn                           OK
-> check_centreon_snmp_traffic                           OK
-> check_centreon_snmp_uptime                            OK
-> check_centreon_snmp_value                             OK
-> check_meta_service                                    OK
-> check_snmp_cpfw.pl                                    OK
-> check_snmp_load.pl                                    OK
-> check_snmp_mem.pl                                     OK
-> check_snmp_process.pl                                 OK
-> check_snmp_processus_loaded.pl                        OK
-> check_snmp_script_result.pl                           OK
-> check_snmp_storage.pl                                 OK
-> check_snmp_win.pl                                     OK
-> d2utmphOsqOZ                                          OK
-> d2utmpzoalk8                                          OK

-> process-service-perfdata                              OK
-> submit_host_check_result                              OK
-> submit_service_check_result                           OK

Do you want to install Centreon Plugins ?

[y/n], default to [y]:
Installing Centreon Plugins on ‘/usr/local/nagios/libexec’ OK

————————————————————————
Start Traps Handler Installation
————————————————————————

Preparing Oreon Plugins…
-> fill_trapDB
-> genSnmpttConfFile
-> trapHandler

Do you want to install Centreon Traps Plugins ?

[y/n], default to [y]:
Installing Centreon Traps Plugins on
/usr/local/nagios/libexec/traps created                    OK

Where is your SNMP configuration file?
default to [/etc/snmp/]:

Moving snmptrapd.conf to /etc/snmp/                        OK
/etc/snmp/centreon_traps created                           OK
Moving snmptt.ini to /etc/snmp/centreon_traps/             OK
Moving snmp.conf to /etc/snmp/                             OK
Moving snmptt to /usr/sbin/                                OK
Moving snmpttconvertmib to /usr/sbin/                      OK
/usr/local/nagios/libexec/traps/’                          OK

Finding Centreon Plugins configuration file ‘centreon.conf’OK
You already seem to have installed the plugins Centreon.
Do you want overwrite this file ? You must regenerate this one from Centreon interface.
[y/n], default to [n]:
/usr/local/centreon/filesGeneration/nagiosCFG already existPASSED
/usr/local/centreon/filesUpload/nagiosCFG already exists   PASSED

————————————————————————
Start ODS Installation
————————————————————————

Checking ODS data folder :
Creating Centreon Directory ‘/var/lib/ods’                 OK
Checking ODS database folder :
Creating Centreon Directory ‘/var/lib/ods/database/’       OK
Checking ODS log folder :
Creating Centreon Directory ‘/var/log/ods/’                OK
Replace ODS Macro                                          OK
Install ODS Binary                                         OK
Set ODS properties                                         OK

————————————————————————
Replace Macro In ODS cron script
————————————————————————

in /usr/local/centreon/cron/inventory_update.php           OK
in /usr/local/centreon/cron/reporting/ArchiveLogInDB.php   OK
in /usr/local/centreon/cron/parsing_status.pl              OK
in /usr/local/centreon/cron/parsing_log.pl                 OK

————————————————————————
Start Centreon Cron Configuration
————————————————————————

Specify user do you use for Centreon cron
Default to [nagios]
no crontab for nagios
You old crontab is backup on /tmp/crontab_nagios.cT2935 file

————————————————————————
Configure Sudo
————————————————————————

Finding nagios init script :                               /etc/init.d/nagios
Configuring Sudo                                           OK

————————————————————————
Centreon Post Install
————————————————————————

Finding mail binary : /bin/                                OK
Finding rrdtool binary : /usr/bin/rrdtool                  OK
Create /usr/local/centreon/www/install/installoreon.conf.phOK
Create /etc/oreon.conf                                     OK
Configuring Oreon post-install                             OK

###############################################################################
#      Go to the URL : http://your-server/oreon/                              #
#                   or http://your-server/centreon/  to finish the setup      #
#                                                                             #
#                    Report bugs at bugs@oreon-project.org                    #
#                                                                             #
#                           Thanks for using Centreon.                        #
#                             ———————–                         #
#                        Contact : infos@oreon-project.org                    #
#                            http://www.centreon.com                          #
###############################################################################

If this successful, go to http://your-server/centreon/ and finish installation by following and fullfil all requirements.

Notes :
Sometimes when you try to install rrdtool via yum, it’s show no packages under that names.

Follow this instruction to install rrdtool :
1. Adding RPMforge Repository

# yum -y install yum-priorities

2. Edit /etc/yum/pluginconf.d/priorities.conf

[main]
enabled=1

3. Download and install rpmforge

# wget http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el…
# rpm –import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
# rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm
# rpm -i rpmforge-release-0.3.6-1.el5.rf.*.rpm

4. Now you can install rrdtool using yum

# yum install -y perl-rrdtool
# yum install -y rrdtool
# yum install -y rrdtool-devel

Leave a Reply

Your email address will not be published.