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/07/07 18:36] (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
  
  
 <note tip>This collector makes use of iTop's built-in Data Synchronization mechanism. For more information about how the data synchronization works, refer to [[latest:​advancedtopics:​data_synchro_overview|Data Synchronization Overview]] and relies on [[extensions:​itop-data-collector-base|Data collector Base]] mechanism</​note>​ <note tip>This collector makes use of iTop's built-in Data Synchronization mechanism. For more information about how the data synchronization works, refer to [[latest:​advancedtopics:​data_synchro_overview|Data Synchronization Overview]] and relies on [[extensions:​itop-data-collector-base|Data collector Base]] mechanism</​note>​
 +
 +
  
 ===== 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-07-07  |  1.0.13 | - Differenciates error/logs between teemip NOT installed and itop REST API issue\\ - Multi configuration file\\ - New CSV collector\\ - Configurable timestamp added in the logs\\ - New option for usage: –help | 
-|  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\\ | +|  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-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-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-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) |
 |  2017-04-24 ​ |  1.0.7  | Fixed the value for the status of VMs: '​production'​ instead of '​active'​. | |  2017-04-24 ​ |  1.0.7  | Fixed the value for the status of VMs: '​production'​ instead of '​active'​. |
 |  2017-03-08 ​ |  1.0.6  | - Code cleanup.\\ - Data Synchro ''​status''​ and ''​full_load_interval''​ are now homogeneous and configurable parameters for all data sources.\\ - OS Version and OS Family have their own mapping table.\\ - Fix for the Hypervisor status value (now defaults to "​production"​).\\ -  Addition of the ''​check_soap.php''​ script for troubleshooting.\\ -  Protect against a PHP crash in case of a disconnected ESX.\\ - Do not collect an IPV6 as the management IP address of a virtual machine (since the field can only contain an IPV4). Many thanks to Andrew Armstrong for proposing this fix.| |  2017-03-08 ​ |  1.0.6  | - Code cleanup.\\ - Data Synchro ''​status''​ and ''​full_load_interval''​ are now homogeneous and configurable parameters for all data sources.\\ - OS Version and OS Family have their own mapping table.\\ - Fix for the Hypervisor status value (now defaults to "​production"​).\\ -  Addition of the ''​check_soap.php''​ script for troubleshooting.\\ -  Protect against a PHP crash in case of a disconnected ESX.\\ - Do not collect an IPV6 as the management IP address of a virtual machine (since the field can only contain an IPV4). Many thanks to Andrew Armstrong for proposing this fix.|
Line 65: Line 68:
   * 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 224:
  
 <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 327:
 ==== 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://code.vmware.com/apis/196/vsphere/doc/​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 353:
  
  
 +<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 ====
  
-In the vSphere web services SDK, a Farm is represented by the object [[http://pubs.vmware.com/​vsphere-50/index.jsp#​com.vmware.wssdk.apiref.doc_50/​vim.ClusterComputeResource.html|ClusterComputeResource]].+In the vSphere web services SDK, a Farm is represented by the object [[https://code.vmware.com/apis/196/vsphere/doc/​vim.ClusterComputeResource.html|ClusterComputeResource]].
  
 The information from the vSphere ClusterComputeResource object is imported in iTop into the Farm object using the following mapping: The information from the vSphere ClusterComputeResource object is imported in iTop into the Farm object using the following mapping:
Line 320: Line 368:
 ==== Virtual Machines ==== ==== Virtual Machines ====
  
-In the vSphere web services SDK, a Virtual Machine is represented by the object [[http://pubs.vmware.com/​vsphere-50/index.jsp#​com.vmware.wssdk.apiref.doc_50/​vim.VirtualMachine.html#​field_detail|VirtualMachine]].+In the vSphere web services SDK, a Virtual Machine is represented by the object [[https://code.vmware.com/apis/196/vsphere/doc/​vim.VirtualMachine.html|VirtualMachine]].
 The information from the vSphere VirtualMachine object is imported in iTop into the VirtualMachine object using the following mapping: The information from the vSphere VirtualMachine object is imported in iTop into the VirtualMachine object using the following mapping:
  
extensions/vsphere-data-collector.1574091242.txt.gz · Last modified: 2019/11/18 16:34 by vdumas

";