Skip to main content

Hi,

I’m trying to configure SNMP Traps on my Centreon servers, I have one Central and one Poller which are correctly working as active monitoring servers.

When I take a look at the config files:

  • Central (/etc/centreon/centreontrapd.pm)

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 => 0
        # spool directory
        spool_directory => '/var/spool/centreontrapd/',
);

1;

  • Central (/etc/centreon/conf.pm)

$centreon_config = {
       VarLib => "/var/lib/centreon",
       CentreonDir => "/usr/share/centreon/",
       CacheDir => "/var/cache/centreon/",
       "centreon_db" => "centreon",
       "centstorage_db" => "centreon_storage",
       "db_host" => "localhost:3306",
       "db_user" => "centreon",
       "db_passwd" => 'mypass'
};

# Central, Remote 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 = 'mypass';
$mysql_host = "localhost:3306";
$mysql_database_oreon = "centreon";
$mysql_database_ods = "centreon_storage";

1;

  • Poller (/etc/centreon/centreontrapd.pm)

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
        # spool directory
        spool_directory => '/var/spool/centreontrapd/',
);

1;

  • Poller (/etc/centreon/conf.pm)

nothing inside this file …

When I take a look at the documentation (https://docs.centreon.com/fr/docs/23.04/monitoring/passive-monitoring/enable-snmp-traps/), I’m not sure of what I have to modify for passive monitoring to work.

can somebody help me ?

Thanks.

Regards.

Hi,

I’ve the same problem! on Central server it works fine but in poller I can’t activate SNMP Traps

I solved it by copyng the corresponding centreontrapd.sdb from Central to poller

Example:

scp /etc/snmp/centreon_traps/35/centreontrapd.sdb root@192.168.102.111:/etc/snmp/centreon_traps/

 

I also installed sqlite3 on my poller

Example (Alma9 - EL9):

dnf install sqlite


Reply