Centreon 2.4.2 + Debian 7 wheezy

Ya hace un tiempo documenté como instalar centreon, pero cambian las versiones y también la forma de hacer las instalaciones, así que volvemos a la carga! :)

Esta vez lo estoy haciendo dentro de un contenedor openVZ con debian 7.

Lo primero será instalar algunos paquetes:

# apt-get install apache2 php5 php5-mysql php-pear php5-ldap php5-snmp php5-gd mysql-server-5.5 libmysqlclient-dev rrdtool librrds-perl libconfig-inifiles-perl snmp snmpd libnet-snmp-perl libgd2-xpm libgd2-xpm-dev libpng12-dev debconf-utils libglib2.0-dev nagios3 nagios-nrpe-plugin nagios-plugins ndoutils-nagios3-mysql sudo

A continuación nos descargamos la última versión de esta URL, lo descomprimimos y empezamos la instalación:

# cd
# wget -c http://download.centreon.com/centreon/centreon-2.4.2.tar.gz
# tar xvzf centreon-2.4.2.tar.gz
# cd centreon-2.4.2
# ./install.sh -i

Y a continuación definimos esta configuración. Atención, la instalación que estoy haciendo es teniendo en base a nagios3 como colector de datos.

###############################################################################
#                                                                             #
#                         Centreon (www.centreon.com)                         #
#                          Thanks for using Centreon                          #
#                                                                             #
#                                    v2.4.2                                   #
#                                                                             #
#                               infos@centreon.com                            #
#                                                                             #
#                   Make sure you have installed and configured               #
#                   sudo - sed - php - apache - rrdtool - mysql               #
#                                                                             #
###############################################################################
------------------------------------------------------------------------
	Checking all needed binaries
------------------------------------------------------------------------
rm                                                         OK
cp                                                         OK
mv                                                         OK
/bin/chmod                                                 OK
/bin/chown                                                 OK
echo                                                       OK
more                                                       OK
mkdir                                                      OK
find                                                       OK
/bin/grep                                                  OK
/bin/cat                                                   OK
/bin/sed                                                   OK

You will now read Centreon Licence.
	Press enter to continue.

		    GNU GENERAL PUBLIC LICENSE
		       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
                       51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

			    Preamble

  The licenses 
[...] 
this License.

Do you accept GPL license ?
[y/n], default to [n]:
> y
------------------------------------------------------------------------
	Please choose what you want to install
------------------------------------------------------------------------

Do you want to install : Centreon Web Front
[y/n], default to [n]:
> y

Do you want to install : Centreon CentCore
[y/n], default to [n]:
> y

Do you want to install : Centreon Nagios Plugins
[y/n], default to [n]:
> y

Do you want to install : Centreon Snmp Traps process
[y/n], default to [n]:
> y

------------------------------------------------------------------------
	Start CentWeb Installation
------------------------------------------------------------------------

Where is your Centreon directory?
default to [/usr/local/centreon]
> 
Path /usr/local/centreon                                   OK

Where is your Centreon log directory
default to [/usr/local/centreon/log]
> 
Path /usr/local/centreon/log                               OK

Where is your Centreon etc directory
default to [/etc/centreon]
> 
Path /etc/centreon                                         OK

Where is your Centreon binaries directory
default to [/usr/local/centreon/bin]
> 
Path /usr/local/centreon/bin                               OK

Where is your Centreon data informations directory
default to [/usr/local/centreon/data]
> 
Path /usr/local/centreon/data                              OK

Where is your Centreon generation_files directory?
default to [/usr/local/centreon]
> 
Path /usr/local/centreon                                   OK

Where is your Centreon variable library directory?
default to [/var/lib/centreon]
> 
Path /var/lib/centreon                                     OK

Where is your CentPlugins Traps binary
default to [/usr/local/centreon/bin]
> 
Path /usr/local/centreon/bin                               OK

