How to import LDAP users

This post is also available in: French

If your company has an LDAP directory, why not directly import users in Centreon rather than creating them manually?

Create a template of contact

Before you import users in Centreon, it is important to create first a template of contact to set default notification settings. This templatewill be applied to any imported user from the LDAP directory.

Go to Centreon menu « Configuration -> Users -> Contact Templates », click on « Add » and set following parameters:

  • Alias / Login: set name of template
  • Full Name: describe tempalte
  • Enable Notifications: choose to enable or not notification
  • Host Notification Options: define notification filters
  • Host Notification Period: define notification period
  • Notification Commands: define notification command
  • Service Notification Options: define notification filters
  • Service Notification Period: define notification period
  • Service Notification Commands: define notification command

2015-01-30_104457Click on “Save” button.


Configure LDAP access

The second step is to define the organization of the company in Centreon, which can have multiple domains in Centreon. Go to Centreon menu « Administration -> Options -> Options -> LDAP », click on « Add » and set the following parameters:


Valeur (exemple)


Configuration name Centreon local domain Define configuration name
Description My local Centreon domain Describe configuration
Enable LDAP authentification Yes
Store LDAP password No You can choose to store pasword in db but in plaintext
Auto import No See notice below
LDAP search size limit 60 Default value
LDAP search timeout 60 Default value
Contact template ldap_template Contact template create in first step
Use service DNS No Possibility to discover LDAP directory using DNS

Notice: The automatic import of users will retrieve all user information in the LDAP directory at the first connection. So it is not necessary to import users beforehand. If they are linked to an LDAP group allowed to connect to Centreon interface, the contact will be created in the first attempt to connect to the interface.

2015-01-30_112333Define LDAP directories to access to domain:

  • Host address: IP or DN;
  • Port: TCP port;
  • SSL: enable SSL encryption;
  • TLS: enable TLS encryption;

2015-01-30_112745Define user settings allowed to read information from the directory and the type of directory: Posix or as Active Directory, it allows to pre-fill the search fields:

2015-01-30_113006Click on « Save » to save settings.


Import contacts

Once parameters are defined, go to Centreon menu « Administration -> Options -> Options -> LDAP » to import contacts. Edit directory and click on « Import users manually » button:

2015-01-30_113306You access to import page. Select directory and click on « Search »:


The result appears and you can select contacts to import. Click on “Import” button to import them into Centreon:

2015-01-30_113645Your contacts are now imported:


To go further

If the result is empty, please check directory settings. You can debug to determine location of issu. To enable debug please access to  « Administration -> Options -> Options -> Debug » menu:

2015-01-30_113952The « /var/log/centreon/ldapsearch.log » will contain debug information.

Incoming search terms:


One thought on “How to import LDAP users

  1. Pingback: Auto import LDAP users | Blog Centreon

Leave a Reply