Describes the procedure to write vCenter custom collector.

Collector Manager Configuration

To create a vCenter collector, follow the Collector Manager configuration file example:

EX- 
<collectors>
    <collector enabled="true" name="VMWareCollector" next="VMWARE-VHF-VMFILES" type="VMWare-Collector" config="VMWare-Collector/${module['vmware-collector'].instance}/conf/vmware-collector.xml" />
    <collector enabled="true" name="VMWareCollectorVMFiles" next="VMWARE-VHF-VMFILES" type="VMWare-Collector" config="VMWare-Collector/${module['vmware-collector'].instance}/conf/vmware-collector-vmfiles.xml" />
    <collector enabled="true" name="VMWareCollectorDatastoreClusters" next="VMWARE-VHF-VMFILES" type="VMWare-Collector" config="VMWare-Collector/${module['vmware-collector'].instance}/conf/vmware-collector-datastoreclusters.xml" />
  </collectors>

VMware Collector Configuration

  1. Collector Context handlers: A context handler defines a specific way to access the content of a Managed Object Browser. 3.1 Array handler Each handlers expect a path where the specific object is. If for any reason the object is the same as the current scope, use the path ”.”.

  2. Array handler: A Generic Array handler defined by the array tag knows how to handle a simple dynamic data ar- ray.

  3. Datastore handler: A Datastore handler defined by the datastore tag knows how to handle correctly a Datastore managed entity.

  4. Datastore Info handler: A Datastore Info handler defined by the datastore-info tag is only available inside a Datastore handler. It know how to access the restricted info field of a Datastore managed entity.

  5. Grouped By Columns Array handler: A Grouped By Columns Array handler defined by the group-by-columns-array tag will handle a sim- ple dynamic data array but will extract at least one value. The values extracted will contain all the properties extracted from the fields of the same index in the array. The optional attribute variable-id allow to change the variable ID create for values under this handler. The optional attribute restrict-on can be used to filter on one data type of element in the array. The content is expected to be the object Java class name.

  6. MOR handler: A MOR handler defined by the mor tag knows of the dereference a Managed Object Reference (MoRef) which allows its fields to be accessible.

  7. MOR Array handler : A MOR Array handler defined by the mor-array tag knows how to handle an array of Managed Object Reference (MoRef).

  8. Sensor Array handler: A Sensory Array handler defined by the sensors tag knows how to handle an array of sensors of a managed entity.

Default Collector Configuration Properties

One or more <connection> elements may be declared in a configuration in order to poll several vCenter instances with the same collector.

The older syntax, which allows the polling of only one vCenter instance per collector instance, is still supported for compatibility reasons. (The <url>, <username> and <password> elements are not containted in a <connection> element). Please update those configurations as soon as possible to enjoy the benefits of the new configuration model.

ThechoiceofRawValuepropertyrefreshhandleroffercustomizationbetweenuptodaterefresh from the collecting layer point of view versus a more lightweight predictable refresh.

An <element> defines a scope for a single MOB entity. It can contain sub element tags that define only a scope change, the polling will be done on the same element as the parent. It contains the following attributes: • id: (Mandatory) Only for logging purpose.

  • type: A valid managed type (VirtualMachine, HostSystem, Datastore, ...). Mandatory and avail- able only for top level elements.

  • filter:AvalidJavaregexusedtoreducethenumberofentitiespolledforthegiventype.Optional and available only for top level elements.

  • variable-id: (Optional) List of space separated properties used to create the variable ID for each values extracted in the scope. Default value is: source device part name.

  • devtype: Can force the devtype property to other thing than the type attribute. Optional and available only for top level elements.

EX-
<value name="Heartbeat" value="sys.heartbeat" type="counter" rollup-type="summation"/> <value name="Uptime" value="sys.uptime" type="counter" rollup-type="latest" />
<value name="cpuCount" value="config.hardware.numCPU" type="property-value" />
<value name="diskCount" value="summary.config.numVirtualDisks" type="property-value" />

An <element> usually contains <value> tags. <value> tags declare the list of extracted EMC M&R values from either MOB counters or MOB properties. A <value> contains the following attributes: name: (Mandatory) Resulting value of the name property.

  • value: (Mandatory) The MOB path unit: (Optional) Defines the value of the unit property in the EMC M&R values type: (Optional) Used only when defining a value under an element, MOR or MOR array tags. Defines if the value is from a counter (type=”counter”) or a property (type=”property-value”). Default is counter.

  • allow-missing: (Optional) Determines if we allow the given path to be missing and use ”” as it’s value in such case.

  • instance:(Optional)Usedonlywhenthetypeiscounter.Itwilldefinethebehavioroftheresulting counters when they are attached to multiple instance. Possible values for this attribute are: both: Defines that the summary and children values will be generated. – children: Filters only on the children.

  • summary: Filters only on the summary which is the default behavior.

  • instance-property: (Optional) Used only when the type is counter and when the counter is at- tached to multiple instance of the entity. This field defines which property in the EMC M&R values will have the MOB instance value as suffix.

  • rollup-type: (Optional) Defines which counter to take when multiple sampling is available. The rollup-type is counter specific and the list of available sampling per counter should be available in the vCenter details . Available sampling are:

    • none: Counter is only keeping a count.

    • average: (Default) Counter is computing the average of the value.

    • minimum: Counter is keeping the minimum value.

    • maximum: Counter is keeping the maximum value.

    • summation: Counter is computing the sum of the value.

    • latest: Counter is keeping the last value.

<value name="Availability" value="runtime.powerState" type="property-value">
  <replace value="poweredOn" by="100" />
<replace value="poweredOff" by="0" />
<replace value="suspended" by="50" />
</value>
<value name="CurrentSnapshot" value="snapshot.currentSnapshot" type="property-value">
<replace value="" by="0" />
<replace value="com.vmware.*" by="1" type="regex"/>
</value>
The <value> tags can also contain <replace> tags, which are used to transform text to a numerical value. Matching on the polled value is done via a regular expression.

<property name="device" type="data" value="name" />
<property name="deviceid" type="data" value="config.instanceUuid" />
<property name="path" type="data" value="summary.config.vmPathName" />
<property name="status" type="data" value="summary.overallStatus">
  <replace value="green" by="Normal" />
<replace value="yellow" by="Warning" />
<replace value="red" by="Alert" />
<property>

The <property> is a property coming from either a MOB field or an hard coded value. A <property> contains the following attributes: • name: (Mandatory) Resulting name of the new property.

  • value: (Mandatory) Defines either the MOB path or the hard coded value if available. If the path is %MOT% for a data property, the result will be the actual Managed Object Type of the entity (represented by the Java class name).

  • type: (Optional) Defines if the property comes from a MOB field (data) or an hard coded value. Default value is data.

  • allow-missing: (Optional) Determines if we allow the given path to be missing and use ”” as it’s value in such case.

A <property> can also contain a <replace> tag to substitute a polled value with another one (textual or numerical).

<property name="ip" type="data" value="guest.ipAddress" />
<property name="hostname" type="data" value="guest.hostName" />
<property name="devdesc" type="data" value="guest.guestFullName" />
<property name="toolvrs" type="data" value="guest.toolsVersionStatus" />
<property name="toolstat" type="data" value="guest.toolsRunningStatus">
  <replace value="guestToolsNotRunning" by="Not␣Running" />
<replace value="guestToolsNotInstalled" by="Not␣Installed" />
<replace value="guestToolsCurrent" by="Current" />
<replace value="guestToolsRunning" by="Running" />
<replace value="guestToolsNeedUpgrade" by="Need␣Upgrade" />
<replace value="guestToolsUnmanaged" by="Unmanaged" />
</property>
<mor path="parent">
<property name="folder" type="data" value="name" /> </mor >
<mor path="runtime.host">
<property name="hypervsr" type="data" value="name" />
</mor >

The <mor> defines that a needed Managed Object Reference is present in the scope and must be retrieved and cached.

<datastore path="datastore">
<property name="datastor" value="name"/>
</datastore >

The <datastore> defines that a needed datastore is present in the scope and allow the retrieval of the content under info.vmfs.

<element id="CPU" variable-id="deviceid␣parttype␣part␣name">
  <value name="Ready" value="cpu.ready" type="counter" rollup-type="summation" />
<value name="UsageMHz" value="cpu.usagemhz" type="counter" rollup-type="average" />
<value name="CurrentUtilization" value="cpu.usage" type="counter"
rollup-type="average" />
<property name="parttype" type="hard-coded" value="Processor" />
<property name="part" type="hard-coded" value="System" />
</element>

Configuration Tags Reference

  • element: An element defines a scope for a single MOB entity. It can contains sub element tags that define only a scope change, the polling will be done on the same element as the parent An element contains the following attributes:

    • id: (Mandatory) Only for logging purpose.

    • variable-id: (Optional) List of space separated properties used to create the variable ID for each values extracted in the scope. Default val – allow-missing-property: (Optional) If it’s possible that an enrichment property (not part of the variable ID or used as value) can be missing from some entities in the list, it’s possible allow those properties to be missing in the resulting raw values instead of skipping completly the element. This feature should only be used for this reason and not as a possible safeguard.

    • type: A valid managed type (VirtualMachine, HostSystem, Datastore, ...). Mandatory and available only for top level elements.

    • filter: A valid Java regex used to reduce the number of entities polled for the given type. Optional and available only for top level elements.

    • devtype: Can force the devtype property to other thing that the type attribute. Optional and available only for top level elements.

