Centreon 
Autor: Fabio Biancardi | Publicado: 2012-08-30T23:15:00-03:00







&nbsp;Centreon

Instalando os pacotes necessários:



# aptitude install sudo heirloom-mailx lsb-release build-essential apache2 apache2-mpm-prefork php5 php5-mysql php-pear php5-ldap php5-snmp php5-gd mysql-server libmysqlclient-dev rrdtool librrds-perl libconfig-inifiles-perl libcrypt-des-perl libdigest-hmac-perl libdigest-sha1-perl libgd-gd2-perl snmp snmpd libnet-snmp-perl libsnmp-perl libgd2-xpm libgd2-xpm-dev libpng12-dev snmp libsnmp-perl libnet-snmp-perl libconfig-inifiles-perl libmcrypt4 libmysqlclient-dev fping libldap2-dev postgresql-server-dev-8.4 libgnutls-dev libssl-dev smbclient&nbsp;&nbsp;





Configuração MYSQL





Na tela abaixo é necessário a criação da senha do
banco de dados







Configurando o Grupo de Trabalho do Samba







Configurando o SNMP



Acesse o Diretorio /etc/default e edite o arquivo
snmpd com o comando abaixo e altere o TRAPDRUN para "yes" para iniciar o snmp
junto com a máquina



#vi /etc/default/snmpd




Instalação do Nagios:



Criando o usuário para autenticação

# useradd
-m nagios&nbsp;
# usermod -L nagios&nbsp;

Criando o Grupo de usuário para comandos externos e associando ao usuário
nágios

# groupadd nagcmd&nbsp;
# usermod -G nagios,nagcmd nagios&nbsp;

Instalando o Nagios



Baixando o pacote de
Instalação



Acesse um diretório para baixar o pacote, no meu caso irei
baixa na pasta /home/nagios

#cd
/home/nagios/



# wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.3.tar.gz



Salvando em: nagios-3.2.3.tar.gzâ 100%[=================&gt;]
3249447&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 602K/s&nbsp;&nbsp; em 5,9s

2012-08-30 11:39:45 (535 KB/s) - nagios-3.2.3.tar.gz









Descompactando o arquivo



No diretório onde foi salvo o arquivo



# tar -xzf nagios-3.2.3.tar.gz&nbsp;









# cd nagios-3.2.3













Configurando e Instalando



# ./configure --prefix=/usr/local/nagios
--with-command-group=nagcmd --enable-nanosleep --enable-event-broker&nbsp;
#
make all
# make install
# make install-init
# make install-commandmode
# make install-config&nbsp;



Baixando
os Plugins do Nagios



# wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz 






<!--[if !supportLineBreakNewLine]-->

# tar xvzf nagios-plugins-1.4.15.tar.gz








./configure --with-nagios-user=nagios
--with-nagios-group=nagios --with- openssl=/usr/bin/openssl
--enable-perl-modules
# make
# make install&nbsp;
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->

Baixando
e Instalando o NDOutils.&nbsp;

wget&nbsp;http://prdownloads.sourceforge.net/sourceforge/nagios/ndoutils-1.4b9.tar.gz





Descompactando



# tar xvzf ndoutils-1.4b9.tar.gz







# ./configure --prefix=/usr/local/nagios/
--enable-mysql --disable-pgsql --with-ndo2db-user=nagios
--with-ndo2db-group=nagios&nbsp;









# make&nbsp;



Fazer o ndo2db rodar automaticamente:&nbsp;



# cp ./daemon-init /etc/init.d/ndo2db&nbsp;

# chmod +x /etc/init.d/ndo2db&nbsp;

# update-rc.d ndo2db defaults&nbsp;



Instalando o Centreon



Baixando o pacote de instalação

wget http://download.centreon.com/index.php?id=187



Descompactando



# tar xvzf centreon-2.3.9.tar.gz










Configurando e Instalando



# export
PATH="$PATH:/usr/local/nagios/bin/"
# ./install.sh -i&nbsp;









No termo abaixo, role a tela até o final do texto










<!--[endif]-->
Informe "y" para iniciar a instalação

Siga as informações abaixo:


------------------------------------------------------------------------

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Please choose what you want to install

------------------------------------------------------------------------



Do you want to install
: Centreon Web Front

[y/n], default to [n]:

&gt; y







Do you want to install
: Centreon CentCore

[y/n], default to [n]:

&gt; y



Do you want to install
: Centreon Nagios Plugins

[y/n], default to [n]:

&gt; y



Do you want to install
: Centreon Snmp Traps process

[y/n], default to [n]:

&gt; y



------------------------------------------------------------------------

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Start CentWeb Installation

------------------------------------------------------------------------



Where is your Centreon
directory?

default to
[/usr/local/centreon]

&gt; y

You select slash...



Where is your Centreon
directory?

default to
[/usr/local/centreon]

&gt; y

You select slash...



Where is your Centreon
directory?

default to
[/usr/local/centreon]

&gt; y

You select slash...



Where is your Centreon
directory?

default to
[/usr/local/centreon]





Where is your Centreon
directory?

default to
[/usr/local/centreon]

&gt;&nbsp;



Do you want me to
create this directory ? [/usr/local/centreon]

[y/n], default to [n]:

&gt; y



Where is your Centreon
log directory

