centreon / centreon-archived

Centreon is a network, system and application monitoring tool. Centreon is the only AIOps Platform Providing Holistic Visibility to Complex IT Workflows from Cloud to Edge.
https://www.centreon.com
GNU General Public License v2.0
574 stars 240 forks source link

Centreon trap on a poller doesn't start #9276

Closed mickael-decastro closed 3 years ago

mickael-decastro commented 3 years ago

BUG REPORT INFORMATION

Versions Centreon poller 20.10

$ rpm -qa | grep centreonn

centreon-plugin-Applications-Protocol-Http-20201006-142255.el7.centos.noarch
centreon-plugin-Hardware-Ups-Standard-Rfc1628-Snmp-20201006-142255.el7.centos.noarch
centreon-connector-perl-20.10.0-2.el7.centos.x86_64
centreon-plugin-Applications-Monitoring-Centreon-Database-20201006-142255.el7.centos.noarch
centreon-trap-20.10.1-9.el7.centos.noarch
centreon-gorgone-20.10.0-14.el7.centos.noarch
centreon-nrpe-plugin-2.15-4.el7.centos.x86_64
centreon-engine-extcommands-20.10.0-6.el7.centos.x86_64
centreon-plugin-Applications-Monitoring-Centreon-Map4-Jmx-20201006-142255.el7.centos.noarch
centreon-broker-storage-20.10.0-7.el7.centos.x86_64
centreon-gorgone-centreon-config-20.10.0-14.el7.centos.noarch
centreon-plugin-Network-Cisco-Standard-Snmp-20201006-142255.el7.centos.noarch
centreon-release-20.10-2.el7.centos.noarch
centreon-engine-daemon-20.10.0-6.el7.centos.x86_64
centreon-plugin-Applications-Protocol-Dns-20201006-142255.el7.centos.noarch
centreon-connector-20.10.0-2.el7.centos.x86_64
centreon-plugin-Network-Fortinet-Fortimanager-Snmp-20201006-142255.el7.centos.noarch
centreon-plugin-Applications-Monitoring-Centreon-Central-20201006-142255.el7.centos.noarch
centreon-perl-libs-20.10.1-9.el7.centos.noarch
centreon-broker-cbmod-20.10.0-7.el7.centos.x86_64
centreon-plugin-Operatingsystems-Windows-Snmp-20201006-142255.el7.centos.noarch
centreon-plugin-Operatingsystems-Linux-Snmp-20201006-142255.el7.centos.noarch
centreon-broker-20.10.0-7.el7.centos.x86_64
centreon-connector-ssh-20.10.0-2.el7.centos.x86_64
centreon-plugin-Applications-Protocol-Ftp-20201006-142255.el7.centos.noarch
centreon-plugin-Network-Firewalls-Fortinet-Fortigate-Snmp-20201006-142255.el7.centos.noarch
centreon-common-20.10.1-9.el7.centos.noarch
centreon-poller-centreon-engine-20.10.1-9.el7.centos.noarch
centreon-engine-20.10.0-6.el7.centos.x86_64
centreon-plugin-Applications-Protocol-Ldap-20201006-142255.el7.centos.noarch
centreon-broker-core-20.10.0-7.el7.centos.x86_64
centreon-plugin-Hardware-Printers-Generic-Snmp-20201006-142255.el7.centos.noarch
centreon-clib-20.10.0-2.el7.centos.x86_64
centreon-plugin-Applications-Databases-Mysql-20201006-142255.el7.centos.noarch
centreon-plugin-Applications-Monitoring-Centreon-Poller-20201006-142255.el7.centos.noarch

Operating System

CentOS 7

Description

Service centreontrapd doesn't start properly

Steps to Reproduce

Please describe precisely the steps to reproduce the encountered issue.

  1. I logged in poller server by ssh
  2. Run systemctl start centreontrapd

Describe the received result

I received an error on message log, service exited with status 255

Describe the expected result

Service centreontrapd should be start properly

Logs

tail -f /var/log/message

Dec  7 15:37:05 sap-spv-p03 systemd: Started Centreon Trapd Daemon is a Centreon program that manage traps.
Dec  7 15:37:05 sap-spv-p03 centreontrapd: /etc/centreon/conf.pm did not return a true value at /usr/share/perl5/vendor_perl/centreon/script.pm line 145.
Dec  7 15:37:05 sap-spv-p03 systemd: centreontrapd.service: main process exited, code=exited, status=255/n/a
Dec  7 15:37:05 sap-spv-p03 systemd: Unit centreontrapd.service entered failed state.
Dec  7 15:37:05 sap-spv-p03 systemd: centreontrapd.service failed.

Configuration

# cat /etc/centreon/centreontrapd.pm
#############################################
# File Added by Centreon
#
our %centreontrapd_config = (
        # databases credentials
        centreon_db => "dbname=/etc/snmp/centreon_traps/centreontrapd.sdb",
        centstorage_db => "dbname=/etc/snmp/centreon_traps/centreontrapd.sdb",
        db_type => 'SQLite',
        # server type (0: central, 1: poller)
        mode => 1
);

1;

/etc/centreon/conf.pm is empty.

alfredosilvestre-natixis commented 3 years ago

Hello,

It looks like you are missing the configuration on the conf.pm indeed, take a look at this issue with an example conf.pm file:

https://github.com/centreon/centreon/issues/7011

cgagnaire commented 3 years ago

Hi, Yes actually you can put a "1;" into the file: echo "1;" > /etc/centreon/conf.pm Valuable configuration is in the "/etc/centreon/centreontrapd.pm" file, which is correct.

Refs: MON-6760

cgagnaire commented 3 years ago

Duplicate of https://github.com/centreon/centreon/issues/8340