Cloud Cruiser became HPE Consumption Analytics on Nov. 1st. You'll still see the old name in places while we update this site.

 

 

Consumption Analytics Documentation

Home > Cloud Cruiser 4 > Collecting, transforming, and publishing > VMware vSphere > Snapshot Collector

Snapshot Collector

Overview

The VMware vSphere Snapshot Collector is intended to be run hourly to capture snapshots that show which measures are allocated and used during any part of a day. The collector also generates a list of entities to drive the collection of historical data by the VMware vSphere Performance Collector.

Collector properties

This section explains the properties for the Snapshot Collector that you edit in the Create/Edit Collection wizard. Those properties are:

  • Include Datacenter: Whether to collect the name and ID of the datacenter where each collected entity resides in vSphere. When set to Yes, the XML for each entity will include a Datacenter element, as in the following example:
    <Datacenter>
      <id>datacenter-2</id>
      <name>vDC-1</name>
    </Datacenter>
  • Include Folder Path: Whether to collect the path to the folder where each entity resides in vSphere. When set to Yes, the XML for each entity will include a Folder property, as in the following example:​
    <Folder>Customer A/Sales/Production VMs</Folder>
    

In both cases, this extra XML output is not automatically captured to CC Records as dimensions. You must explicitly map these properties in the Output Fields tab of the Advanced Configuration dialog box just as you would any other properties in the XML output file.

Advanced Configuration

This section explains how to use the Advanced Configuration dialog box for a Snapshot collection. This dialog has three tabs:​ Input Settings,​ Snapshot Profiles, and​ Output Fields.

Input Settings

The properties on the Input Settings tab are also available in the basic configuration. For information, see Collector properties.

Snapshot Profiles

You must define a snapshot profile for each type of vSphere managed object for which you want to collect snapshot data, specifying the properties to retrieve for entities of that type. The collector retrieves them as an XML document. This section explains how to reference different kinds of properties in a snapshot profile.

The name , type , and id properties are collected automatically for every managed object type for which you define a snapshot profile, so you do not need to explicitly reference them. They are also automatically mapped as output fields to the dimensions EntityName, EntityType, and EntityID.

A snapshot profile consists of an entry in the tree at the top of the tab for a vSphere object type and entries in the table below it for individual properties of that object type that you want to retrieve. For a top-level snapshot profile, leave the Path field empty. For example, the following screenshot shows a snapshot profile for VirtualMachine that retrieves its datastore property:

snapshot_profile_simple.png

The following XML is an example generated by this profile:

<VirtualMachine>
  <datastore>datastore‐148</datastore>
  <name>MyVM</name>
  <type>VirtualMachine</type>
  <id>vm‐222</id>
</VirtualMachine>

You create a top-level snapshot profile for every managed object type you want to retrieve. Because the vSphere data model is hierarchical, you'll likely need to collect some information about these objects that is not a direct property but further down the hierarchy. The method for doing this depends on whether the path to the needed child property includes any managed objects.

The following sections explain how to retrieve data from child properties that have managed objects in their path, those that do not, and tags applied to an object.

Child properties with a managed object in their path

When the path from the top-level managed object for which you created a snapshot profile to a child property you want to retrieve contains one or more managed objects, you must create a nested snapshot profile for each managed object in that hierarchy, providing both its path from the top-level object and the name of its object type.

For example, the property indicating the product name of the host system for a VM is VirtualMachine.runtime.host.config.product.fullName. One of the properties in this path between the snapshot profile object and the target property, host, is a managed object (HostSystem). The following snapshot profiles retrieve VirtualMachine.runtime.host.config.product.fullName along with two other child properties with the same managed object in their paths:

snapshot_profile_managedchildren.png

The following XML is an example generated by this profile:

<VirtualMachine>
  <HostSystem>
    <config>
      <product>
        <fullName>VMware ESXi 5.1.0 build‐799733</fullName>
        <osType>vmnix‐x86</osType>
        <version>5.1.0</version>
      </product>
    </config>
  </HostSystem>
  <name>MyVM</name>
  <type>VirtualMachine</type>
  <id>vm‐222</id>
</VirtualMachine>

Nested profiles are evaluated after retrieving the properties for the parent profile. You can nest profiles to multiple levels as needed.