default to
[/usr/local/centreon/log]

&gt;&nbsp;





Do you want me to
create this directory ? [/usr/local/centreon/log]

[y/n], default to [n]:

&gt;&nbsp;



Where is your Centreon
log directory

default to
[/usr/local/centreon/log]

&gt;&nbsp;



Do you want me to
create this directory ? [/usr/local/centreon/log]

[y/n], default to [n]:

&gt; y



Where is your Centreon
etc directory

default to
[/etc/centreon]

&gt; y





Where is your Centreon
etc directory

default to
[/etc/centreon]

&gt;&nbsp;



Do you want me to
create this directory ? [/etc/centreon]

[y/n], default to [n]:

&gt; y



Where is your Centreon
variable library directory?

default to
[/var/lib/centreon]

&gt;&nbsp;



Do you want me to
create this directory ? [/var/lib/centreon]

[y/n], default to [n]:

&gt; y



Where is your
CentPlugins Traps binary

default to
[/usr/local/centreon/bin]

&gt;&nbsp;



Do you want me to
create this directory ? [/usr/local/centreon/bin]

[y/n], default to [n]:

&gt; y





Where is the RRD perl
module installed [RRDs.pm]

default to
[/usr/lib/perl5/RRDs.pm]

&gt;&nbsp;



Where is PEAR
[PEAR.php]

default to
[/usr/share/php/PEAR.php]

&gt;&nbsp;



Where is installed
Nagios ?

default to
[/usr/local/nagios]

&gt;&nbsp;



Where is your nagios
config directory

default to [/usr/local/nagios/etc]

&gt;&nbsp;



Where is your Nagios
var directory ?

default to [/usr/local/nagios/var]

&gt;&nbsp;

Where is your Nagios
plugins (libexec) directory ?

default to
[/usr/local/nagios/libexec]

&gt;&nbsp;



Where is your Nagios
image directory ?

default to
[/usr/local/nagios/share/images/logos]

&gt;&nbsp;



Where is your NDO
ndomod binary ?

default to [/usr/sbin/ndomod.o]

&gt;&nbsp;

/usr/sbin/ndomod.o is
not a valid file.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CRITICAL



Para resolver o problema acima baixe o arquivo&nbsp; ndomod.o do link abaixo e salve no diretorio
/usr/sbin/ndomod.o

http://www.2shared.com/file/A0OTCNX2/ndomod.html



Where is sudo
configuration file

default to
[/etc/sudoers]

&gt;&nbsp;



Do you want me to
configure your sudo ? (WARNING)

[y/n], default to [n]:

&gt;&nbsp;



------------------------------------------------------------------------

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Configure Apache server

------------------------------------------------------------------------



Do you want to add
Centreon Apache sub configuration file ?

[y/n], default to [n]:

&gt;&nbsp;y

------------------------------------------------------------------------

Pear Modules

------------------------------------------------------------------------

Check PEAR modules



Do you want me to
install/upgrade your PEAR modules

[y/n], default to [y]:

&gt;&nbsp;



------------------------------------------------------------------------

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Centreon Post Install

------------------------------------------------------------------------

Create
/usr/local/centreon/www/install/install.conf.php&nbsp;&nbsp;&nbsp; OK

Create
/etc/centreon/instCentWeb.conf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OK



------------------------------------------------------------------------

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Start CentStorage Installation

------------------------------------------------------------------------



Where is your Centreon
Run Dir directory?

default to
[/var/run/centreon]



------------------------------------------------------------------------

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Start CentCore Installation

------------------------------------------------------------------------



Where is your CentCore
binary directory

default to
[/usr/local/centreon/bin]

&gt;&nbsp;



Do you want me to
install CentCore init script ?

[y/n], default to [n]:

&gt; y



Do you want me to
install CentCore run level ?

[y/n], default to [n]:

&gt; y



------------------------------------------------------------------------

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Start CentPlugins Installation

------------------------------------------------------------------------



Where is your
CentPlugins lib directory

default to
[/var/lib/centreon/centplugins]

&gt;&nbsp;



Do you want me to
create this directory ? [/var/lib/centreon/centplugins]

[y/n], default to [n]:

&gt; y



------------------------------------------------------------------------

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Start CentPlugins Traps Installation

------------------------------------------------------------------------



Where is your SNMP
configuration directory

default to [/etc/snmp]

&gt; y



Where is your SNMP
configuration directory

default to [/etc/snmp]

&gt;&nbsp;



Where is your SNMPTT
binaries directory

default to [/usr/local/centreon/bin/]

&gt;&nbsp;





Create
/etc/centreon/instCentPlugins.conf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OK

##########################################

#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;

#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Go to the URL :
http://zeus.int/centreon/&nbsp; &nbsp;

#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to finish the
setup&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;

#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Report bugs at
http://forge.centreon.com&nbsp;

#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;

#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks for using
Centreon.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;

#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-----------------------&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Contact :
infos@centreon.com&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;

#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
http://www.centreon.com&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;

#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
################################################



root@zeus:/home/nagios/centreon-2.3.9#



Configuração Centreon Browser










































Programa Demonstrativo



Acesse o site:&nbsp;https://demo.centreon.com/centreon/main.php



site:&nbsp;http://www.centreon.com/



Login de administrador do usuário: admin / Centreon