Where is the RRD perl module installed [RRDs.pm]
default to [/usr/lib/perl5/RRDs.pm]
> 
Path /usr/lib/perl5                                        OK
/usr/bin/rrdtool                                           OK
/usr/bin/mail                                              OK
/usr/bin/php                                               OK

Where is PEAR [PEAR.php] 
default to [/usr/share/php/PEAR.php]
> 
Path /usr/share/php                                        OK
/usr/bin/perl                                              OK
Finding Apache user :                                      www-data
Finding Apache group :                                     www-data

What is the Centreon group ? [centreon]
default to [centreon]
> 

What is the Centreon user ? [centreon]
default to [centreon]
> 

What is the Monitoring engine user ?
> nagios

What is the Broker user ? (optional)
> nagios

What is the Monitoring engine log directory ?
> /var/log/nagios3

Where is your monitoring plugins (libexec) directory ?
default to [/usr/lib/nagios/plugins]
> 
Path /usr/lib/nagios/plugins                               OK
Add group centreon to user www-data                        OK
Add group centreon to user nagios                          OK
Add group nagios to user www-data                          OK
Add group nagios to user centreon                          OK

------------------------------------------------------------------------
	Configure Sudo
------------------------------------------------------------------------

Where is sudo configuration file
default to [/etc/sudoers]
>     
/etc/sudoers                                               OK

What is the Monitoring engine init.d script ?
> /etc/init.d/nagios3

What is the Monitoring engine binary ?
> /usr/sbin/nagios3

What is the Monitoring engine configuration directory ?
> /etc/nagios3

Where is the configuration directory for broker module ?
> /etc/nagios3

Where is the init script for broker module daemon ?
> /etc/init.d/ndoutils
Your sudo is not configured

Do you want me to configure your sudo ? (WARNING) 
[y/n], default to [n]:
> y
Configuring Sudo                                           OK

------------------------------------------------------------------------
	Configure Apache server
------------------------------------------------------------------------

Do you want to add Centreon Apache sub configuration file ?
[y/n], default to [n]:
> y
Create '/etc/apache2/conf.d/centreon.conf'                 OK
Configuring Apache                                         OK

Do you want to reload your Apache ?
[y/n], default to [n]:
> y
Reloading Apache service                                   OK
Preparing Centreon temporary files
Change right on /usr/local/centreon/log                    OK
Change right on /etc/centreon                              OK
Change macros for insertBaseConf.sql                       OK
Change macros for sql update files                         OK
Change macros for php files                                OK
Change right on /etc/nagios3                               OK
Add group nagios to user www-data                          OK
Add group nagios to user nagios                            OK
Add group centreon to user nagios                          OK
Copy CentWeb in system directory
Install CentWeb (web front of centreon)                    OK
Change right for install directory
Change right for install directory                         OK
Install libraries                                          OK
Write right to Smarty Cache                                OK
Copying libinstall                                         OK
Change macros for centreon.cron                            OK
Install Centreon cron.d file                               OK
Change macros for centAcl.php                              OK
Change macros for downtimeManager.php                      OK
Change macros for eventReportBuilder.pl                    OK
Change macros for dashboardBuilder.pl                      OK
Install cron directory                                     OK
Change right for eventReportBuilder.pl                     OK
Change right for dashboardBuilder.pl                       OK
Change macros for centreon.logrotate                       OK
Install Centreon logrotate.d file                          OK
Prepare export-mysql-indexes                               OK
Install export-mysql-indexes                               OK
Prepare import-mysql-indexes                               OK
Install import-mysql-indexes                               OK
Prepare indexes schema                                     OK
Install indexes schema                                     OK

