User Tools

Site Tools


extensions:vsphere-data-collector

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
extensions:vsphere-data-collector [2019/11/18 16:34]
vdumas
extensions:vsphere-data-collector [2020/04/15 14:18] (current)
Line 4: Line 4:
 description_wiki : Collector for vSphere data synchronization in iTop CMDB (VM, Hypervisor, Cluster) description_wiki : Collector for vSphere data synchronization in iTop CMDB (VM, Hypervisor, Cluster)
 index_hidden ​    : yes index_hidden ​    : yes
-version ​         : 1.0.11 +version ​         : 1.0.12 
-release_dt ​      : ​2018-12-31+release_dt ​      : ​2020-04-02
 itop-version-min :  itop-version-min : 
 download_hidden ​ : http://​www.combodo.com/​itop-extensions/​vsphere-data-collector-1.0.11-413.zip download_hidden ​ : http://​www.combodo.com/​itop-extensions/​vsphere-data-collector-1.0.11-413.zip
Line 13: Line 13:
 alias-code_hidden : vsphere-data-collector alias-code_hidden : vsphere-data-collector
 alternate-name ​  : vSphere Data Collector alternate-name ​  : vSphere Data Collector
-module-lists_hidden : itop-data-collector-base/​1.0.13,​ itop-data-collector-vsphere/​1.0.11+module-lists_hidden : itop-data-collector-base/​1.0.13,​ itop-data-collector-vsphere/​1.0.13
 diffusion ​       : iTop Hub diffusion ​       : iTop Hub
 ---- ----
Line 31: Line 31:
   * The collector can reside on any system with web access to both vSphere Web Services and iTop.   * The collector can reside on any system with web access to both vSphere Web Services and iTop.
   * Automatic creation and update of the Synchronization Data Sources in iTop.   * Automatic creation and update of the Synchronization Data Sources in iTop.
 +  * Starting with version 1.0.12 the collection mechanism is somehow extensible
  
  
Line 38: Line 38:
 ===== Revision History ===== ===== Revision History =====
 ^  Release Date  ^  Version ​ ^  Comments ​ ^ ^  Release Date  ^  Version ​ ^  Comments ​ ^
-|  ​2019-xx-xx  ​| ​ 1.0.12 | - Fix for a crash caused by a blank datastore name (thanks to David Wißen from ITOMIG for reporting it).\\ ​ - Fix for some OpenVM Tools reporting IP addresses with a trailing space (thanks to Martin Raenker from ITOMIG).|+|  ​2020-04-02  ​| ​ 1.0.12 | - Made the Server and Hypervisor collectors configurable\\ ​- Fix for a crash caused by a blank datastore name (thanks to David Wißen from ITOMIG for reporting it).\\ ​ - Fix for some OpenVM Tools reporting IP addresses with a trailing space (thanks to Martin Raenker from ITOMIG).|
 |  2018-12-31 ​ |  1.0.11 | Corrects regression introduced by 1.0.10 :\\ * Improved support of iTop 2.4+ (obsolescence flag)\\ * Removed a debug trace\\ * Fix Virtual machines which "​connectionState"​ is not "​connected"​ are skipped\\ | |  2018-12-31 ​ |  1.0.11 | Corrects regression introduced by 1.0.10 :\\ * Improved support of iTop 2.4+ (obsolescence flag)\\ * Removed a debug trace\\ * Fix Virtual machines which "​connectionState"​ is not "​connected"​ are skipped\\ |
-|  2018-08-24 ​ |  1.0.10 | Handles TeemIp :\\ - Automatically detects if TeemIp (as an iTop module or as a standalone application) is present.\\ - Optional synchronization of IPv4 addresses\\ - Optional synchronisation of logical interfaces |+|  2018-08-24 ​ |  1.0.10 | Handles TeemIp :\\ - Automatically detects if TeemIp (as an iTop module or as a standalone application) is present.\\ - Optional synchronization of IPv4 addresses\\ - Optional synchronisation of logical interfaces |
 |  2018-07-02 ​ |  1.0.9  | Robustness :\\ - more traces in debug mode (--console_log_level=9)\\ - skipping virtual machines which "​connectionState"​ is not "​connected",​ since most of their properties are not accessible and would crash PHP/Soap (with a core dump !!) | |  2018-07-02 ​ |  1.0.9  | Robustness :\\ - more traces in debug mode (--console_log_level=9)\\ - skipping virtual machines which "​connectionState"​ is not "​connected",​ since most of their properties are not accessible and would crash PHP/Soap (with a core dump !!) |
 |  2018-02-22 ​ |  1.0.8  | The ''​os_version_mapping''​ was used only for Hypervisors,​ made it work for VirtualMachines also.\\ Proper support of UTF-8 characters in regular expressions (the code now always uses the ''​u''​ modifier) | |  2018-02-22 ​ |  1.0.8  | The ''​os_version_mapping''​ was used only for Hypervisors,​ made it work for VirtualMachines also.\\ Proper support of UTF-8 characters in regular expressions (the code now always uses the ''​u''​ modifier) |
