Powered By Blogger

Translate

quinta-feira, 30 de agosto de 2012

Centreon



 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  

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 
# usermod -L nagios 

Criando o Grupo de usuário para comandos externos e associando ao usuário nágios
# groupadd nagcmd 
# usermod -G nagios,nagcmd nagios 
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/


Salvando em: nagios-3.2.3.tar.gzâ 100%[=================>] 3249447      602K/s   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 


# cd nagios-3.2.3






Configurando e Instalando

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



Baixando os Plugins do Nagios




# 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 


Baixando e Instalando o NDOutils. 

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 


# make 

Fazer o ndo2db rodar automaticamente: 

# cp ./daemon-init /etc/init.d/ndo2db 
# chmod +x /etc/init.d/ndo2db 
# update-rc.d ndo2db defaults 

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 


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





Informe "y" para iniciar a instalação

Siga as informações abaixo:

------------------------------------------------------------------------
        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]
> y
You select slash...

Where is your Centreon directory?
default to [/usr/local/centreon]
> y
You select slash...

Where is your Centreon directory?
default to [/usr/local/centreon]
> y
You select slash...

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


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

Do you want me to create this directory ? [/usr/local/centreon]
[y/n], default to [n]:
> y

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

Do you want me to create this directory ? [/usr/local/centreon/log]
[y/n], default to [n]:
> 

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

Do you want me to create this directory ? [/usr/local/centreon/log]
[y/n], default to [n]:
> y

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


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

Do you want me to create this directory ? [/etc/centreon]
[y/n], default to [n]:
> y

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

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

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

Do you want me to create this directory ? [/usr/local/centreon/bin]
[y/n], default to [n]:
> y


Where is the RRD perl module installed [RRDs.pm]
default to [/usr/lib/perl5/RRDs.pm]
> 

Where is PEAR [PEAR.php]
default to [/usr/share/php/PEAR.php]
> 

Where is installed Nagios ?
default to [/usr/local/nagios]
> 

Where is your nagios config directory
default to [/usr/local/nagios/etc]
> 

Where is your Nagios var directory ?
default to [/usr/local/nagios/var]
> 
Where is your Nagios plugins (libexec) directory ?
default to [/usr/local/nagios/libexec]
> 

Where is your Nagios image directory ?
default to [/usr/local/nagios/share/images/logos]
> 

Where is your NDO ndomod binary ?
default to [/usr/sbin/ndomod.o]
/usr/sbin/ndomod.o is not a valid file.                    CRITICAL

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

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

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

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

Do you want to add Centreon Apache sub configuration file ?
[y/n], default to [n]:
> y
------------------------------------------------------------------------
Pear Modules
------------------------------------------------------------------------
Check PEAR modules

Do you want me to install/upgrade your PEAR modules
[y/n], default to [y]:
> 

------------------------------------------------------------------------
                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]

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

Where is your CentCore binary directory
default to [/usr/local/centreon/bin]
> 

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

Do you want me to install CentCore run level ?
[y/n], default to [n]:
> y

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

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

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

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

Where is your SNMPTT binaries directory
default to [/usr/local/centreon/bin/]
> 

Create /etc/centreon/instCentPlugins.conf                  OK
##########################################
#                                                                                
#                 Go to the URL : http://zeus.int/centreon/   
#                            to finish the setup                          
#                                                                                
#                  Report bugs at http://forge.centreon.com 
#                                                                                
#                         Thanks for using Centreon.              
#                          -----------------------                   
#                        Contact : infos@centreon.com          
#                          http://www.centreon.com                
#                                                                                
################################################

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

Configuração Centreon Browser













Programa Demonstrativo



Login de administrador do usuário: admin / Centreon