------------------------------------------------------------------------
Pear Modules
------------------------------------------------------------------------
Check PEAR modules
PEAR                            1.4.9       1.9.4          OK
DB                              1.7.6                      NOK
DB_DataObject                   1.8.4                      NOK
DB_DataObject_FormBuilder       1.0.0RC4                   NOK
MDB2                            2.0.0                      NOK
Date                            1.4.6                      NOK
HTML_Common                     1.2.2                      NOK
HTML_QuickForm                  3.2.5                      NOK
HTML_QuickForm_advmultiselect   1.1.0                      NOK
HTML_Table                      1.6.1                      NOK
Archive_Tar                     1.1         1.3.7          OK
Auth_SASL                       1.0.1                      NOK
Console_Getopt                  1.2         1.3.0          OK
Net_SMTP                        1.2.8                      NOK
Net_Socket                      1.0.1                      NOK
Net_Traceroute                  0.21                       NOK
Net_Ping                        2.4.1                      NOK
Validate                        0.6.2                      NOK
XML_RPC                         1.4.5                      NOK
SOAP                            0.10.1                     NOK
Log                             1.9.11                     NOK
Archive_Zip                     0.1.2                      NOK

Do you want me to install/upgrade your PEAR modules
[y/n], default to [y]:
> y
Upgrading PEAR modules
Installing PEAR modules
DB                              1.7.6       1.7.14         OK
DB_DataObject                   1.8.4       1.11.2         OK
DB_DataObject_FormBuilder       1.0.0RC4    1.0.2          OK
MDB2                            2.0.0       2.4.1          OK
HTML_QuickForm_advmultiselect   1.1.0       1.5.1          OK
HTML_Table                      1.6.1       1.8.3          OK
Auth_SASL                       1.0.1       1.0.6          OK
Net_SMTP                        1.2.8       1.6.1          OK
Net_Traceroute                  0.21        0.21.3         OK
Net_Ping                        2.4.1       2.4.5          OK
Validate                        0.6.2       0.8.5          OK
XML_RPC                         1.4.5       1.5.5          OK
SOAP                            0.10.1      0.13.0         OK
Log                             1.9.11      1.12.7         OK
Archive_Zip                     0.1.2       0.1.2          OK
Check PEAR modules
PEAR                            1.4.9       1.9.4          OK
DB                              1.7.6       1.7.14         OK
DB_DataObject                   1.8.4       1.11.2         OK
DB_DataObject_FormBuilder       1.0.0RC4    1.0.2          OK
MDB2                            2.0.0       2.4.1          OK
Date                            1.4.6       1.4.7          OK
HTML_Common                     1.2.2       1.2.5          OK
HTML_QuickForm                  3.2.5       3.2.13         OK
HTML_QuickForm_advmultiselect   1.1.0       1.5.1          OK
HTML_Table                      1.6.1       1.8.3          OK
Archive_Tar                     1.1         1.3.7          OK
Auth_SASL                       1.0.1       1.0.6          OK
Console_Getopt                  1.2         1.3.0          OK
Net_SMTP                        1.2.8       1.6.1          OK
Net_Socket                      1.0.1       1.0.10         OK
Net_Traceroute                  0.21        0.21.3         OK
Net_Ping                        2.4.1       2.4.5          OK
Validate                        0.6.2       0.8.5          OK
XML_RPC                         1.4.5       1.5.5          OK
SOAP                            0.10.1      0.13.0         OK
Log                             1.9.11      1.12.7         OK
Archive_Zip                     0.1.2       0.1.2          OK
All PEAR modules                                           OK

------------------------------------------------------------------------
		Centreon Post Install
------------------------------------------------------------------------
Create /usr/local/centreon/www/install/install.conf.php    OK
Create /etc/centreon/instCentWeb.conf                      OK

------------------------------------------------------------------------
	Start CentStorage Installation
------------------------------------------------------------------------

Where is your Centreon Run Dir directory?
default to [/var/run/centreon]
> 

Do you want me to create this directory ? [/var/run/centreon]
[y/n], default to [n]:
> y
Path /var/run/centreon                                     OK

Where is your CentStorage binary directory
default to [/usr/local/centreon/bin]
> 
Path /usr/local/centreon/bin                               OK