An element can contains the following optional tags:

  • value: Defines a list of extracted EMC M&R values from either MOB counters or MOB properties.

  • property: Defines the list of EMC M&R properties from either an extracted MOB field or an hard coded value.

  • mor: Defines that a needed Managed Object Reference is present in the scope and must be retrieved and cached.

  • datastore: Defines that a needed datastore is present in the scope and allow the retrieval of the content under info.vmfs.

  • array: Defines that a needed dynamic data array is present in the scope.

  • mor-array: Defines that a needed mor array is present in the scope and must be retrieved and cached.

  • value: A value can either comes from an extracted MOB property or a MOB performance counter. Counters are only available under an element, MOR or MOR array tags. A value contains the following attributes:

    • name: (Mandatory) Resulting value of the name property.

    • value: (Mandatory) The MOB path – unit: (Optional) Defines the value of the unit property in the EMC M&R values – type: (Optional) Used only when defining a value under an element, MOR or MOR array tags. Defines if the value is from a counter (type=”counter”) or a property (type=”property- value”). Default is counter.

    • instance: (Optional) Used only when the type is counter. It will define the behavior of the resulting counters when they are attached to multiple instance. Possible values for this attribute are:

      • both: Defines that the summary and children values will be generated.

      • children: Filters only on the children.

      • summary: Filters only on the summary which is the default behavior.

    • instance-property: (Optional) Used only when the type is counter and when the counter is attached to multiple instance of the entity. This field defines which property in the EMC M&R values will have the MOB instance value as suffix.

    • rollup-type: (Optional) Defines which counter to take when multiple sampling is available. The rollup-type is counter specific and the list of available sampling per counter should be available in the vCenter documentation. If not, see section 4 for more details. Available sampling are:

      • none: Counter is only keeping a count.

      • average: (Default) Counter is computing the average of the value.

      • minimum: Counter is keeping the minimum value.

      • maximum: Counter is keeping the maximum value.

      • summation: Counter is computing the sum of the value.

      • latest: Counter is keeping the last value.

VMware Collector Administration Guide 21 property: An M&R property coming from either a MOB field or an hard coded value.

A property contains the following attributes:

  • name: (Mandatory) Resulting name of the new property.

  • value: (Mandatory) Defines either the MOB path or the hard coded value if available. If the path is %MOT% for a data property, the result will be the actual Managed Object Type of the entity (represented by the Java class name).

  • type: (Optional) Defines if the property comes from a MOB field (data) or an hard coded value. Default value is data.

  • replace: Both the value and property tags can nest replacements. A replace tag works with the following attributes: value: The perfect match for a value or property that must be replaced.

  • by: The actual replacement. Can be a group index when matching on regexes ($<groupIn- dex>) and otherwise it must be a number when used underneath a value tag.

  • type: (Optional) The type of replacer. Possible values are: equals (default) for stricly equals comparison or regex for pattern matching.

Example

vmware-collector.xml

