vSphere servers provide the PropertyCollector service for accessing data and monitoring changes. Use the PropertyCollector to obtain references to managed objects, to obtain values of managed object properties, and to monitor and retrieve modified property values.
What to read next
Introduction to the PropertyCollector The PropertyCollector service interface provides a way to monitor and retrieve information about managed objects, such as whether a virtual machine is powered on or whether a host in a cluster is offline.
vSphere Data Objects for Property Collection The following table provides an overview of the PropertyCollector data objects. For more detailed descriptions, see the vSphere API Reference .
vSphere Methods for Property Collection The PropertyCollector supports the following approaches to obtaining objects and properties from the server:
Using the PropertyCollector with RetrievePropertiesEx The following procedures show how to retrieve properties of selected managed objects by using the RetrievePropertiesEx method. Two use cases are shown.
Retrieve a Property from a Specified Managed Object This procedure shows how to use the PropertyCollector
to retrieve a property from a VirtualMachine
object with the RetrieveProperiesEx
method. The example retrieves a managed object reference to the parent object of a VirtualMachine
object in the inventory hierarchy.
Retrieve Properties from a Set of Managed Objects with a View This procedure shows how to use the PropertyCollector
with a ContainerView
to retrieve properties from VirtualMachine
objects with the RetrieveProperiesEx
method.
Simple Property Collector Program in Java for Web Services SDK The Property Collector provides a powerful, flexible, and efficient way to collect data from vCenter Server or ESXi.
Inventory Traversal The Property Collector provides a facility to traverse the inventory on the server in arbitrary ways, enabling you to follow links between related objects.
Client Data Synchronization (WaitForUpdatesEx) To maintain a client-side representation of server object state (by monitoring the properties for the inventory), use the CreateFilter and WaitForUpdatesEx methods. The WaitForUpdatesEx method supports an incremental retrieval model.
Server Data Transmission Property collection can involve the retrieval of large amounts of data, depending on the number of properties implied in the collection request. The vSphere server supports segmented data transmission, or chunking, when it sends collected data to a client. If the amount of collected data exceeds the chunk size, the server returns a chunk of data in a single response, and indicates additional data can be retrieved. For information about chunk size, see the description of the RetrieveOptions.maxObjects and WaitOptions.maxObjectUpdates properties in the vSphere API Reference .
PropertyCollector Performance These factors can affect the performance of a PropertyCollector for any given session:
SearchIndex The SearchIndex managed object provides a set of methods to retrieve references to managed objects in the vSphere inventory. You can search by managed objects inventory path, IP address, datastore path, DNS name, and various other identifying attributes.