Menu

Vsphere extension.

2021-05-20
2021-05-25
  • Jan van Niekerk

    Jan van Niekerk - 2021-05-20

    Dear developers and or fellow community members,

    While the ocs extension works perfectly in itop, i cant get the vsphere extension to populate itop.
    My setup: Synology DSM 6.2x Itop 2.7.4-7194, Esxi 6.5 server

    My cli debug :

    [2021-05-20 20:31:52]   [Info]  Detecting if TeemIp is installed on remote iTop server
    [2021-05-20 20:31:53]   [Info]  TeemIp is NOT installed
    [2021-05-20 20:31:53]   [Debug] OK, the required PHP version to run this application is 5.6.0. The current PHP version is 5.6.11.
    [2021-05-20 20:31:53]   [Debug] OK, the required extension 'simplexml' is installed (current version: 0.1 >= 0.1).
    [2021-05-20 20:31:53]   [Debug] OK, the required extension 'dom' is installed (current version: 20031129 >= 1.0).
    [2021-05-20 20:31:53]   [Debug] The following configuration files were loaded (in this order):
    
            1. /volume1/web/itop.test.nl/extensions/combodo-data-collector-for-vsphere/conf/params.distrib.xml
            2. /volume1/web/itop.test.nl/extensions/combodo-data-collector-for-vsphere/collectors/params.distrib.xml
            3. /volume1/web/itop.test.nl/extensions/combodo-data-collector-for-vsphere/conf/params.local.xml
    
    The resulting configuration is:
    
    <?xml version="1.0" encoding="UTF-8"?>
    <parameters>
      <itop_url>https://192.168.xxx.yyy/itop.test.nl</itop_url>
      <itop_login>my admin user account</itop_login>
      <itop_password>my password of itop</itop_password>
      <console_log_level>6</console_log_level>
      <console_log_dateformat>[Y-m-d H:i:s]</console_log_dateformat>
      <syslog_log_level>7</syslog_log_level>
      <data_path>%APPROOT%/data</data_path>
      <max_chunk_size>1000</max_chunk_size>
      <itop_synchro_timeout>20</itop_synchro_timeout>
      <stop_on_synchro_error>no</stop_on_synchro_error>
      <curl_options>
        <CURLOPT_SSL_VERIFYHOST>0</CURLOPT_SSL_VERIFYHOST>
        <CURLOPT_SSL_VERIFYPEER>0</CURLOPT_SSL_VERIFYPEER>
      </curl_options>
      <default_org_id>Demo</default_org_id>
      <vsphere_uri>192.168.xxx.yyy:443</vsphere_uri>
      <vsphere_login>my vshere admin account</vsphere_login>
      <vsphere_password>my vsphere admin password</vsphere_password>
      <vsphere_connection_options>
        <ssl>
          <verify_peer>0</verify_peer>
          <verify_peer_name>0</verify_peer_name>
          <allow_self_signed>1</allow_self_signed>
        </ssl>
      </vsphere_connection_options>
      <virtual_machine>
        <default_values>
          <org_id>Demo</org_id>
        </default_values>
      </virtual_machine>
      <os_family_mapping type="array">
        <item>/Ubuntu/Linux</item>
        <item>/RedHat/Linux</item>
        <item>/Debian/Linux</item>
        <item>/Linux/Linux</item>
        <item>/Windows/Windows</item>
        <item>/.*/Other</item>
      </os_family_mapping>
      <os_version_mapping type="array">
        <item>/.*/%1$s</item>
      </os_version_mapping>
      <brand_mapping type="array">
        <item>/IBM/IBM</item>
        <item>/Hewlett Packard/Hewlett-Packard</item>
        <item>/Hewlett-Packard/Hewlett-Packard</item>
        <item>/Dell/Dell</item>
        <item>/.*/%1$s</item>
      </brand_mapping>
      <model_mapping type="array">
        <item>/.*/%1$s</item>
      </model_mapping>
      <json_placeholders>
        <prefix>vSphereTest</prefix>
        <full_load_interval>20</full_load_interval>
        <synchro_status>production</synchro_status>
      </json_placeholders>
      <teemip_options>
        <collect_ips>no</collect_ips>
        <default_ip_status>allocated</default_ip_status>
        <manage_ipv6>no</manage_ipv6>
        <manage_logical_interfaces>no</manage_logical_interfaces>
      </teemip_options>
      <contact_to_notify>john.doe@demo.com</contact_to_notify>
      <synchro_user>admin</synchro_user>
    </parameters>
    
    PHP Warning:  array_key_exists() expects parameter 2 to be array, string given in /volume1/web/itop.test.nl/extensions/combodo-data-collector-for-vsphere/collectors/ConfigurableCollector.class.inc.php on line 36
    
    Warning: array_key_exists() expects parameter 2 to be array, string given in /volume1/web/itop.test.nl/extensions/combodo-data-collector-for-vsphere/collectors/ConfigurableCollector.class.inc.php on line 36
    PHP Warning:  array_key_exists() expects parameter 2 to be array, string given in /volume1/web/itop.test.nl/extensions/combodo-data-collector-for-vsphere/collectors/ConfigurableCollector.class.inc.php on line 36
    
    Warning: array_key_exists() expects parameter 2 to be array, string given in /volume1/web/itop.test.nl/extensions/combodo-data-collector-for-vsphere/collectors/ConfigurableCollector.class.inc.php on line 36
    PHP Warning:  array_key_exists() expects parameter 2 to be array, string given in /volume1/web/itop.test.nl/extensions/combodo-data-collector-for-vsphere/collectors/vSphereHypervisorCollector.class.inc.php on line 134
    
    Warning: array_key_exists() expects parameter 2 to be array, string given in /volume1/web/itop.test.nl/extensions/combodo-data-collector-for-vsphere/collectors/vSphereHypervisorCollector.class.inc.php on line 134
    [2021-05-20 20:31:53]   [Debug] Registered collectors:
    [2021-05-20 20:31:53]   [Debug] Collector: vSphereBrandCollector, version: 1.0.13
    [2021-05-20 20:31:53]   [Debug] Collector: vSphereModelCollector, version: 1.0.13
    [2021-05-20 20:31:53]   [Debug] Collector: vSphereOSFamilyCollector, version: 1.0.13
    [2021-05-20 20:31:53]   [Debug] Collector: vSphereOSVersionCollector, version: 1.0.13
    [2021-05-20 20:31:53]   [Debug] Collector: vSphereFarmCollector, version: 1.0.13
    [2021-05-20 20:31:53]   [Debug] Collector: vSphereServerCollector, version: 1.0.13
    [2021-05-20 20:31:53]   [Debug] Collector: vSphereHypervisorCollector, version: 1.0.13
    [2021-05-20 20:31:53]   [Debug] Collector: vSphereVirtualMachineCollector, version: 1.0.13
    [2021-05-20 20:31:53]   [Debug] iTop web services version: 1.2
    [2021-05-20 20:31:54]   [Warning]       Contact to notify (john.doe@demo.com) not found in iTop. Nobody will be notified of the results of the synchronization.
    [2021-05-20 20:31:54]   [Info]  Synchro User: 'admin' <my.email@foo.org> (1).
    [2021-05-20 20:31:54]   [Debug] Checking the configuration of the data source 'vSphereTest:Brand'...
    [2021-05-20 20:31:54]   [Debug] The configuration of the data source 'vSphereTest:Brand' looks correct.
    [2021-05-20 20:31:54]   [Debug] RestClient::Get SELECT SynchroAttribute WHERE attcode IN ('name') AND sync_source_id = 28
    [2021-05-20 20:31:54]   [Info]  Ok, the Synchro Data Source 'vSphereTest:Brand' exists in iTop and is up to date
    [2021-05-20 20:31:54]   [Debug] Checking the configuration of the data source 'vSphereTest:Model'...
    [2021-05-20 20:31:54]   [Debug] The configuration of the data source 'vSphereTest:Model' looks correct.
    [2021-05-20 20:31:54]   [Debug] RestClient::Get SELECT SynchroAttExtKey WHERE attcode IN ('brand_id') AND sync_source_id = 29
    [2021-05-20 20:31:55]   [Debug] RestClient::Get SELECT SynchroAttribute WHERE attcode IN ('name','type') AND sync_source_id = 29
    [2021-05-20 20:31:55]   [Info]  Ok, the Synchro Data Source 'vSphereTest:Model' exists in iTop and is up to date
    [2021-05-20 20:31:55]   [Debug] Checking the configuration of the data source 'vSphereTest:OSFamily'...
    [2021-05-20 20:31:55]   [Debug] The configuration of the data source 'vSphereTest:OSFamily' looks correct.
    [2021-05-20 20:31:55]   [Debug] RestClient::Get SELECT SynchroAttribute WHERE attcode IN ('name') AND sync_source_id = 30
    [2021-05-20 20:31:55]   [Info]  Ok, the Synchro Data Source 'vSphereTest:OSFamily' exists in iTop and is up to date
    [2021-05-20 20:31:55]   [Debug] Checking the configuration of the data source 'vSphereTest:OSVersion'...
    [2021-05-20 20:31:55]   [Debug] The configuration of the data source 'vSphereTest:OSVersion' looks correct.
    [2021-05-20 20:31:55]   [Debug] RestClient::Get SELECT SynchroAttribute WHERE attcode IN ('name') AND sync_source_id = 31
    [2021-05-20 20:31:56]   [Debug] RestClient::Get SELECT SynchroAttExtKey WHERE attcode IN ('osfamily_id') AND sync_source_id = 31
    [2021-05-20 20:31:56]   [Info]  Ok, the Synchro Data Source 'vSphereTest:OSVersion' exists in iTop and is up to date
    [2021-05-20 20:31:56]   [Debug] Checking the configuration of the data source 'vSphereTest:Farm'...
    [2021-05-20 20:31:56]   [Debug] The configuration of the data source 'vSphereTest:Farm' looks correct.
    [2021-05-20 20:31:56]   [Debug] RestClient::Get SELECT SynchroAttLinkSet WHERE attcode IN ('applicationsolution_list','contacts_list','documents_list','logicalvolumes_list','providercontracts_list','tickets_list') AND sync_source_id = 32
    [2021-05-20 20:31:56]   [Debug] RestClient::Get SELECT SynchroAttribute WHERE attcode IN ('business_criticity','description','move2production','name','redundancy','status') AND sync_source_id = 32
    [2021-05-20 20:31:56]   [Debug] RestClient::Get SELECT SynchroAttExtKey WHERE attcode IN ('org_id') AND sync_source_id = 32
    [2021-05-20 20:31:57]   [Debug] Comparison: Found the extra definition of the non-optional attribute 'redundancy' in iTop. Data sources differ.
    [2021-05-20 20:31:57]   [Info]  The Synchro Data Source definition for 'vSphereTest:Farm' must be updated in iTop.
    [2021-05-20 20:31:57]   [Debug] Updating attribute applicationsolution_list.
    [2021-05-20 20:31:57]   [Debug] Updating attribute contacts_list.
    [2021-05-20 20:31:57]   [Debug] Updating attribute documents_list.
    [2021-05-20 20:31:58]   [Debug] Updating attribute logicalvolumes_list.
    [2021-05-20 20:31:58]   [Debug] Updating attribute org_id.
    [2021-05-20 20:31:58]   [Info]  Skipping optional attribute providercontracts_list.
    [2021-05-20 20:31:58]   [Debug] Updating attribute tickets_list.
    PHP Warning:  array_key_exists() expects parameter 2 to be array, string given in /volume1/web/itop.test.nl/extensions/combodo-data-collector-for-vsphere/collectors/ConfigurableCollector.class.inc.php on line 36
    
    Warning: array_key_exists() expects parameter 2 to be array, string given in /volume1/web/itop.test.nl/extensions/combodo-data-collector-for-vsphere/collectors/ConfigurableCollector.class.inc.php on line 36
    [2021-05-20 20:31:58]   [Debug] Checking the configuration of the data source 'vSphereTest:Server'...
    [2021-05-20 20:31:58]   [Debug] The configuration of the data source 'vSphereTest:Server' looks correct.
    [2021-05-20 20:31:58]   [Debug] RestClient::Get SELECT SynchroAttLinkSet WHERE attcode IN ('applicationsolution_list','contacts_list','documents_list','logicalvolumes_list','networkdevice_list','providercontracts_list','san_list','tickets_list') AND sync_source_id = 33
    [2021-05-20 20:31:59]   [Debug] RestClient::Get SELECT SynchroAttribute WHERE attcode IN ('asset_number','business_criticity','cpu','description','end_of_warranty','managementip','move2production','name','nb_u','purchase_date','ram','serialnumber','status') AND sync_source_id = 33
    [2021-05-20 20:31:59]   [Debug] RestClient::Get SELECT SynchroAttExtKey WHERE attcode IN ('brand_id','enclosure_id','location_id','model_id','org_id','osfamily_id','oslicence_id','osversion_id','powerA_id','powerB_id','rack_id') AND sync_source_id = 33
    [2021-05-20 20:31:59]   [Debug] Comparison: ignoring the missing, but optional, attribute: 'services_list'.
    [2021-05-20 20:31:59]   [Info]  Ok, the Synchro Data Source 'vSphereTest:Server' exists in iTop and is up to date
    PHP Warning:  array_key_exists() expects parameter 2 to be array, string given in /volume1/web/itop.test.nl/extensions/combodo-data-collector-for-vsphere/collectors/ConfigurableCollector.class.inc.php on line 36
    
    Warning: array_key_exists() expects parameter 2 to be array, string given in /volume1/web/itop.test.nl/extensions/combodo-data-collector-for-vsphere/collectors/ConfigurableCollector.class.inc.php on line 36
    [2021-05-20 20:31:59]   [Debug] Checking the configuration of the data source 'vSphereTest:Hypervisor'...
    [2021-05-20 20:31:59]   [Debug] The configuration of the data source 'vSphereTest:Hypervisor' looks correct.
    [2021-05-20 20:31:59]   [Debug] RestClient::Get SELECT SynchroAttLinkSet WHERE attcode IN ('applicationsolution_list','contacts_list','documents_list','logicalvolumes_list','providercontracts_list','tickets_list') AND sync_source_id = 34
    [2021-05-20 20:31:59]   [Debug] RestClient::Get SELECT SynchroAttribute WHERE attcode IN ('business_criticity','description','move2production','name','status') AND sync_source_id = 34
    [2021-05-20 20:32:00]   [Debug] RestClient::Get SELECT SynchroAttExtKey WHERE attcode IN ('farm_id','org_id','server_id') AND sync_source_id = 34
    [2021-05-20 20:32:00]   [Info]  Ok, the Synchro Data Source 'vSphereTest:Hypervisor' exists in iTop and is up to date
    [2021-05-20 20:32:00]   [Debug] Checking the configuration of the data source 'vSphereTest:VirtualMachine'...
    [2021-05-20 20:32:00]   [Debug] The configuration of the data source 'vSphereTest:VirtualMachine' looks correct.
    [2021-05-20 20:32:00]   [Debug] RestClient::Get SELECT SynchroAttLinkSet WHERE attcode IN ('applicationsolution_list','contacts_list','documents_list','logicalvolumes_list','providercontracts_list','tickets_list') AND sync_source_id = 35
    [2021-05-20 20:32:00]   [Debug] RestClient::Get SELECT SynchroAttribute WHERE attcode IN ('business_criticity','cpu','description','managementip','move2production','name','ram','status') AND sync_source_id = 35
    [2021-05-20 20:32:00]   [Debug] RestClient::Get SELECT SynchroAttExtKey WHERE attcode IN ('org_id','osfamily_id','oslicence_id','osversion_id','virtualhost_id') AND sync_source_id = 35
    [2021-05-20 20:32:01]   [Debug] Comparison: ignoring the missing, but optional, attribute: 'services_list'.
    [2021-05-20 20:32:01]   [Info]  Ok, the Synchro Data Source 'vSphereTest:VirtualMachine' exists in iTop and is up to date
    [2021-05-20 20:32:01]   [Info]  vSphereBrandCollector beginning of data collection...
    [2021-05-20 20:32:01]   [Debug] vSphere connection options: Array
    (
        [ssl] => Array
            (
                [verify_peer] => 0
                [verify_peer_name] => 0
                [allow_self_signed] => 1
            )
    
    )
    
    [2021-05-20 20:32:01]   [Debug] Connection to https://192.168.xxx.yyy:443 Ok.
    

    The Ci's are being build, but not updatet with information from my esxi 6.5 server.
    Could you give me a hint to search for?

    Sincerly,
    Jan

     
  • Jan van Niekerk

    Jan van Niekerk - 2021-05-21

    After some more extensive searching(tried it under mamp), it seems to be the php version. Because with php version 5.6.4 everything works.

    Sincerly,
    Jan

     
  • Pierre Goiffon

    Pierre Goiffon - 2021-05-25

    Hello,
    Thanks for the report !
    What was versions for PHP, collector and iTop ?
    The PHP notice you had in your log seems to be related to depreciations in PHP 7.4 ?

     
  • Jan van Niekerk

    Jan van Niekerk - 2021-05-25

    Hello Pierre,

    Itop 2.7.4-7194, php 5.6.11, collector was latest version downloaded from Hub.
    With php 5.6.4 it worked, i now have everything populated!

    So, important to know when you got these errors, try to change your php version(seen this error in another discussion to, but was not solved).

    Sincerly,
    Jan

     
  • Pierre Goiffon

    Pierre Goiffon - 2021-05-25

    Ok thanks !

    Note that the latest PHP 5.6.* version is 5.6.40, and that this branch was discontinued in early 2019 : https://www.php.net/releases/#v5

    You may try to use a more recent PHP version ?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.