[LDAP] - Configuration with CLAPI

  • 22 June 2023
  • 7 replies

Userlevel 1
Badge +7


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:



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

[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:


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


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

7 replies

Userlevel 5
Badge +17

@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.

Userlevel 1
Badge +7


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.”

Userlevel 5
Badge +17

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

Userlevel 1
Badge +7

Ok thank you.

Userlevel 1
Badge +7

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

Thank you

Userlevel 1
Badge +7

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 ?