Where is your CentStorage RRD directory
default to [/var/lib/centreon]
> 
Path /var/lib/centreon                                     OK
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
install www/install/createTablesCentstorage.sql            OK
Creating Centreon Directory '/var/lib/centreon/status'     OK
Creating Centreon Directory '/var/lib/centreon/metrics'    OK
Change macros for centstorage binary                       OK
Install CentStorage binary                                 OK
Install library for centstorage                            OK
Change right : /var/run/centreon                           OK
Change macros for centstorage init script                  OK
Replace CentCore default script Macro                      OK

Do you want me to install CentStorage init script ?
[y/n], default to [n]:
> y
CentStorage init script installed                          OK
CentStorage default script installed                       OK

Do you want me to install CentStorage run level ?
[y/n], default to [n]:
> y
update-rc.d: using dependency based boot sequencing
Change macros for logAnalyser                              OK
Install logAnalyser                                        OK
Change macros for logAnalyser-cbroker                      OK
Install logAnalyser-cbroker                                OK
Change macros for nagiosPerfTrace                          OK
Install nagiosPerfTrace                                    OK
Change macros for purgeLogs                                OK
Install purgeLogs                                          OK
Change macros for purgeCentstorage                         OK
Install purgeCentstorage                                   OK
Change macros for centreonPurge.sh                         OK
Install centreonPurge.sh                                   OK
Change macros for centstorage.cron                         OK
Install CentStorage cron                                   OK
Change macros for centstorage.logrotate                    OK
Install Centreon Storage logrotate.d file                  OK
Create /etc/centreon/instCentStorage.conf                  OK

------------------------------------------------------------------------
	Start CentCore Installation
------------------------------------------------------------------------

Where is your CentCore binary directory
default to [/usr/local/centreon/bin]
> 
Path /usr/local/centreon/bin                               OK
/usr/bin/ssh                                               OK
/usr/bin/scp                                               OK
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Change CentCore Macro                                      OK
Copy CentCore in binary directory                          OK
Change right : /var/run/centreon                           OK
Change right : /var/lib/centreon                           OK
Change macros for centcore.logrotate                       OK
Install Centreon Core logrotate.d file                     OK
Replace CentCore init script Macro                         OK
Replace CentCore default script Macro                      OK

Do you want me to install CentCore init script ?
[y/n], default to [n]:
> y
CentCore init script installed                             OK
CentCore default script installed                          OK

Do you want me to install CentCore run level ?
[y/n], default to [n]:
> y
update-rc.d: using dependency based boot sequencing
Create /etc/centreon/instCentCore.conf                     OK

------------------------------------------------------------------------
	Start CentPlugins Installation
------------------------------------------------------------------------

Where is your CentPlugins lib directory
default to [/var/lib/centreon/centplugins]
> 

Do you want me to create this directory ? [/var/lib/centreon/centplugins]
[y/n], default to [n]:
> y
Path /var/lib/centreon/centplugins                         OK
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Change macros for CentPlugins                              OK
Installing the plugins                                     OK
Change right on centreon.conf                              OK
CentPlugins is installed

------------------------------------------------------------------------
	Start CentPlugins Traps Installation
------------------------------------------------------------------------

Where is your SNMP configuration directory
default to [/etc/snmp]
> 
/etc/snmp                                                  OK

Where is your SNMPTT binaries directory
default to [/usr/local/centreon/bin/]
> 
/usr/local/centreon/bin/                                   OK
Finding Apache user :                                      www-data
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Change macros for CentPluginsTraps                         OK
Change macros for init scripts                             OK
Installing the plugins Trap binaries                       OK
Change macros for snmptrapd.conf                           OK
Change macros for snmptt.ini                               OK
SNMPTT init script installed                               OK
SNMPTT default script installed                            OK
update-rc.d: using dependency based boot sequencing
Install : snmptrapd.conf                                   OK
Install : snmp.conf                                        OK
Install : snmptt.ini                                       OK
Install : snmptt                                           OK
Install : snmptthandler                                    OK
Install : snmpttconvertmib                                 OK
Create /etc/centreon/instCentPlugins.conf                  OK
###############################################################################
#                                                                             #
#                 Go to the URL : http://v-aaron-monitor.marsupi.org/centreon/#
#                   	     to finish the setup                              #
#                                                                             #
#                  Report bugs at http://forge.centreon.com                   #
#                                                                             #
#                         Thanks for using Centreon.                          #
#                          -----------------------                            #
#                        Contact : infos@centreon.com                         #
#                          http://www.centreon.com                            #
#                                                                             #
###############################################################################