For more information about object types and available properties, see the VMware vSphere API Reference.

Child properties with only data objects in their path

When the path from the top-level managed object for which you created a snapshot profile to a child property you want to retrieve contains only vSphere data objects, you can specify the property in the Properties list with dot notation.

For example, the property indicating the virtual CPU count of a VM is VirtualMachine.summary.config.numCpu. The two properties in this path between the snapshot profile object and the target property, summary and config, are both data objects (VirtualMachineSummary and VirtualMachineConfigSummary, respectively). The following snapshot profile retrieves VirtualMachine.summary.config.numCpu along with two other child properties that have only data objects between themselves and VirtualMachine:

snapshot_profile_datachildren.png

The following XML is an example generated by this profile:

<VirtualMachine>
  <config>
    <extraConfig>
      <OptionValue>
        <key>virtualHW.productCompatibility</key>
        <value type="xs:string">hosted</value>
      </OptionValue>
      <OptionValue>
        <key>mem.hotadd</key>
        <value type="xs:string">true</value>
      </OptionValue>
      ...
    </extraConfig>
  </config>
  <summary>
    <config>
      <memorySizeMB>2048</memorySizeMB>
      <numCpu>1</numCpu>
    </config>
  </summary>
  <name>MyVM</name>
  <type>VirtualMachine</type>
  <id>vm‐222</id>
</VirtualMachine>

Tags

You can retrieve the tags applied to any vSphere object. In any snapshot profile, just add the property tag.

Output Fields

On the Output Fields tab you map the XML data retrieved by your snapshot profiles to CC Record output.

The concepts and the interface for mapping vSphere XML are the same as those for HPE Consumption Analytics Portal's XML Collector. To learn them, see the documentation for the XML Collector.

For a vSphere Snapshot collection, you should create top-level XPath expressions that correspond to the top-level snapshot profiles you create. The XML document retrieved has no root element, so you cannot map any output from Root.

To apply general XML mapping concepts to vSphere data, you need to understand the format of the XML retrieved from vSphere. This format differs according to data type. Each property, or counter, retrieved by your snapshot profiles is one of the following data types. To learn the data type of a specific property, see the VMware vSphere API Reference:

The vSphere data types are retrieved in the following XML format:

  • Simple types: These are values in formats such as text, integer, and boolean. The collector output for a simple property is the value of the property.
    Example: <name>MyVM</name>
  • Managed object types: These are object-oriented vSphere structures representing entities in inventory and other primary objects. The collector output for a managed object property is its id. To access the object’s other properties, you must request them directly as explained in Child properties with a managed object in their path.
    Example: <datastore>datastore-148</datastore>
  • Data object types: These are object-oriented vSphere structures representing secondary objects not managed in inventory. The collector output for a data object property is an XML representation of the object, listing its properties and their values.
    Example:
    <extraConfig>
      <OptionValue>
        <key>virtualHW.productCompatibility</key>
        <value type="xs:string">hosted</value>
      </OptionValue>
      <OptionValue>
        <key>mem.hotadd</key>
        <value type="xs:string">true</value>
      </OptionValue>
    </extraConfig>
  • Arrays: A property can be an array of a managed object type or a data object type. The collector output for an array property is:
    • Managed object: A comma-delimited list of the id of each object in the array
      Example: <datastore>datastore-148,datastore-149,datastore-152</datastore>
    • Data object: An XML representation of each object in the array, listing its properties and their values
      Example:
      <extraConfig>
        <OptionValue>
          <key>virtualHW.productCompatibility</key>
          <value type="xs:string">hosted</value>
        </OptionValue>
        <OptionValue>
          <key>mem.hotadd</key>
          <value type="xs:string">true</value>
        </OptionValue>
        ...
      </extraConfig>
  • Tags: These are labels applied to a vSphere object. The collector output for an object's tags is the XML element tag, with one or more child Tag elements each representing a tag. Each of those has a child element key whose value is the tag category and the tag itself, delimited by a slash.
    Example:
    <tag>
      <Tag>
        <key>Operating System/Linux</key>
      </Tag>
      <Tag>
        <key>Decommission Date/20141231</key>
      </Tag>
    </tag>
Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP