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