1)install repo wget http://yum.centreon.com/standard/3.0/stable/ces-standard.repo -O /etc/yum.repos.d/ces-standard.repo Edit to gpgcheck=0 2) disabled SELINUX /etc/sysconfig/selinux reboot 3) install Centreon Engine yum install centreon-base-config-centreon-engine centreon 4) install poller yum install centreon-poller-centreon-engine 5) Base configuration of a poller Commands: If you don’t have any private SSH keys on the central server for the Centreon user: $ su – centreon $ ssh-keygen -t rsa Copy this key on the collector: $ ssh-copy-id centreon@your_poller_ip Pag 2 (http://documentation.centreon.com/docs/centreon/en/2.5.x/installation/from_sources.html) 6) install 32-bit system: SAIR DO USUÁRIO CENTREON (usar o root) e ficar na pasta central do linux (cd) $ wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm $ wget http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt 7) Edit RPM-GPG-KEY.dag.txt deixando no inicio “—–BEGIN PGP PUBLIC KEY BLOCK—–” 8)comando 32-bit: $ rpm –import RPM-GPG-KEY.dag.txt $ rpm -Uvh rpmforge-release-0.5.1-1.el5.rf.i386.rpm 64-bit: $ rpm –import RPM-GPG-KEY.dag.txt $ rpm -Uvh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm 9) Install pre-req $ yum update $ yum upgrade $ yum install httpd gd fontconfig-devel libjpeg-devel libpng-devel gd-devel perl-GD \ openssl-devel perl-DBD-MySQL mysql-server mysql-devel php php-mysql php-gd php-ldap php-xml php-mbstring \ perl-Config-IniFiles perl-DBI perl-DBD-MySQL rrdtool perl-rrdtool perl-Crypt-DES perl-Digest-SHA1 \ perl-Digest-HMAC net-snmp-utils perl-Socket6 perl-IO-Socket-INET6 net-snmp net-snmp-libs php-snmp \ dmidecode lm_sensors perl-Net-SNMP net-snmp-perl fping cpp gcc gcc-c++ libstdc++ glib2-devel \ php-pear 10) config apache $ usermod -U apache $ pear channel-update pear.php.net 11) configurar proxy (USE ip) pear config-set http_proxy http://10.10.35.10:8080 Monitoring engine Link Centreon Engine (http://documentation.centreon.com/docs/centreon-engine/en/latest/installation/index.html#user-installation-using-sources) 12)Prerequisites $ groupadd centreon-engine $ useradd -g centreon-engine -m -r -d /var/lib/centreon-engine centreon-engine 13)Install basic compilation tools yum install gcc gcc-c++ make 14) Install Merethis repository link doc –> http://documentation.centreon.com/docs/centreon-clib/en/latest/installation/index.html#centreon-clib-install 15) Prerequisites $ wget http://yum.centreon.com/standard/2.2/ces-standard.repo -O /etc/yum.repos.d/ces-standard.repo yum clean all 16) install yum install centreon-clib centreon-clib-devel yum install gcc gcc-c++ make yum install cmake 20) Build git clone http://git.centreon.com/centreon-clib yum install zlib-devel openssl-devel xerces-c-devel yum install gsoap gsoap-devel nesta etapa ignorar o item 2 abaixo pois já realizamos nos itens anteriores 2. Install Centreon Clib See the Centreon Clib documentation. *23) Install optional tools zypper install zlib1g-dev libssl-dev libxerces-c-dev Não realizei a instalação por nao ter o pacote instalado e nao ter achado na biblioteca Stream Multiplexer Centreon Broker -(http://documentation.centreon.com/docs/centreon-broker/en/latest/installation/index.html#user-installation-using-sources) 24) Prerequisites groupadd centreon-broker useradd -g centreon-broker -m -r -d /var/lib/centreon-broker centreon-broker yum install gcc gcc-c++ make yum install rrdtool-devel yum install qt4-devel qt4-mysql yum install gnutls-devel 30)BUILD git clone http://git.centreon.com/centreon-broker.git END erro do usuário centreon no mysql não consegue realizar o forced check, devemos realizar as configurações abaixo (shedule immediate check (force)) entrar no conf.pm do centreon vi /etc/centreon/conf.pm e colar o codigo abaixo Caso esteja conforme abaixo e mesmo assim o forced check não esteja funcionando, devemos verificar se o serviço centcore está funcionando corretamente. Caso exista um pid e ele não esteja rodando devemos dar um kill neste processo e realizar o restart no serviço. Restartar os serviçoes cbd, httpd e centengine. ############################################# # File Added by Centreon # $centreon_config = { VarLib => “/var/lib/centreon/”, CentreonDir => “/usr/share/centreon/”, “centreon_db” => “centreon”, “centstorage_db” => “centreon_storage”, “db_host” => “localhost:3306”, “db_user” => “centreon”, “db_passwd” => “123” }; # Central or Poller ? $instance_mode = “central”; # Centreon Centcore Command File $cmdFile = “/var/lib/centreon/centcore.cmd”; # Deprecated format of Config file. $mysql_user = “centreon”; $mysql_passwd = “123”; $mysql_host = “localhost:3306”; $mysql_database_oreon = “centreon”; $mysql_database_ods = “centreon_storage”; 1; Verificar se o arquivo /etc/sudoers.d/centreon está com a permissão para o root e com as configurações abaixo. ## BEGIN: CENTREON SUDO #Add by CENTREON installation script User_Alias CENTREON=apache,nagios,centreon,centreon-engine,centreon-broker Defaults:CENTREON !requiretty # Snmptt Restart CENTREON ALL = NOPASSWD: /etc/init.d/snmptt restart # Snmptrapd Restart CENTREON ALL = NOPASSWD: /etc/init.d/snmptrapd restart ## Centreontrapd Restart CENTREON ALL = NOPASSWD: /etc/init.d/centreontrapd restart ## Centreontrapd Reload CENTREON ALL = NOPASSWD: /etc/init.d/centreontrapd reload ## Centreontrapd Stop CENTREON ALL = NOPASSWD: /etc/init.d/centreontrapd stop ## Centreontrapd Start CENTREON ALL = NOPASSWD: /etc/init.d/centreontrapd start # Centengine Restart CENTREON ALL = NOPASSWD: /etc/init.d/centengine restart # Centengine stop CENTREON ALL = NOPASSWD: /etc/init.d/centengine start # Centengine stop CENTREON ALL = NOPASSWD: /etc/init.d/centengine stop # Centengine reload CENTREON ALL = NOPASSWD: /etc/init.d/centengine reload # Test config CENTREON ALL = NOPASSWD: /usr/sbin/centengine -v * # Centengine optim test CENTREON ALL = NOPASSWD: /usr/sbin/centengine -s * # Broker Central restart CENTREON ALL = NOPASSWD: /etc/init.d/cbd restart # Broker Central reload CENTREON ALL = NOPASSWD: /etc/init.d/cbd reload # Broker Central start CENTREON ALL = NOPASSWD: /etc/init.d/cbd start # Broker Central stop CENTREON ALL = NOPASSWD: /etc/init.d/cbd stop ## END: CENTREON SUDO hosts em pending realizar a mudança do serviço pois o check_ping nao está funcionando primeiro ir no host e verificar qual template ele está utilizando depois vc deverá ir em config — hosts — template e configurar o template corretamente, aplicando o check period e check command depois deverá veridicar o check command em config — commands e verificar o check que foi colocado no seu template pronto perl ln -s /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/ /usr/local/lib64/perl5 APENDIX ( TROUBLESHOOTING ) Troubleshooting Centreon Import not showing Stop services BD centreon UPDATE service SET service_register = ‘1’ WHERE service_register = “” Plugins nao rodam ./check_centreon_snmp_loadaverage ERROR: Could not load the Perl module ‘Config::IniFiles’ Can’t locate List/MoreUtils.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/share/perl5/vendor_perl/Config/IniFiles.pm line 14. BEGIN failed–compilation aborted at /usr/share/perl5/vendor_perl/Config/IniFiles.pm line 14. Compilation failed in require at (eval 6) line 1. [root@infomon libexec]# more /usr/share/perl5/vendor_perl/Config/IniFiles.pm
SOLUCAO:
1) Acertar path do perl:
ln -s /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/ /usr/local/lib64/perl5
2) Reinstallar o module List::MoreUtils e dependencias:
wget http://search.cpan.org/CPAN/authors/id/T/TO/TOBYINK/Exporter-Tiny-0.042.tar.gz
wget http://search.cpan.org/CPAN/authors/id/E/EX/EXODIST/Test-Simple-1.001014.tar.gz
wget http://search.cpan.org/CPAN/authors/id/R/RE/REHSACK/List-MoreUtils-0.413.tar.gz
*install sempre com:
tar -zxvf
cd
perl Makefile.PL
make
make install
ERROR:
/usr/share/centreon/bin/centstorage
/usr/bin/perl: symbol lookup error: /usr/local/lib64/perl5/auto/DBI/DBI.so: undefined symbol: Perl_Tstack_sp_ptr
SOLUCAO:
wget http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.634.tar.gz
*INSTALL
/usr/share/centreon/bin/centstorage
2015-08-19 16:08:55 – Can’t find extra config file /etc/centreon/centstorage.pm
/usr/bin/perl: symbol lookup error: /usr/local/lib64/perl5/auto/DBD/mysql/mysql.so: undefined symbol: Perl_Tstack_sp_ptr
SOLUCAO:
wget http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.032.tar.gz
*INSTALL
ERROR:
# su – centreon -c ‘/usr/lib/nagios/plugins/check_nclient -h riolf379 -c check_fs’
Can’t locate Crypt/TripleDES.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/lib/nagios/plugins/check_nclient line 7.
BEGIN failed–compilation aborted at /usr/lib/nagios/plugins/check_nclient line 7.
SOLUCAO:
chmod 755 -R /usr/local/share/perl5
TO START CENTSTORAGE CMD
/usr/share/centreon/bin/centstorage –logfile=/var/log/centreon/centstorage.log –severity=error –config=/etc/centreon/conf.pm
Centreon Broker Troubleshooting
ERROR:
service cbd start
As vezes nao inicia corretamante
Rodar manualmente
Diagnositc:
/usr/sbin/cbd -D /etc/centreon-broker/.xml
Debug:
/usr/sbin/cbd -d /etc/centreon-broker/.xml
SOLUCAO:
Verificar se o /etc/centreon-broker/master.run (nao existe na interface grafica) aponta para o mesmo nome do que esta no /etc/centreon-broker/
Exemplo:
# daemon_name daemon_config running reload
#central-rrd central-rrd.xml y y
#central-broker central-broker.xml y y
globo-com-module globo-com-module.xml y y
ERROR:
[1444860411] [7228] Centreon Broker: config parser: could not open file ‘/etc/centreon-broker/central-module.xml’: No such file or directory
SOLUCAO:
editar /etc/centreon-engine/centengine.cfg
Fazer a config via GUI Configuraion > Centreon Engine > Main > Data
ERROR:
Centreon Broker: log: could not open file ‘/var/log/centreon-broker/globo-com-module-master.log’: Permission denied
[1444918678] [27333] Error: Could not load module ‘/usr/lib64/nagios/cbmod.so’: Function nebmodule_init returned an error
SOLUCAO:
Acertar permissao do ‘/var/log/centreon-broker/globo-com-module-master.log
Problema rioifgvmon nao sobe o centcore, error ao conectar na BD
[root@rioifgvmon ~]# mysql -u centreon -h infomon -p65756765a
ERROR 1045 (28000): Access denied for user ‘centreon’@’10.5.54.1’ (using password: YES)
Liberando acesso via https://infomon.ogmaster.local/adminer/adminer.php
GRANT ALL PRIVILEGES ON centreon.* TO ‘centreon’@’%’;
FLUSH PRIVILEGES;
Fazer testes usando linha de comando mysql client, ex:
mysql -u centreon -h infomon -pwsN231233Yz8sdfaB6fa centreon
Apos remover a maioria de usuarios referentes ao centreon, e criar um novo funcionou!
Problema de conexão entre Central e Poller
Causado pela entrada no hosts.deny do Central.
Seguir passo a passo a docuemntacao e validar que a comunicacao via SSH funciona com chave para a conta centreon
https://documentation.centreon.com/docs/centreon/en/2.5.x/user/configuration/10poller/02configuration.html
Verificar sempre que o centreon-engine inicia com sucesso!
1452023065] [2458] Centreon Broker: log applier: applying 1 logging objects
[1452023065] [2458] Centreon Broker: log: could not open file ‘/var/log/centreon-broker/globo-com-module-master.log’: Permission denied
[1452023065] [2458] Error: Could not load module ‘/usr/lib64/nagios/cbmod.so’: Function nebmodule_init returned an error
[1452023065] [2458] Centreon Engine 1.4.15 starting … (PID=2458)
Apos acerta a permissão do arquivo normalizou