<configuration xmlns="http://www.watch4net.com/VMWare-Collector" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.watch4net.com/VMWare-Collector ./vmware-collector.xsd ">

    <!-- The number of thread that will parse each element (MOB entity) in parallel -->
    <collecting-threads>${common.collectingthreads}</collecting-threads>
    <!-- The time in seconds between to polling -->
    <polling-interval>${common.pollingper}</polling-interval>
    <!-- The time in seconds between a full synchronization (update the properties, entities and inventory cache -->
    <resync-interval>${common.resyncintervalper}</resync-interval>
    <!-- Periodically setting a +r. Default value 1 hour in seconds -->
    <periodic-refresh>3600s</periodic-refresh>
    <!-- The APG collecting group -->
    <collecting-group>group</collecting-group>
    <!-- The APG collecting source -->
    <source>VMWareCollector</source>

    <!-- The vSphere service URL -->
    [#if connection??]
    [#list connection as vcenter]
    <connection timeout="180s">
        <url>https://${vcenter.primary.vcenter.host?string?xml}/sdk/vimService</url>
        <username>${vcenter.primary.vcenter.username?string?xml}</username>
        <password>${vcenter.primary.vcenter.password}</password>
        <connection-properties name="vcenter">${vcenter.primary.vcenter.host?string?xml}</connection-properties>
    </connection>
    [/#list]
    [/#if]
    <!-- The property separator when a single field contains an array -->
    <property-separator>|</property-separator>

    <!-- Polling every VMs on the MOB -->
    <element id="VM" type="VirtualMachine" filter=".*" variable-id="deviceid name" allow-missing-property="true">
        <value name="Heartbeat" value="sys.heartbeat" type="counter" rollup-type="summation" unit="number" />
        <value name="Uptime" value="sys.uptime" type="counter" rollup-type="latest" unit="s" />
        <value name="TotalDisk" value="summary.config.numVirtualDisks" type="property-value" unit="number" />
        <value name="Availability" value="runtime.powerState" type="property-value" unit="%">
            <replace value="poweredOn" by="100" />
            <replace value="poweredOff" by="0" />
            <replace value="suspended" by="0" />
        </value>
        <value name="CurrentSnapshot" value="snapshot.currentSnapshot" type="property-value" unit="number">
            <replace value="" by="0" />
            <replace value="com.vmware.*" by="1" type="regex" />
        </value>
        <property name="datagrp" type="hard-coded" value="VCENTER-VM" />
        <property name="w4ncert" type="hard-coded" value="1.0" />
        <property name="hastatus" type="hard-coded" value="VM" />
        <property name="device" type="data" value="name" />
        <property name="deviceid" type="data" value="config.instanceUuid" />
        <property name="serialnb" type="data" value="config.uuid" />
        <property name="path" type="data" value="summary.config.vmPathName" />
        <property name="status" type="data" value="summary.overallStatus">
            <replace value="green" by="Normal" />
            <replace value="yellow" by="Warning" />
            <replace value="red" by="Alert" />
            <replace value="gray" by="Unknown" />
        </property>
        <property name="currsnap" type="data" value="snapshot.currentSnapshot">
            <replace value="" by="0" />
            <replace value="com.vmware.*" by="1" type="regex" />
        </property>
        <property name="ip" type="data" value="guest.ipAddress" />
        <property name="tmphstat" type="data" value="config.managedBy.type">
            <replace value="placeholderVm" by="Placeholder VM" />
            <replace value="hms" by="HMS VM" />
        </property>
        <property name="collhost" type="hard-coded" value="${apg.hostname}" />
        <property name="collinst" type="hard-coded" value="${module['vmware-collector'].instance}" />
        <property name="fqdn" type="data" value="guest.hostName" />
        <property name="hostname" type="data" value="guest.hostName" />
        <property name="domain" type="hard-coded" value="N/A" />
        <property name="devdesc" type="data" value="guest.guestFullName" />
        <property name="toolvr" type="data" value="guest.toolsVersion" />
        <property name="toolvrs" type="data" value="guest.toolsVersionStatus2" >
            <replace value="guestToolsBlacklisted" by="Blacklisted, Immediately Upgrade" />
            <replace value="guestToolsCurrent" by="Current" />
            <replace value="guestToolsNeedUpgrade" by="Need Upgrade" />
            <replace value="guestToolsNotInstalled" by="Not Installed" />
            <replace value="guestToolsSupportedNew" by="Current" />
            <replace value="guestToolsSupportedOld" by="Supported, Can Upgrade" />
            <replace value="guestToolsTooNew" by="Invalid newer version" />
            <replace value="guestToolsTooOld" by="Invalid older version" />
            <replace value="guestToolsUnmanaged" by="3rd Party Install" />
        </property>
        <property name="toolstat" type="data" value="guest.toolsRunningStatus">
            <replace value="guestToolsNotRunning" by="Not Running" />
            <replace value="guestToolsNotInstalled" by="Not Installed" />
            <replace value="guestToolsCurrent" by="Current" />
            <replace value="guestToolsRunning" by="Running" />
            <replace value="guestToolsNeedUpgrade" by="Need Upgrade" />
            <replace value="guestToolsUnmanaged" by="Unmanaged" />
        </property>
        <!-- NPIV port wwns -->
        <property name="npivnode" type="data" value="config.npivNodeWorldWideName" />
        <property name="npivport" type="data" value="config.npivPortWorldWideName" />
        <property name="nbcpu" type="data" value="config.hardware.numCPU" />
        <property name="memory" type="data" value="config.hardware.memoryMB" />
        <property name="template" type="data" value="summary.config.template" />

        <mor path="resourcePool">
            <property name="rparentn" type="data" value="name" />
            <property name="rparentt" type="data" value="%MOT%" />
            <mor path="parent">
                <property name="rparent1n" type="data" value="name" />
                <property name="rparent1t" type="data" value="%MOT%" />
                <mor path="parent">
                    <property name="rparent2n" type="data" value="name" />
                    <property name="rparent2t" type="data" value="%MOT%" />
                    <mor path="parent">
                        <property name="rparent3n" type="data" value="name" />
                        <property name="rparent3t" type="data" value="%MOT%" />
                        <mor path="parent">
                            <property name="rparent4n" type="data" value="name" />
                            <property name="rparent4t" type="data" value="%MOT%" />
                            <mor path="parent">
                                <property name="rparent5n" type="data" value="name" />
                                <property name="rparent5t" type="data" value="%MOT%" />
                                <mor path="parent">
                                    <property name="rparent6n" type="data" value="name" />
                                    <property name="rparent6t" type="data" value="%MOT%" />
                                    <mor path="parent">
                                        <property name="rparent7n" type="data" value="name" />
                                        <property name="rparent7t" type="data" value="%MOT%" />
                                        <mor path="parent">
                                            <property name="rparent8n" type="data" value="name" />
                                            <property name="rparent8t" type="data" value="%MOT%" />
                                        </mor>
                                    </mor>
                                </mor>
                            </mor>
                        </mor>
                    </mor>
                </mor>
            </mor>
        </mor>

        <mor path="parent">
            <property name="parentn" type="data" value="name" />
            <property name="parentt" type="data" value="%MOT%" />
            <mor path="parent">
                <property name="parent1n" type="data" value="name" />
                <property name="parent1t" type="data" value="%MOT%" />
                <mor path="parent">
                    <property name="parent2n" type="data" value="name" />
                    <property name="parent2t" type="data" value="%MOT%" />
                    <mor path="parent">
                        <property name="parent3n" type="data" value="name" />
                        <property name="parent3t" type="data" value="%MOT%" />
                        <mor path="parent">
                            <property name="parent4n" type="data" value="name" />
                            <property name="parent4t" type="data" value="%MOT%" />
                            <mor path="parent">
                                <property name="parent5n" type="data" value="name" />
                                <property name="parent5t" type="data" value="%MOT%" />
                                <mor path="parent">
                                    <property name="parent6n" type="data" value="name" />
                                    <property name="parent6t" type="data" value="%MOT%" />
                                    <mor path="parent">
                                        <property name="parent7n" type="data" value="name" />
                                        <property name="parent7t" type="data" value="%MOT%" />
                                        <mor path="parent">
                                            <property name="parent8n" type="data" value="name" />
                                            <property name="parent8t" type="data" value="%MOT%" />
                                        </mor>
                                    </mor>
                                </mor>
                            </mor>
                        </mor>
                    </mor>
                </mor>
            </mor>
        </mor>

        <mor path="parentVApp">
            <property name="vparentn" type="data" value="name" />
            <property name="vparentt" type="data" value="%MOT%" />
            <mor path="parentFolder">
                <property name="vparent1n" type="data" value="name" />
                <property name="vparent1t" type="data" value="%MOT%" />
                <mor path="parent">
                    <property name="vparent2n" type="data" value="name" />
                    <property name="vparent2t" type="data" value="%MOT%" />
                    <mor path="parent">
                        <property name="vparent3n" type="data" value="name" />
                        <property name="vparent3t" type="data" value="%MOT%" />
                        <mor path="parent">
                            <property name="vparent4n" type="data" value="name" />
                            <property name="vparent4t" type="data" value="%MOT%" />
                            <mor path="parent">
                                <property name="vparent5n" type="data" value="name" />
                                <property name="vparent5t" type="data" value="%MOT%" />
                                <mor path="parent">
                                    <property name="vparent6n" type="data" value="name" />
                                    <property name="vparent6t" type="data" value="%MOT%" />
                                    <mor path="parent">
                                        <property name="vparent7n" type="data" value="name" />
                                        <property name="vparent7t" type="data" value="%MOT%" />
                                        <mor path="parent">
                                            <property name="vparent8n" type="data" value="name" />
                                            <property name="vparent8t" type="data" value="%MOT%" />
                                        </mor>
                                    </mor>
                                </mor>
                            </mor>
                        </mor>
                    </mor>
                </mor>
            </mor>
            <mor path="parentVApp">
                <property name="vparentn" type="data" value="name" />
                <property name="vparentt" type="data" value="%MOT%" />
                <mor path="parentFolder">
                    <property name="vparent1n" type="data" value="name" />
                    <property name="vparent1t" type="data" value="%MOT%" />
                    <mor path="parent">
                        <property name="vparent2n" type="data" value="name" />
                        <property name="vparent2t" type="data" value="%MOT%" />
                        <mor path="parent">
                            <property name="vparent3n" type="data" value="name" />
                            <property name="vparent3t" type="data" value="%MOT%" />
                            <mor path="parent">
                                <property name="vparent4n" type="data" value="name" />
                                <property name="vparent4t" type="data" value="%MOT%" />
                                <mor path="parent">
                                    <property name="vparent5n" type="data" value="name" />
                                    <property name="vparent5t" type="data" value="%MOT%" />
                                    <mor path="parent">
                                        <property name="vparent6n" type="data" value="name" />
                                        <property name="vparent6t" type="data" value="%MOT%" />
                                        <mor path="parent">
                                            <property name="vparent7n" type="data" value="name" />
                                            <property name="vparent7t" type="data" value="%MOT%" />
                                            <mor path="parent">
                                                <property name="vparent8n" type="data" value="name" />
                                                <property name="vparent8t" type="data" value="%MOT%" />
                                            </mor>
                                        </mor>
                                    </mor>
                                 </mor>
                             </mor>
                         </mor>
                     </mor>
                 </mor>
            </mor>
        </mor>

        <mor path="runtime.host">
            <property name="hypervsr" type="data" value="name" />
        </mor>

        <!-- DV Port group -->
        <mor-array path="network">
            <property name="portgrp" type="data" value="name" />
        </mor-array>

        <!-- ALL RDM : -->
        <element id="RDM" variable-id="deviceid parttype part name" allow-missing-property="true">
            <grouped-by-columns-array path="config.hardware.device" restrict-on="VirtualDisk">
                <property name="dtype" type="data" value="backing.thinProvisioned">
                    <replace value="true" by="Thin" />
                    <replace value="false" by="Thick" />
                </property>
                <property name="parttype" type="hard-coded" value="Virtual Disk" />
                <property name="partsn" type="data" value="backing.lunUuid" />
		<property name="vvolpart" type="data" value="backing.backingObjectId" />
                <property name="dname" type="data" value="backing.deviceName" />
                <property name="part" type="data" value="deviceInfo.label" />
                <property name="rdmname" type="data" value="deviceInfo.label" />
                <property name="dispname" type="data" value="deviceInfo.label" />
                <property name="partdesc" type="data" value="backing.fileName" />
                <property name="thinprov" type="data" value="backing.thinProvisioned" />
                <property name="vdisksn" type="data" value="backing.uuid" />
                <property name="compmode" type="data" value="backing.compatibilityMode" />
                <property name="ctrlkey" type="data" value="controllerKey" />
                <property name="unitnum" type="data" value="unitNumber" />
                <value name="Capacity" value="capacityInKB" unit="GB" />
            </grouped-by-columns-array>
        </element>

        <element id="CPU" variable-id="deviceid parttype part name">
            [#if (common.collection_stat_level >= 2)]
            <value name="Ready" value="cpu.ready" type="counter" rollup-type="summation" unit="ms" />
            [/#if]
            <value name="UsageMHz" value="cpu.usagemhz" type="counter" rollup-type="average" unit="MHz" />
            <value name="CurrentUtilization" value="cpu.usage" type="counter" rollup-type="average" unit="%" />
            <property name="parttype" type="hard-coded" value="Processor" />
            <property name="part" type="hard-coded" value="System" />
        </element>

        <element id="GUEST-FILESYSTEM" variable-id="deviceid parttype part name">
            <grouped-by-columns-array path="guest.disk">
                <property name="part" value="diskPath" type="data" />
                <property name="parttype" value="FileSystem" type="hard-coded" />
                <value name="FreeCapacity" value="freeSpace" unit="GB" />
                <value name="Capacity" value="capacity" unit="GB" />
            </grouped-by-columns-array>
        </element>

        <element id="MAC" variable-id="deviceid parttype part name">
            <grouped-by-columns-array path="guest.net">
                <property name="network" value="network" type="data" />
                <property name="mac" value="macAddress" type="data" />
                <property name="netip" value="ipAddress" type="data" />
                <property name="part" value="deviceConfigId" type="data" />
                <property name="nictype" value="virtual" type="hard-coded" />
                <property name="parttype" value="Interface" type="hard-coded" />
                <value name="Availability" value="connected" unit="%">
                    <replace value="true" by="100" />
                    <replace value="false" by="0" />
                </value>
            </grouped-by-columns-array>
        </element>

        <element id="DATASTORE" variable-id="deviceid parttype part name">
            <grouped-by-columns-array path="storage.perDatastoreUsage">
                <property name="parttype" value="Datastore" type="hard-coded" />
                <mor path="datastore">
                    <property name="part" value="name" type="data" />
                    <property name="linkedto" value="name" type="data" />
                    <property name="dsurl" value="summary.url" type="data" />
                    <property name="type" type="data" value="summary.type" />
                </mor>
                <value name="UsedCapacity" value="committed" unit="GB" />
            </grouped-by-columns-array>
        </element>
 
        <element id="MEMORY" variable-id="deviceid parttype part name">
            <value name="CurrentUtilization" value="mem.usage" type="counter" unit="%" />
            <value name="Overhead" value="mem.overhead" type="counter" unit="MB" />
            <value name="Consumed" value="mem.consumed" type="counter" unit="MB" />
            <value name="Balloon" value="mem.vmmemctl" type="counter" unit="MB" />
            [#if (common.collection_stat_level >= 2)]
            <value name="Active" value="mem.active" type="counter" unit="MB" />
            [/#if]
            <value name="TotalMemory" type="property-value" value="config.hardware.memoryMB" unit="MB" />
            <property name="parttype" type="hard-coded" value="Memory" />
            <property name="part" type="hard-coded" value="System" />
        </element>

        <element id="SWAP" variable-id="deviceid parttype part name">
            <value name="SwapIn" value="mem.swapinRate" type="counter" unit="MB/s" />
            <value name="SwapOut" value="mem.swapoutRate" unit="MB/s" />
            <property name="parttype" type="hard-coded" value="Memory" />
            <property name="part" type="hard-coded" value="Swap" />
        </element>

        <element id="INTERFACE" variable-id="deviceid parttype part name">
            <value name="Throughput" instance="children" value="net.usage" type="counter" unit="MB/s" />
            [#if (common.collection_stat_level >= 3)]
            <value name="InPackets" instance="children" value="net.packetsRx" rollup-type="summation"  unit="number" />
            <value name="OutPackets" instance="children" value="net.packetsTx" rollup-type="summation" unit="number" />
            <value name="Received" instance="children" value="net.received" unit="MB/s" />
            <value name="Transmitted" instance="children" value="net.transmitted" unit="MB/s" />
            [/#if]
            <property name="parttype" type="hard-coded" value="Interface" />
            <!-- the part will be appended with the interface name so let it empty -->
            <property name="part" type="hard-coded" value="" />
        </element>
        [#if (common.collection_stat_level >= 2) ]
        <element id="VDISKS" variable-id="deviceid parttype part name">
            <value name="ReadThroughput" value="virtualDisk.read" instance="both" instance-property="part" unit="MB/s" />
            <value name="WriteThroughput" value="virtualDisk.write" instance="both" instance-property="part" unit="MB/s" />
            <value name="ReadRequests" value="virtualDisk.numberReadAveraged" instance="both" instance-property="part" unit="IOPS" />
            <value name="WriteRequests" value="virtualDisk.numberWriteAveraged" instance="both" instance-property="part" unit="IOPS" />
            <value name="ReadLatency" value="virtualDisk.totalReadLatency" instance="both" instance-property="part" type="counter" unit="ms" />
            <value name="WriteLatency" value="virtualDisk.totalWriteLatency" instance="both" instance-property="part" type="counter" unit="ms" />
            <value name="ReadIOSize" value="virtualDisk.readIOSize" instance="both" instance-property="part" type="counter" unit="KB" rollup-type="latest" />
            <value name="WriteIOSize" value="virtualDisk.writeIOSize" instance="both" instance-property="part" type="counter" unit="KB" rollup-type="latest" />
            <property name="parttype" type="hard-coded" value="Virtual Disk" />
        </element>

        <element id="DISKS" variable-id="deviceid parttype part name">
            <value name="Throughput" value="disk.usage" instance="both" instance-property="part" type="counter" unit="MB/s" />
            <value name="ReadThroughput" value="disk.read" instance="both" instance-property="part" unit="MB/s" />
            <value name="WriteThroughput" value="disk.write" instance="both" instance-property="part" unit="MB/s" />
            <!-- doc: http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/disk_counters.html -->
            <value name="ReadRequests" value="disk.numberReadAveraged" instance="both" instance-property="part" unit="IOPS" />
            <value name="WriteRequests" value="disk.numberWriteAveraged" instance="both" instance-property="part" unit="IOPS" />
            <property name="parttype" type="hard-coded" value="Disk" />
        </element>

        <!-- Datastore Performance and Inventory Collect: -->
	<element id="DATASTORE IOs" variable-id="devtype deviceid parttype part name">
            <value name="ReadRequests" value="datastore.numberReadAveraged" instance="both" instance-property="part" unit="IOPS" />
            <value name="WriteRequests" value="datastore.numberWriteAveraged" instance="both" instance-property="part" unit="IOPS" />
            <value name="ReadThroughput" value="datastore.read" instance="both" instance-property="part" unit="MB/s" />
            <value name="WriteThroughput" value="datastore.write" instance="both" instance-property="part" unit="MB/s" />
            <value name="ReadLatency" value="datastore.totalReadLatency" instance="both" instance-property="part" type="counter" unit="ms" />
            <value name="WriteLatency" value="datastore.totalWriteLatency" instance="both" instance-property="part" type="counter" unit="ms" />
            <property name="parttype" type="hard-coded" value="Datastore" />
        </element>

        [/#if]
    </element>

    <!-- Polling all the datastores on the MOB -->
    <element id="DATASTORE" type="Datastore" filter=".*" variable-id="devtype url name">
        <datastore path=".">
            <property name="datagrp" type="hard-coded" value="VCENTER-DS" />
            <property name="w4ncert" type="hard-coded" value="1.0" />
            <property name="parttype" value="Datastore" type="hard-coded" />
            <property name="devtype" value="Datastore" type="hard-coded" />
            <property name="dsclustr" value=" " type="hard-coded" />
            <property name="isclust" value="false" type="hard-coded" />
            <property name="devdesc" type="data" value="summary.name" />
            <property name="part" value="name" type="data" />
            <property name="dsname" value="name" type="data" />
            <property name="type" type="data" value="summary.type" />
            <property name="status" value="overallStatus" type="data" />
            <property name="shared" value="summary.multipleHostAccess" type="data" />
            <property name="url" type="data" value="summary.url" />

            <mor path="parent">
                <property name="rparentn" type="data" value="name" />
                <property name="rparentt" type="data" value="%MOT%" />
                <mor path="parent">
                    <property name="rparent1n" type="data" value="name" />
                    <property name="rparent1t" type="data" value="%MOT%" />
                    <mor path="parent">
                        <property name="rparent2n" type="data" value="name" />
                        <property name="rparent2t" type="data" value="%MOT%" />
                        <mor path="parent">
                            <property name="rparent3n" type="data" value="name" />
                            <property name="rparent3t" type="data" value="%MOT%" />
                            <mor path="parent">
                                <property name="rparent4n" type="data" value="name" />
                                <property name="rparent4t" type="data" value="%MOT%" />
                                <mor path="parent">
                                    <property name="rparent5n" type="data" value="name" />
                                    <property name="rparent5t" type="data" value="%MOT%" />
                                    <mor path="parent">
                                        <property name="rparent6n" type="data" value="name" />
                                        <property name="rparent6t" type="data" value="%MOT%" />
                                        <mor path="parent">
                                            <property name="rparent7n" type="data" value="name" />
                                            <property name="rparent7t" type="data" value="%MOT%" />
                                            <mor path="parent">
                                                <property name="rparent8n" type="data" value="name" />
                                                <property name="rparent8t" type="data" value="%MOT%" />
                                            </mor>
                                        </mor>
                                    </mor>
                                </mor>
                            </mor>
                        </mor>
                    </mor>
                </mor>
            </mor>

            <array path="host">
                <mor path="key">
                    <property name="esx" value="name" />
                </mor>
            </array>

            <datastore-info path="info">
                <property name="rootnas" type="data" value="nas.remoteHost" />
                <property name="rootpath" type="data" value="nas.remotePath" />
		<property name="dsscsiid" type="data" value="vvolDS.scId" />
                <array path="vmfs.extent">
                    <property name="partsn" value="diskName" />
                </array>
		<array path="vvolDS.hostPE">
                	<mor path="key">
                    		<property name="peesx" value="name" />
                	</mor>
                        <array path="protocolEndpoint">
                    		<property name="partsn" value="uuid" />
                    		<property name="petype" value="peType" />
                    		<property name="pearray" value="storageArray" />
                	</array>
                </array>

                 <array path="vvolDS.storageArray">
                    <property name="arrayuid" value="uuid" />
                    <property name="array" value="name" />
                    <property name="arrayVID" value="vendorId" />
                </array>

		 <array path="vvolDS.vasaProviderInfo">
                    <property name="vpname" value="provider.name" />
                    <property name="vpurl" value="provider.url" />
                    <array path="arrayState">
                    	<property name="vparray" value="arrayId" />
                    	<property name="vparrsta" value="active" />
                    	<property name="priority" value="priority" />
                    </array>
                </array>
            </datastore-info>

            <value name="Capacity" value="summary.capacity" unit="GB" />
            <value name="FreeCapacity" value="summary.freeSpace" unit="GB" />
            <value name="Uncommitted" value="summary.uncommitted" unit="GB" />
        </datastore>
    </element>

    <!-- Polling all the ESXs on the MOB -->
    <element id="ESX" type="HostSystem" filter=".*" devtype="Hypervisor" variable-id="devtype device parttype part name">
        <value name="Availability" value="runtime.powerState" type="property-value" unit="%">
            <replace value="poweredOn" by="100" />
            <replace value="poweredOff" by="0" />
            <replace value="suspended" by="0" />
            <replace value="unknown" by="0" />
        </value>
        <property name="datagrp" type="hard-coded" value="VCENTER-ESX" />
        <property name="w4ncert" type="hard-coded" value="1.0" />
        <property name="product" type="data" value="config.product.fullName" />
        <property name="maintmod" type="data" value="runtime.inMaintenanceMode" />
        <property name="model" type="data" value="hardware.systemInfo.model" />
        <property name="vendor" type="data" value="hardware.systemInfo.vendor" />
        <property name="nbnic" type="data" value="summary.hardware.numNics" />
        <property name="nbcpu" type="data" value="hardware.cpuInfo.numCpuPackages" />
        <property name="nbcore" type="data" value="hardware.cpuInfo.numCpuCores" />
        <property name="deviceid" type="data" value="hardware.systemInfo.uuid" />
        <property name="PwPolicy" type="data" value="hardware.cpuPowerManagementInfo.currentPolicy" />
        <property name="reboot" type="data" value="summary.rebootRequired" />
        <property name="vcip" type="data" value="summary.managementServerIp" />
        <property name="devdesc" type="data" value="summary.config.product.fullName" />
        <property name="domain" type="data" value="config.network.dnsConfig.domainName" />
        <property name="hypervsr" type="data" value="summary.config.name" />
        <property name="status" type="data" value="summary.overallStatus">
            <replace value="green" by="Normal" />
            <replace value="yellow" by="Warning" />
            <replace value="red" by="Alert" />
			<replace value="gray" by="Unknown" />
        </property>
        <property name="vmotion" type="data" value="summary.config.vmotionEnabled">
            <replace value="true" by="Yes" />
            <replace value="false" by="No" />
        </property>
        <!-- vm kernel port used for vmotion -->
        <property name="vmotkp" type="data" value="config.vmotion.netConfig.selectedVnic" />
        <property name="vmotip" type="data" value="config.vmotion.ipConfig.ipAddress" />


        <property name="collhost" type="hard-coded" value="${apg.hostname}" />
        <property name="collinst" type="hard-coded" value="${module['vmware-collector'].instance}" />

        <!-- All VM kernel port details -->
        <mor path="configManager.vmotionSystem">
            <array path="netConfig.candidateVnic">
                <property name="kpname" type="data" value="device" />
                <property name="vnickey" type="data" value="key" />
                <property name="vportgrp" type="data" value="portgroup" />
                <property name="vkpip" type="data" value="spec.ip.ipAddress" />
                <property name="kpsubnet" type="data" value="spec.ip.subnetMask" />
            </array>
        </mor>

        <mor path="parent">
            <property name="parentn" type="data" value="name" />
            <property name="parentt" type="data" value="%MOT%" />
            <mor path="parent">
                <property name="parent1n" type="data" value="name" />
                <property name="parent1t" type="data" value="%MOT%" />
                <mor path="parent">
                    <property name="parent2n" type="data" value="name" />
                    <property name="parent2t" type="data" value="%MOT%" />
                    <mor path="parent">
                        <property name="parent3n" type="data" value="name" />
                        <property name="parent3t" type="data" value="%MOT%" />
                        <mor path="parent">
                            <property name="parent4n" type="data" value="name" />
                            <property name="parent4t" type="data" value="%MOT%" />
                            <mor path="parent">
                                <property name="parent5n" type="data" value="name" />
                                <property name="parent5t" type="data" value="%MOT%" />
                                <mor path="parent">
                                    <property name="parent6n" type="data" value="name" />
                                    <property name="parent6t" type="data" value="%MOT%" />
                                    <mor path="parent">
                                        <property name="parent7n" type="data" value="name" />
                                        <property name="parent7t" type="data" value="%MOT%" />
                                        <mor path="parent">
                                            <property name="parent8n" type="data" value="name" />
                                            <property name="parent8t" type="data" value="%MOT%" />
                                        </mor>
                                    </mor>
                                </mor>
                            </mor>
                        </mor>
                    </mor>
                </mor>
            </mor>
        </mor>

        <!-- ALL FC in one part: -->
        <mor path="configManager.storageSystem">
            <array path="storageDeviceInfo.hostBusAdapter" restrict-on="HostFibreChannelHba">
                <property name="allfcwwn" type="data" value="portWorldWideName" />
                <property name="allfcbus" type="data" value="device" />
                <property name="allfcnod" type="data" value="nodeWorldWideName" />
                <property name="allfcmdl" type="data" value="model" />
            </array>
        </mor>

        <!-- multipath software plugin names details -->
        <mor path="configManager.storageSystem">
            <array path="storageDeviceInfo.plugStoreTopology.plugin">
                <property name="plugins" type="data" value="name" />
            </array>
        </mor>

        <element id="DATASTORES" variable-id="device parttype part name">
            <mor-array path="datastore">
                <property name="parttype" type="hard-coded" value="Datastore" />
                <property name="part" type="data" value="name" />
                <property name="linkedto" value="name" type="data" />
                <property name="dsurl" type="data" value="summary.url" />
                <property name="type" type="data" value="summary.type" />
                <value name="Availability" value="name" unit="%" type="property-value">
                    <replace value=".*" by="100" type="regex" />
                </value>
            </mor-array>
        </element>
                
        <!-- FC Ports with more details like vendor etc -->
        <element id="FCPORTS" variable-id="deviceid parttype part name">
            <grouped-by-columns-array path="config.storageDevice.hostBusAdapter" restrict-on="HostFibreChannelHba">
                <property name="fcbus" type="data" value="device" />
                <property name="fcnod" type="data" value="nodeWorldWideName" />
                <property name="pmodel" type="data" value="model" />
                <property name="pci" type="data" value="pci" />
                <property name="hbadrv" type="data" value="driver" />
                <property name="partstat" type="data" value="status" />
                <property name="key" type="data" value="key" />
                <property name="busnum" type="data" value="bus" />
                <property name="parttype" type="hard-coded" value="Port" />
                <property name="adaptype" type="hard-coded" value="FibreChannelHBA" />
                <property name="partsn" type="data" value="portWorldWideName" />
                <property name="part" type="data" value="device" />
                <value name="Availability" value="status" unit="%">
                    <replace value="online" by="100" />
                    <replace value="down" by="0" />
                    <replace value="unknown" by="0" />
                    <replace value="offline" by="0" />
                    <replace value="fault" by="0" />
                </value>
            </grouped-by-columns-array>
        </element>

        <!-- Disk device paths in ESX -->
        <element id="DISKPATH" variable-id="deviceid parttype part name">
            <grouped-by-columns-array path="config.storageDevice.plugStoreTopology.path">
                <property name="parttype" type="hard-coded" value="DiskPath" />
                <property name="part" type="data" value="name" />
                <property name="lunn" type="data" value="lunNumber" />
                <property name="targetn" type="data" value="targetNumber" />
                <property name="adaptern" type="data" value="adapter" />
                <property name="chann" type="data" value="channelNumber" />
                <value name="Reachability" value="channelNumber" unit="%">
                    <replace value=".*" by="100" type="regex" />
                </value>
            </grouped-by-columns-array>
        </element>

        <!-- Disk multi path states in ESX -->
        <element id="MULTIPATHSTATE" variable-id="deviceid parttype part name">
            <grouped-by-columns-array path="config.multipathState.path">
                <property name="parttype" type="hard-coded" value="DiskPath" />
                <property name="part" type="data" value="name" />
                <value name="Availability" value="pathState" unit="%">
                    <replace value="active" by="100" />
                    <replace value="standby" by="50" />
                    <replace value="unknown" by="0" />
                    <replace value="dead" by="0" />
                    <replace value="disabled" by="0" />
                </value>
            </grouped-by-columns-array>
        </element>

        <!-- Disk devices in ESX -->
        <element id="SCSIDISK" variable-id="deviceid parttype part name" allow-missing-property="true">
            <grouped-by-columns-array path="config.storageDevice.scsiLun">
                <property name="parttype" type="hard-coded" value="Disk" />
                <property name="part" type="data" value="canonicalName" />
                <property name="uuid" type="data" value="uuid" />
                <property name="dmodel" type="data" value="model" />
                <property name="dvendor" type="data" value="vendor" />
                <property name="dispname" type="data" value="displayName" />
                <property name="key" type="data" value="key" />
                <property name="luntype" type="data" value="lunType" />
                <property name="scsilvl" type="data" value="scsiLevel" />
                <property name="partstat" type="data" value="operationalState" />
                <property name="blk" type="data" value="capacity.block" />
                <property name="blksize" type="data" value="capacity.blockSize" />
		<property name="protoend" type="data" value="protocolEndpoint" />
                <value name="Availability" value="scsiLevel" unit="%">
                    <replace value=".*" by="100" type="regex" />
                    <replace value="ok.*" by="100" type="regex" />
                    <replace value="degrade.*" by="50" type="regex" />
                    <replace value="quiesced.*" by="0" type="regex" />
                    <replace value="off.*" by="0" type="regex" />
                    <replace value="unknownState.*" by="0" type="regex" />
                    <replace value="lostCommunication.*" by="0" type="regex" />
                    <replace value="error.*" by="0" type="regex" />
                    <replace value="timeout.*" by="0" type="regex" />
                </value>
                <value name="Capacity" value="scsiLevel" unit="GB">
                    <replace value=".*" by="1" type="regex" />
                </value>
            </grouped-by-columns-array>
        </element>

        <element id="INTERFACE" variable-id="devtype device parttype part name">
            <value name="Throughput" instance="children" value="net.usage" type="counter" unit="MB/s" />
            [#if (common.collection_stat_level >= 3)]
            <value name="InPackets" instance="children" value="net.packetsRx" rollup-type="summation" unit="number" />
            <value name="OutPackets" instance="children" value="net.packetsTx" rollup-type="summation" unit="number" />
            <value name="Received" instance="children" value="net.received" unit="MB/s" />
            <value name="Transmitted" instance="children" value="net.transmitted" unit="MB/s" />
            [/#if]
            <property name="parttype" type="hard-coded" value="Interface" />
            <!-- the part will be appended with the interface name so let it empty -->
            <property name="part" type="hard-coded" value="" />
        </element>

        <element id="CPU" variable-id="devtype device parttype part name">
            <value name="CurrentUtilization" value="cpu.usage" type="counter" unit="%" />
            <value name="UsageMHz" value="cpu.usagemhz" unit="MHz" />
            <value name="ProcessorSize" type="property-value" value="hardware.cpuInfo.hz" unit="Hz" />
            <property name="parttype" type="hard-coded" value="Processor" />
            <property name="part" type="hard-coded" value="System" />
            <property name="partdesc" type="data" value="summary.hardware.cpuModel" />
            <property name="procsz" type="data" value="hardware.cpuInfo.hz">
                <replace value="" by="1" />
                <replace value="0" by="1" />
            </property>
        </element>

        [#if (common.collection_stat_level >= 2) ]
        <element id="DISK" variable-id="devtype device parttype part name">
            <value name="ReadThroughput" value="disk.read" instance="both" instance-property="part" unit="MB/s" />
            <value name="WriteThroughput" value="disk.write" instance="both" instance-property="part" unit="MB/s" />
            <value name="ReadRequests" value="disk.numberReadAveraged" instance="both" instance-property="part" unit="IOPS" />
            <value name="WriteRequests" value="disk.numberWriteAveraged" instance="both" instance-property="part" unit="IOPS" />
            <value name="Latency" value="disk.totalLatency" instance="both" instance-property="part" unit="ms" />
            <value name="ReadLatency" value="disk.totalReadLatency" instance="both" instance-property="part" unit="ms" />
            <value name="WriteLatency" value="disk.totalWriteLatency" instance="both" instance-property="part" unit="ms" />
            [#if (common.collection_stat_level >= 3) ]
            <value name="QueueLatency" value="disk.queueLatency" instance="both" instance-property="part" unit="ms" />
            [/#if]
            <property name="parttype" type="hard-coded" value="Disk" />
        </element>

        <!-- FCPort Performance and Inventory Collect: -->
        <element id="FCPORT" variable-id="devtype device parttype part name">
            <value name="IORead" value="storageAdapter.numberReadAveraged" instance="both" instance-property="part" unit="IOPS" />
            <value name="IOWrite" value="storageAdapter.numberWriteAveraged" instance="both" instance-property="part" unit="IOPS" />
            [#if (common.collection_stat_level >= 3) ]
            <value name="ReadThroughput" value="storageAdapter.read" instance="both" instance-property="part" unit="MB/s" />
            <value name="WriteThroughput" value="storageAdapter.write" instance="both" instance-property="part" unit="MB/s" />
            <value name="ReadLatency" value="storageAdapter.totalReadLatency" instance="both" instance-property="part" unit="ms" />
            <value name="WriteLatency" value="storageAdapter.totalWriteLatency" instance="both" instance-property="part" unit="ms" />
            [/#if]
            <property name="parttype" type="hard-coded" value="Port" />
        </element>
	
        <!-- Datastore Performance and Inventory Collect: -->
	<element id="DATASTORE IOs" variable-id="devtype device parttype part name">
            <value name="ReadRequests" value="datastore.numberReadAveraged" instance="both" instance-property="part" unit="IOPS" />
            <value name="WriteRequests" value="datastore.numberWriteAveraged" instance="both" instance-property="part" unit="IOPS" />
            <value name="ReadThroughput" value="datastore.read" instance="both" instance-property="part" unit="MB/s" />
            <value name="WriteThroughput" value="datastore.write" instance="both" instance-property="part" unit="MB/s" />
            <value name="ReadLatency" value="datastore.totalReadLatency" instance="both" instance-property="part" type="counter" unit="ms" />
            <value name="WriteLatency" value="datastore.totalWriteLatency" instance="both" instance-property="part" type="counter" unit="ms" />
            <property name="parttype" type="hard-coded" value="Datastore" />
        </element>

        [/#if]

        <element id="MEMORY" variable-id="devtype device parttype part name">
            <value name="CurrentUtilization" value="mem.usage" type="counter" unit="%" />
            [#if (common.collection_stat_level >= 2)]
            <value name="Granted" value="mem.granted" unit="MB" />
            <value name="Active" value="mem.active" unit="MB" />
            <value name="Shared" value="mem.shared" unit="MB" />
            <value name="SharedCommon" value="mem.sharedcommon" unit="MB" />
            [/#if]
            <value name="Balloon" value="mem.vmmemctl" unit="MB" />
            <value name="SwapUsed" value="mem.swapused" unit="MB" />
            <value name="SwapIn" value="mem.swapinRate" unit="MB/s" />
            <value name="SwapOut" value="mem.swapoutRate" unit="MB/s" />
            <value name="TotalMemory" type="property-value" value="summary.hardware.memorySize" unit="MB" />
            <property name="parttype" type="hard-coded" value="Memory" />
            <property name="part" type="hard-coded" value="System" />
        </element>

        [#if (common.collection_stat_level >= 3)]
        <!-- Physical NIC card details -->
        <element id="INTERFACES" variable-id="deviceid parttype part name" allow-missing-property="true">
            <grouped-by-columns-array path="config.network.pnic">
                <property name="parttype" type="hard-coded" value="Interface" />
                <property name="linspeed" type="data" value="linkSpeed.speedMb" />
                <property name="part" type="data" value="device" />
                <value name="Availability" value="driver" unit="%">
                    <replace value="" by="0" />
                    <replace value=".*" by="100" type="regex" />
                </value>
            </grouped-by-columns-array>
        </element>

        <!-- NIC Port group details -->
        <element id="PORTGROUPS" variable-id="deviceid parttype part name" allow-missing-property="true">
            <grouped-by-columns-array path="config.network.portgroup">
                <property name="parttype" type="hard-coded" value="PortGroup" />
                <property name="actvenic" type="data" value="computedPolicy.nicTeaming.nicOrder.activeNic" />
                <property name="vlanid" type="data" value="spec.vlanId" />
                <property name="part" type="data" value="spec.name" />
                <property name="vswitch" type="data" value="vswitch" />
                <value name="Reachability" value="spec.vlanId" unit="%">
                    <replace value=".*" by="100" type="regex" />
                </value>
            </grouped-by-columns-array>
        </element>

        <element id="SENSORS" variable-id="devtype device parttype part name">
            <property name="parttype" type="hard-coded" value="Sensor" />
            <property name="part" type="hard-coded" value="System" />
            <sensors path="runtime.healthSystemRuntime.systemHealthInfo.numericSensorInfo">
                <name-regex used-group="1">([\w\s]+\w)*\s*[-]+(.*)</name-regex>
                <sensor-name-property>name</sensor-name-property>
                <value value="power" unit=".+" />
                <value value="voltage" unit=".+" />
                <value value="fan" unit=".+" />
            </sensors>
        </element>

        <element id="PLUGINS" variable-id="deviceid parttype part name">
            <grouped-by-columns-array path="config.storageDevice.plugStoreTopology.plugin">
                <property name="parttype" type="hard-coded" value="Multipath" />
                <property name="part" type="data" value="name" />
                <value name="Availability" value="name" unit="%">
                    <replace value="NMP" by="100" />
                    <replace value=".*" by="0" type="regex" />
                </value>
            </grouped-by-columns-array>
        </element>
        [/#if]

        <!-- IP address -->
        <element id="VIRTUALNIC" variable-id="deviceid parttype part name">
            <grouped-by-columns-array path="config.network.vnic">
                <property name="part" type="data" value="device" />
                <property name="parttype" type="hard-coded" value="VirtualNic" />
                <property name="ip" type="data" value="spec.ip.ipAddress" /> <!-- if portgroup == "Management Network" || spec.portgroup == "Management Network" -->
                <property name="portgrp" type="data" value="portgroup" />
                <property name="mac" type="data" value="spec.mac" />
                <value name="Availability" value="device" unit="%">
                    <replace value=".*" by="100" type="regex" />
                </value>
            </grouped-by-columns-array>
        </element>

        <!-- vSwitch -->
        <element id="VSWITCH" variable-id="deviceid parttype part name">
            <grouped-by-columns-array path="config.network.vswitch">
                <property name="part" type="data" value="name" />
                <property name="parttype" type="hard-coded" value="VirtualSwitch" />
                <value name="Availability" value="name" unit="%">
                    <replace value=".*" by="100" type="regex" />
                </value>
            </grouped-by-columns-array>
        </element>
    </element>

    <!-- Polling all the DVS on the MOB -->
    <element id="DVSWITCH" type="VmwareDistributedVirtualSwitch" filter=".*" devtype="DistributedVirtualSwitch" variable-id="devtype deviceid name">

        <value name="Availability" value="configStatus" type="property-value">
            <replace value="green" by="100" />
            <replace value="yellow" by="90" />
            <replace value="red" by="0" />
        </value>

        <property name="datagrp" type="hard-coded" value="VCENTER-DVSWITCH" />
        <property name="w4ncert" type="hard-coded" value="1.0" />
        <property name="deviceid" type="data" value="uuid" />
        <property name="device" type="data" value="name" />

        <!-- DVPortGroup on the DVS -->
        <element id="DVPORTGROUP" variable-id="deviceid parttype part name">
            <mor-array path="portgroup">
                <property name="part" type="data" value="name" />
                <property name="parttype" type="hard-coded" value="DVPortGroup" />
                <value name="Availability" value="configStatus" unit="%" type="property-value">
                    <replace value="green" by="100" />
                    <replace value="yellow" by="90" />
                    <replace value="red" by="0" />
                </value>
            </mor-array>
        </element>
    </element>

</configuration>

Collector Datastore Configuration

<configuration xmlns="http://www.watch4net.com/VMWare-Collector" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.watch4net.com/VMWare-Collector ./vmware-collector.xsd ">

    <!-- The number of thread that will parse each element (MOB entity) in parallel -->
    <collecting-threads>${common.collectingthreads}</collecting-threads>
    <!-- The time in seconds between to polling -->
    <polling-interval>${common.pollingper}</polling-interval>
    <!-- The time in seconds between a full synchronization (update the properties, entities and inventory cache -->
    <resync-interval>${common.resyncintervalper}</resync-interval>
    <!-- Periodically setting a +r. Default value 1 hour in seconds -->
    <periodic-refresh>3600s</periodic-refresh>
    <!-- The APG collecting group -->
    <collecting-group>group</collecting-group>
    <!-- The APG collecting source -->
    <source>VMWareCollector</source>

    <!-- The vSphere service URL -->
    [#if connection??]
    [#list connection as vcenter]
    <connection timeout="180s">
        <url>https://${vcenter.primary.vcenter.host?string?xml}/sdk/vimService</url>
        <username>${vcenter.primary.vcenter.username?string?xml}</username>
        <password>${vcenter.primary.vcenter.password}</password>
        <connection-properties name="vcenter">${vcenter.primary.vcenter.host?string?xml}</connection-properties>
    </connection>
    [/#list]
    [/#if]
    <!-- The property separator when a single field contains an array -->
    <property-separator>|</property-separator>

    <!-- Polling all the datastore clusters on the MOB -->
    <element id="DATASTORECluster" type="StoragePod" filter=".*" variable-id="device name">
        <value name="Capacity" value="summary.capacity" unit="GB" type="property-value" />
        <value name="FreeCapacity" value="summary.freeSpace" unit="GB" type="property-value" />
        <property name="datagrp" type="hard-coded" value="VCENTER-DS" />
        <property name="w4ncert" type="hard-coded" value="1.0" />
        <property name="devtype" value="DatastoreCluster" type="hard-coded" />
        <property name="devdesc" type="data" value="summary.name" />
        <property name="parttype" value="DatastoreCluster" type="hard-coded" />
        <property name="device" type="data" value="name" />
        <property name="part" value="name" type="data" />

        <mor path="parent">
            <property name="dparentn" type="data" value="name" />
            <property name="dparentt" type="data" value="%MOT%" />
            <mor path="parent">
                <property name="dparent1n" type="data" value="name" />
                <property name="dparent1t" type="data" value="%MOT%" />
                <mor path="parent">
                    <property name="dparent2n" type="data" value="name" />
                    <property name="dparent2t" type="data" value="%MOT%" />
                    <mor path="parent">
                        <property name="dparent3n" type="data" value="name" />
                        <property name="dparent3t" type="data" value="%MOT%" />
                        <mor path="parent">
                            <property name="dparent4n" type="data" value="name" />
                            <property name="dparent4t" type="data" value="%MOT%" />
                            <mor path="parent">
                                <property name="dparent5n" type="data" value="name" />
                                <property name="dparent5t" type="data" value="%MOT%" />
                                <mor path="parent">
                                    <property name="dparent6n" type="data" value="name" />
                                    <property name="dparent6t" type="data" value="%MOT%" />
                                    <mor path="parent">
                                        <property name="dparent7n" type="data" value="name" />
                                        <property name="dparent7t" type="data" value="%MOT%" />
                                        <mor path="parent">
                                            <property name="dparent8n" type="data" value="name" />
                                            <property name="dparent8t" type="data" value="%MOT%" />
                                        </mor>
                                    </mor>
                                </mor>
                            </mor>
                        </mor>
                    </mor>
                </mor>
            </mor>
        </mor>
    </element>

</configuration>

VMwareCollectorVMFiles Config

<configuration xmlns="http://www.watch4net.com/VMWare-Collector" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.watch4net.com/VMWare-Collector ./vmware-collector.xsd ">    <!-- The number of thread that will parse each element (MOB entity) in parallel -->    <collecting-threads>${common.vmfilescollectingthreads}</collecting-threads>    <!-- The time in seconds between to polling -->    <polling-interval>${common.vmfilespollingper}</polling-interval>    <!-- The time in seconds between a full synchronization (update the properties, entities and inventory cache -->    <resync-interval>${common.resyncintervalper}</resync-interval>    <!-- Periodically setting a +r. Default value 1 hour in seconds -->    <periodic-refresh>3600s</periodic-refresh>    <!-- The APG collecting group -->    <collecting-group>group</collecting-group>    <!-- The APG collecting source -->    <source>VMWareCollector</source>    <!-- The vSphere service URL -->    [#if connection??]    [#list connection as vcenter]    <connection timeout="180s">        <url>https://${vcenter.primary.vcenter.host?string?xml}/sdk/vimService</url>        <username>${vcenter.primary.vcenter.username?string?xml}</username>        <password>${vcenter.primary.vcenter.password}</password>        <connection-properties name="vcenter">${vcenter.primary.vcenter.host?string?xml}</connection-properties>    </connection>    [/#list]    [/#if]    <!-- The property separator when a single field contains an array -->    <property-separator>|</property-separator>    <!-- Polling every VMs on the MOB -->    <element id="VM" type="VirtualMachine" filter=".*" variable-id="deviceid name" allow-missing-property="true">   <value name="RemoveMeZero" value="summary.config.name" type="property-value" unit="GB">            <replace value=".*" by="0" type="regex" />        </value>        <property name="datagrp" type="hard-coded" value="VCENTER-VMFILES" />        <property name="w4ncert" type="hard-coded" value="1.0" />        <property name="hastatus" type="hard-coded" value="VM" />        <property name="device" type="data" value="name" />        <property name="deviceid" type="data" value="config.instanceUuid" />        <property name="serialnb" type="data" value="config.uuid" />        <property name="path" type="data" value="summary.config.vmPathName" />        <property name="status" type="data" value="summary.overallStatus">            <replace value="green" by="Normal" />            <replace value="yellow" by="Warning" />            <replace value="red" by="Alert" />         <replace value="gray" by="Unknown" />        </property>        <property name="currsnap" type="data" value="snapshot.currentSnapshot">            <replace value="" by="0" />            <replace value="com.vmware.*" by="1" type="regex" />        </property>        <property name="ip" type="data" value="guest.ipAddress" />        <property name="tmphstat" type="data" value="config.managedBy.type">            <replace value="placeholderVm" by="Placeholder VM" />            <replace value="hms" by="HMS VM" />        </property>        <property name="fqdn" type="data" value="guest.hostName" />        <property name="hostname" type="data" value="guest.hostName" />        <property name="domain" type="hard-coded" value="N/A" />        <property name="devdesc" type="data" value="guest.guestFullName" />        <property name="toolvr" type="data" value="guest.toolsVersion" />        <property name="toolvrs" type="data" value="guest.toolsVersionStatus2" >            <replace value="guestToolsBlacklisted" by="Blacklisted, Immediately Upgrade" />            <replace value="guestToolsCurrent" by="Current" />            <replace value="guestToolsNeedUpgrade" by="Need Upgrade" />            <replace value="guestToolsNotInstalled" by="Not Installed" />            <replace value="guestToolsSupportedNew" by="Current" />            <replace value="guestToolsSupportedOld" by="Supported, Can Upgrade" />            <replace value="guestToolsTooNew" by="Invalid newer version" />            <replace value="guestToolsTooOld" by="Invalid older version" />            <replace value="guestToolsUnmanaged" by="3rd Party Install" />        </property>        <property name="toolstat" type="data" value="guest.toolsRunningStatus">            <replace value="guestToolsNotRunning" by="Not Running" />            <replace value="guestToolsNotInstalled" by="Not Installed" />            <replace value="guestToolsCurrent" by="Current" />            <replace value="guestToolsRunning" by="Running" />            <replace value="guestToolsNeedUpgrade" by="Need Upgrade" />            <replace value="guestToolsUnmanaged" by="Unmanaged" />        </property>        <!-- NPIV port wwns -->        <property name="npivnode" type="data" value="config.npivNodeWorldWideName" />        <property name="npivport" type="data" value="config.npivPortWorldWideName" />        <property name="nbcpu" type="data" value="config.hardware.numCPU" />        <property name="template" type="data" value="summary.config.template" />        <mor path="resourcePool">            <property name="rparentn" type="data" value="name" />            <property name="rparentt" type="data" value="%MOT%" />            <mor path="parent">                <property name="rparent1n" type="data" value="name" />                <property name="rparent1t" type="data" value="%MOT%" />                <mor path="parent">                    <property name="rparent2n" type="data" value="name" />                    <property name="rparent2t" type="data" value="%MOT%" />                    <mor path="parent">                        <property name="rparent3n" type="data" value="name" />                        <property name="rparent3t" type="data" value="%MOT%" />                        <mor path="parent">                            <property name="rparent4n" type="data" value="name" />                            <property name="rparent4t" type="data" value="%MOT%" />                            <mor path="parent">                                <property name="rparent5n" type="data" value="name" />                                <property name="rparent5t" type="data" value="%MOT%" />                                <mor path="parent">                                    <property name="rparent6n" type="data" value="name" />                                    <property name="rparent6t" type="data" value="%MOT%" />                                    <mor path="parent">                                        <property name="rparent7n" type="data" value="name" />                                        <property name="rparent7t" type="data" value="%MOT%" />                                        <mor path="parent">                                            <property name="rparent8n" type="data" value="name" />                                            <property name="rparent8t" type="data" value="%MOT%" />                                        </mor>                                    </mor>                                </mor>                            </mor>                        </mor>                    </mor>                </mor>            </mor>        </mor>        <mor path="parent">            <property name="parentn" type="data" value="name" />            <property name="parentt" type="data" value="%MOT%" />            <mor path="parent">                <property name="parent1n" type="data" value="name" />                <property name="parent1t" type="data" value="%MOT%" />                <mor path="parent">                    <property name="parent2n" type="data" value="name" />                    <property name="parent2t" type="data" value="%MOT%" />                    <mor path="parent">                        <property name="parent3n" type="data" value="name" />                        <property name="parent3t" type="data" value="%MOT%" />                        <mor path="parent">                            <property name="parent4n" type="data" value="name" />                            <property name="parent4t" type="data" value="%MOT%" />                            <mor path="parent">                                <property name="parent5n" type="data" value="name" />                                <property name="parent5t" type="data" value="%MOT%" />                                <mor path="parent">                                    <property name="parent6n" type="data" value="name" />                                    <property name="parent6t" type="data" value="%MOT%" />                                    <mor path="parent">                                        <property name="parent7n" type="data" value="name" />                                        <property name="parent7t" type="data" value="%MOT%" />                                        <mor path="parent">                                            <property name="parent8n" type="data" value="name" />                                            <property name="parent8t" type="data" value="%MOT%" />                                        </mor>                                    </mor>                                </mor>                            </mor>                        </mor>                    </mor>                </mor>            </mor>        </mor>        <mor path="parentVApp">            <property name="vparentn" type="data" value="name" />            <property name="vparentt" type="data" value="%MOT%" />            <mor path="parentFolder">                <property name="vparent1n" type="data" value="name" />                <property name="vparent1t" type="data" value="%MOT%" />                <mor path="parent">                    <property name="vparent2n" type="data" value="name" />                    <property name="vparent2t" type="data" value="%MOT%" />                    <mor path="parent">                        <property name="vparent3n" type="data" value="name" />                        <property name="vparent3t" type="data" value="%MOT%" />                        <mor path="parent">                            <property name="vparent4n" type="data" value="name" />                            <property name="vparent4t" type="data" value="%MOT%" />                            <mor path="parent">                                <property name="vparent5n" type="data" value="name" />                                <property name="vparent5t" type="data" value="%MOT%" />                                <mor path="parent">                                    <property name="vparent6n" type="data" value="name" />                                    <property name="vparent6t" type="data" value="%MOT%" />                                    <mor path="parent">                                        <property name="vparent7n" type="data" value="name" />                                        <property name="vparent7t" type="data" value="%MOT%" />                                        <mor path="parent">                                            <property name="vparent8n" type="data" value="name" />                                            <property name="vparent8t" type="data" value="%MOT%" />                                        </mor>                                    </mor>                                </mor>                            </mor>                        </mor>                    </mor>                </mor>            </mor>            <mor path="parentVApp">            <property name="vparentn" type="data" value="name" />            <property name="vparentt" type="data" value="%MOT%" />                <mor path="parentFolder">                <property name="vparent1n" type="data" value="name" />                <property name="vparent1t" type="data" value="%MOT%" />                <mor path="parent">                    <property name="vparent2n" type="data" value="name" />                    <property name="vparent2t" type="data" value="%MOT%" />                    <mor path="parent">                        <property name="vparent3n" type="data" value="name" />                        <property name="vparent3t" type="data" value="%MOT%" />                        <mor path="parent">                            <property name="vparent4n" type="data" value="name" />                            <property name="vparent4t" type="data" value="%MOT%" />                            <mor path="parent">                                <property name="vparent5n" type="data" value="name" />                                <property name="vparent5t" type="data" value="%MOT%" />                                <mor path="parent">                                    <property name="vparent6n" type="data" value="name" />                                    <property name="vparent6t" type="data" value="%MOT%" />                                    <mor path="parent">                                        <property name="vparent7n" type="data" value="name" />                                        <property name="vparent7t" type="data" value="%MOT%" />                                        <mor path="parent">                                            <property name="vparent8n" type="data" value="name" />                                            <property name="vparent8t" type="data" value="%MOT%" />                                        </mor>                                    </mor>                                </mor>                            </mor>                        </mor>                    </mor>                </mor>            </mor>            </mor>        </mor>        <mor path="runtime.host">            <property name="hypervsr" type="data" value="name" />        </mor>        <element id="FILE" variable-id="deviceid parttype part name" allow-missing-property="true">            <grouped-by-columns-array path="layoutEx.file">                <property name="part" value="name" type="data" />      <property name="partsn" value="backingObjectId" type="data" />                <property name="filetype" value="type" type="data" />                <property name="parttype" value="File" type="hard-coded" />                <value name="Capacity" value="size" unit="GB" />            </grouped-by-columns-array>        </element>    </element></configuration>

Create templates for the following in the collector-package/templates directory

  1. collector-manager

    1. conf

      1. Collecting.xml.ftl

      2. module.properties.ftl

  2. kafka-connector

    1. conf

      1. kafka-connector.xml.ftl

  3. cross-referencing-filter

    1. conf

      1. crf_isused.xml

  4. group-filter

    1. conf

      1. gf-file-datastore-vvol.xml.ftl

      2. gf-vmfiles.xml.ftl

      3. virtualdiskfiles.xml

      4. virtualdiskpart.xml

      5. virtualdiskpart-rdm.xml

  5. inline-calculation-filter

    1. Conf

      1. icf-vmware-presentedcap.xml.ftl

  6. property-concat-filter

    1. conf

      1. property-concat-filter-vmware.xml

  7. property-tagging-filter

    1. conf

      1. PTF-Zero-Tagging.xml

      2. vmware-tagging-disk-to-file.csv

      3. vmware-tagging-fcwwn.csv

      4. vmware-tagging-fcwwn.xml

      5. vmware-tagging-nfsds.csv

      6. vmware-tagging-nfsds2.csv

  8. variable-handling-filter

    1. Conf

      1. nasdevicetoip.xml

      2. Other required files are present in the examples directory

  9. vmware-collector

    1. conf

      1. vmware-collector.xml.ftl

      2. vmware-collector-datastoreclusters.xml.ftl

      3. vmware-collector-vmfiles.xml.ftl

  10. config.json

  11. config_input_schema.json

Create the following files in the collector-package directory

  1. meta_en.properties - metadata info for the Collectors.

  2. questions.txt - defined user configured parameters for the collectors

  3. questions_en.properties-- display values / description for Questions.txt

  4. spb.properties-- versions and dependent modules along with respective versions

  5. default.txt -default values for user configurable parameter

The Required Files for Example are available in the SDK under examples Directory-examples/custom_vcenter