Skip to main content

Hello,

We have completely automated the installation and configuration of Centreon with clapi or curl request , but we are encountering a problem.

When we configure the ldap settings, we import a file:

LDAP;ADD;Name;IPA LDAP;
LDAP;SETPARAM;Name;enable;1;
LDAP;ADDSERVER;Name;ldap_server1;389;0;1;
LDAP;ADDSERVER;Name;ldap_server2;389;0;1;
LDAP;SETPARAM;Name;alias;uid;

[...]

But in 23.04, this way of doing things cannot work, because in clapi, the parameters “ldap_auto_sync” and “ldap_sync_interval” don’t exist.

/root@server tmp]# centreon -u admin -p 'password' -i ldap.txt
Line 1 : Unknown parameter

/root@server tmp]# cat ldap.txt
LDAP;SETPARAM;Name;ldap_auto_sync;1;

/root@server tmp]# centreon -u admin -p 'password' -o LDAP -a SETPARAM -v "Name;ldap_auto_sync;1"
Unknown parameter

 

On the GUI, we can see the option:

“Enable LDAP synchronization on login: yes”

“LDAP synchronization interval (in hours): 1”

But in fact, these options are not enabled because:

We have log error in Centreon Central:

/var/log/php-fpm/centreon-error.log:

WARNING: Warning: Undefined array key "ldap_auto_sync" {"exception":"yobject] (ErrorException(code: 0): Warning: Undefined array key \"ldap_auto_sync\" at /usr/share/centreon/www/class/centreonLDAP.class.php:984)"}

/var/log/centreon/ldap.conf:

LDAP AUTH : Synchronization was skipped. For more details, check your LDAP parameters in Administration

 

If we search in the database:

MariaDB :centreon]> select * from auth_ressource_info where ari_name like "ldap_auto_sync";

The result is empty.

 

We are obliged to pass the option “Enable LDAP synchronization on login” to no, then to yes so that the fields “ldap_auto_sync” and “ldap_sync_interval” of the database are created.

Can you add the options “ldap_auto_sync” and “ldap_sync_interval” in the clap commands?

Thank you

@Cyril_31 this looks more like a bug than an idea. If you have a support contract, please file a ticket for this. If not, you always have the option of fixing this by yourself through a github PR if this is urgent.


Hello,

I had opened a ticket, but as the options are not present, I was told to submit the idea on the forum.

 

Regarding ldap_auto_sync and ldap_sync_interval, a new feature request should be made. You can post an idea on The Watch, in the "IDEAS" category so that your request is supported.”


I see, sorry about that, we’ll get this sorted out and filed as a bug.


Ok thank you.


Hello, do you have a date (month) when the correction will be available please?

Thank you


Hello, do you have an idea of ​​a resolution date for this problem?


Is it ported to 22.10 ? If this is the case, which exact version ?


Reply