iTop 3.0 – Extensão: LDAP Data Collector 1.2.7 – Configuração

Tutorial – iTOP Installation on Ubuntu Linux – Learn How to Install in 5 Minutes (techexpert.tips)

No arquivo de configuração vamos especificar as opções referentes a conexão ao iTop e também referente ao nosso ActiveDirectory.

Sincronização: /var/www/html/itop/extensions/ldap-data-collection/syncro.sh

Arquivo de Configuração: /var/www/html/itop/extensions/ldap-data-collector/collectors/params.local.xml

Person

User

Para executar a sincronização execute o seguinte comando:

Ele vai realizar a criação de duas Synchro Data Sources:

Synchro LDAP Person:

Synchro User LDAP:

Funcionamento:

/var/www/html/itop/extensions/ldap-data-collector/data-iTopPersonLDAPCollector-1.csv

Could not find [unique] object for ‘contactid’: searched on email = ‘test@mydomain.com’

iTop – IT Service Management & CMDB / Discussion / Installing and using iTop: Synchro LDAP Person | Synchro User LDAP (sourceforge.net)

Vamos realizar as primeiras modificações em nosso arquivo de configuração. Ele é chamado de params.local.xml e vai ficar localizado na pasta /var/www/html/itop/extensions/ldap-data-collector/conf. Vamos primeiro criar este nosso arquivo com o seguinte comando:

nano /var/www/html/itop/extensions/ldap-data-collector/conf/params.local.xml

Vamos jogar o seguinte conteúdo:

<?xml version="1.0" encoding="UTF-8"?>
<!-- conf/params.local.xml - your specific configuration parameters -->
<parameters>
  <itop_url>http://localhost/</itop_url>
  <itop_login>admin</itop_login>
  <itop_password>admin</itop_password>
  <contact_to_notify>john.doe@demo.com</contact_to_notify>
  <synchro_user>admin</synchro_user>
  <ldapuri>ldap://localhost:389</ldaphost>
  <ldapdn>DC=company,DC=com</ldapdn>
  <ldaplogin>CN=ITOP-LDAP,DC=company,DC=com</ldaplogin>
  <ldappassword>password</ldappassword>
  <page_size>1000</page_size>
  <!--
    Set a non empty (and unique) prefix if you run several instances of the collector against the same iTop Server
    This is the recommended method to collect data from several LDAP servers. (assign a unique prefix to each "source" LDAP server)
    Note: this prefix can be set but do not touch the one inside json_placeholders
    -->
  <prefix></prefix>
  <json_placeholders>
    <full_load_interval>604800</full_load_interval><!-- 7 days (in seconds): 7*24*60*60 -->
    <users_target_class>UserLDAP</users_target_class>
    <synchro_status>production</synchro_status>
  </json_placeholders>
</parameters>

Vamos ajustar para refletir o nosso ambiente, primeiro a parte referente a conexão com o nosso iTop:

<?xml version="1.0" encoding="UTF-8"?>
<!-- conf/params.local.xml - your specific configuration parameters -->
<parameters>
  <itop_url>http://localhost/itop</itop_url>
  <itop_login>itop-ldap-data-collector</itop_login>
  <itop_password>itop-ldap-data-collector#R6</itop_password>
  <contact_to_notify>john.doe@demo.com</contact_to_notify>
  <synchro_user>itop-ldap-data-collector</synchro_user>
  <ldaphost>ldap://localhost:389</ldaphost>
  <ldapdn>DC=company,DC=com</ldapdn>
  <ldaplogin>CN=ITOP-LDAP,DC=company,DC=com</ldaplogin>
  <ldappassword>password</ldappassword>
  <page_size>1000</page_size>
  <!--
    Set a non empty (and unique) prefix if you run several instances of the collector against the same iTop Server
    This is the recommended method to collect data from several LDAP servers. (assign a unique prefix to each "source" LDAP server)
    Note: this prefix can be set but do not touch the one inside json_placeholders
    -->
  <prefix></prefix>
  <json_placeholders>
    <full_load_interval>604800</full_load_interval><!-- 7 days (in seconds): 7*24*60*60 -->
    <users_target_class>UserLDAP</users_target_class>
    <synchro_status>production</synchro_status>
  </json_placeholders>
</parameters>

Agora vamos para a parte referente a conexão com o nosso ActiveDirectory:

<?xml version="1.0" encoding="UTF-8"?>
<!-- conf/params.local.xml - your specific configuration parameters -->
<parameters>
  <itop_url>http://localhost/itop</itop_url>
  <itop_login>itop-ldap-data-collector</itop_login>
  <itop_password>itop-ldap-data-collector#R6</itop_password>
  <contact_to_notify>john.doe@demo.com</contact_to_notify>
  <synchro_user>itop-ldap-data-collector</synchro_user>
  <ldaphost>ldap://192.168.0.200:389</ldaphost>
  <ldapdn>DC=paulo,DC=santana</ldapdn>
  <ldaplogin>CN=svc-itop,OU=Usuarios,OU=DF,OU=Localidades,DC=paulo,DC=santana</ldaplogin>
  <ldappassword>pwwdf3#6</ldappassword>
  <page_size>1000</page_size>
  <!--
    Set a non empty (and unique) prefix if you run several instances of the collector against the same iTop Server
    This is the recommended method to collect data from several LDAP servers. (assign a unique prefix to each "source" LDAP server)
    Note: this prefix can be set but do not touch the one inside json_placeholders
    -->
  <prefix></prefix>
  <json_placeholders>
    <full_load_interval>604800</full_load_interval><!-- 7 days (in seconds): 7*24*60*60 -->
    <users_target_class>UserLDAP</users_target_class>
    <synchro_status>production</synchro_status>
  </json_placeholders>
</parameters>

php toolkit/testconnection.php

Agora vamos testar a comunicação com o ActiveDirectory:

php collectors/bin/ldap-test.php

Translate »