Question

Poller Errors -> Centreon 23.10


Badge +1

Hi guys

After installing a poller in version 23.10, I cannot start the centreontrapd service because of the following error, do you have any idea how to correct this?

 

2024-05-02 11:35:31 - ERROR - 1654796 - MySQL error: no such table: cfg_nagios (caller: centreon::script::centreontrapd:/usr/share/perl5/vendor_perl/centreon/script/centreontrapd.pm:1233)
Query: SELECT `command_file` FROM `cfg_nagios` WHERE `nagios_activate` = '1' LIMIT 1

 

OS : Redhat 8.8

cdt


4 replies

Userlevel 6
Badge +19

Hi @rachidkh on poller centreontrapd use a SQLite database.

You need to configure on your poller the /etc/centreon/centreontrapd.pm file:

our %centreontrapd_config = (
...
"centreon_db" => "dbname=/etc/snmp/centreon_traps/centreontrapd.sdb",
"centstorage_db" => "dbname=/etc/snmp/centreon_traps/centreontrapd.sdb",
"db_host" => "",
"db_user" => "",
"db_passwd" => "",
"db_type" => 'SQLite',
...
);

1;

Then restart centreontrapd process:

systemctl restart centreontrapd

Go to “Configuration > Services > SNMP Traps > Generate” menu, select your poller, click on export.

Badge +1

Hi laurent

Thanks,

 

My config is below : 

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_host" => "",
        "db_user" => "",
        "db_passwd" => "",
        "db_type" => 'SQLite',
        # server type (0: central, 1: poller)
        mode => 1
);

1;
 

but, the centreontrapd service does not start and I still get this error:

 

2024-05-03 15:02:25 - ERROR - 1312732 - MySQL error: no such table: cfg_nagios (caller: centreon::script::centreontrapd:/usr/share/perl5/vendor_perl/centreon/script/centreontrapd.pm:1233)
Query: SELECT `command_file` FROM `cfg_nagios` WHERE `nagios_activate` = '1' LIMIT 1
 

Regards

Userlevel 6
Badge +19

What is the content of /etc/centreon/conf.pm on your poller?

Badge +1

The content of this file  it’s empty

Reply