Line 65: Line 65:
   * An access to the vSphere web services API   * An access to the vSphere web services API
   * An access to the iTop web services (REST + synchro_import.php and synchro_exec.php)   * An access to the iTop web services (REST + synchro_import.php and synchro_exec.php)
 +  * + [[extensions:​itop-data-collector-base#​requirements|Data collector Base]] requirements.
 ===== Installation ===== ===== Installation =====
  
Line 221: Line 221:
  
 <note warning>​At this stage, IPv6 are not collected. This is due to a limitation of the collector base which cannot handle such objects yet.</​note>​ <note warning>​At this stage, IPv6 are not collected. This is due to a limitation of the collector base which cannot handle such objects yet.</​note>​
 +
 +==== Configurable collectors ====
 +
 +Starting with version 1.0.12 of the application, ​ //Server// and //​Hypervisor//​ collectors are configurable by adding extra definitions in the XMl parameter file.
 +
 +This configuration contains two parts:
 +  - The first part (under the ''<​nowiki><​json></​nowiki>''​ tag) allows to alter the definition of the Synchro Data Source (normally fixed by the .json file associated with the collector class). This is useful to synchronise a new field which was not synchronized by default, or to change a reconciliation rule on a field, etc... Any field under the ''​attribute_list''​ part of the JSON file can be modified by specifying a new value in the configuration.
 +  - The second part (the ''<​source>''​ tag) defines the way to collect the data for the attribute. This tag must contain a (partial) PHP expression relative to the Hypervisor object (which is actually a [[https://​pubs.vmware.com/​vsphere-50/​topic/​com.vmware.wssdk.apiref.doc_50/​vim.HostSystem.html|HostSystem]] in the vSphere model)
 +
 +Both parts of the configuration can be used independently (one can alter only the JSON or only the collection, or both).
 +
 +The example below configures the collection of the "​Serial Number"​ on Servers (from the ''​otherIdentifyingInfo[EnclosureSerialNumberTag]''​) and also uses the collected serial number as the reconciliation key between //​Hypervisors//​ and physical //Servers// (the field ''​server_id''​).
 +
 +<file xml config.local.xml>​
 +<?xml version="​1.0"​ encoding="​UTF-8"?>​
 +<​parameters>​
 +
 +  ...
 +
 +  <​custom_synchro>​
 +    <​vSphereHypervisorCollector>​
 +      <​fields>​
 +        <​server_id>​
 +          <​source>​hardware->​systemInfo->​otherIdentifyingInfo[EnclosureSerialNumberTag]</​source>​
 +          <​json>​
 +            <​reconciliation_attcode>​serialnumber</​reconciliation_attcode>​
 +          </​json>​
 +        </​server_id>​
 +      </​fields>​
 +    </​vSphereHypervisorCollector>​
 +    <​vSphereServerCollector>​
 +      <​fields>​
 +        <​serialnumber>​
 +          <​source>​hardware->​systemInfo->​otherIdentifyingInfo[EnclosureSerialNumberTag]</​source>​
 +        </​serialnumber>​
 +      </​fields>​
 +    </​vSphereServerCollector>​
 +  </​custom_synchro>​
 +  ​
 +  ...
 +  ​
 +</​parameters>​
 +</​file>​
 +
 +<note important>​The special syntax with brackets in the ''<​source>''​ tag is currently only supported on the ''​otherIdentifyingInfo''​ property.</​note>​
  
 ===== Usage ===== ===== Usage =====
Line 279: Line 324:
 ==== Servers and Hypervisors ==== ==== Servers and Hypervisors ====
  
-In the vSphere web services SDK, Hypervisors and physical Servers are represented by the same object [[http://​pubs.vmware.com/​vsphere-50/​index.jsp#com.vmware.wssdk.apiref.doc_50/​vim.HostSystem.html|HostSystem]].+In the vSphere web services SDK, Hypervisors and physical Servers are represented by the same object [[https://​pubs.vmware.com/​vsphere-50/​topic/com.vmware.wssdk.apiref.doc_50/​vim.HostSystem.html|HostSystem]].
  
 The information from the vSphere HostSystem object is imported in iTop into the Server object using the following mapping: The information from the vSphere HostSystem object is imported in iTop into the Server object using the following mapping:
Line 305: Line 350:
  
  
 +<note tip>The example used in the section [[#​configurable_collectors|Configurable Collectors]] shows how to collect the serial number of servers. Be aware that the information available in the property ''​otherIdentifyingInfo''​ seem to depend on the hardware manufacturer and/or the version of the hypervisor. Test on your systems before putting such a modification in production.</​note>​
 ==== Farms ==== ==== Farms ====
  
extensions/vsphere-data-collector.txt · Last modified: 2020/04/15 14:18 (external edit)

";