A continuación vamos a la url que nos indica, si no tenemos resolución configurada aún, vamos por su ip, en mi caso 10.139.39.83

http://10.139.39.83/centreon

Y ahí empezamos a poner la información que nos pide de esta forma:

Captura-1

Captura-3

Captura-4

Captura-5

Captura-6

Captura-7

 

Aquí tendremos que modificar el fichero /etc/mysql/my.cnf y dentro de la sección [mysqld] añadir lo seleccionado. Luego pulsamos a refresh y sigue con la instalación.

Captura-8

Captura-9

 

 

 

Ahora accedemos otra vez a http://10.139.39.83/centreon y nos aparece la pantalla de login donde ponemos los datos que hemos indicado previamente.

Captura-10

 

Y ahora sólo nos quedará ir añadiendo los servicios y las maquinas a nuestra instancia.

Good luck! :P

19 Comments

  1. buenas, tengo un problema, despues de instalar todo, el nagios no arranca, me dice que no encuentra check_nagios y en el log muestra un problema de que no encuentra p1.pl.

    Respon
    • Carlos configuralo en el paso tres del setup por web
      /usr/lib/nagios3/p1.pl
      No de la GUI donde se guarda esta configuración.

      Respon
  2. Hola, tengo el siguiente problema; la instalación se realizó con éxito; sin embargo no se puede agregar nuevos “hosts” o “service” en el Centreon; que puede estar pasando?, gracias de antemano por la respuesta.

    Respon
  3. Moltes gràcies, molt bo el tutorial, ha eixit tot a la primera.

    Una salutació

    Respon
  4. Pingback: Centreon 2.4.3 + Debian 7 wheezy | LinuXen

  5. Thanks a lot ! I do not speek spanish but, however, it was really usefull for me and works fine on a Wheezy 64.

    Respon
  6. On Debian 6 you also need do this as root

    chmod 775 /var/log/nagios3
    mkdir /var/log/nagios3/rw/
    chown nagios:www-data /var/log/nagios3/rw/
    chmod 775 /var/log/nagios3/rw

    Respon
  7. Amigo hola mira habla claudio barrera estoy ocupando centreon y me da un error al ingresar user y password, el problema que no me indica que la clave esta mal escrita o algo, pero no puedo ingresar, amigo cualquier ayuda sirve
    Saludos.-

    Respon
  8. It doesn’t work, I’ve tried many times. Maybe you have to check this guide. Thanks

    Respon
  9. Pingback: Nagios + Centreon: Guía de instalación y configuración | OperativosLinux

  10. Pingback: Nagios + Centreon: Guía de instalación y configuración | OperativosLinux

  11. Hola: En primer lugar, muchas gracias por tu post, me vino muy bien y está muy muy bien explicado. He tenido un problemita de todos modos. Al entrar por primera vez al asistente de Centreon, no me deja elegir a nagios como monitoring engine. Qué puedo estar olvidando? Cómo lo arreglo? Gracias desde ya!

    Respon
    • te recomiendo usar la iso de centreon que ya te viene todo instalado y listo para funcionar

      Respon
  12. Pingback: Centreon 3.3 | Blackhold

Deixa un comentari

L'adreça electrònica no es publicarà. Els camps necessaris estan marcats amb *

Aquest lloc utilitza Akismet per reduir els comentaris brossa. Apreneu com es processen les dades dels comentaris.