The inventory of a vSphere cluster is organized via a resource hierarchy. Access to objects and their properties/methods are based on their location in the inventory. When starting a session, vSphere creates a ServiceInstance with one root folder, one Datacenter and four folders that hold different types of inventory objects. Starting with the ServiceInstance associated with a session (the root object of the inventory), the entire inventory hierarchy can be traversed.
During initialization of the exporter, this inventory tree should be populated in memory and then kept in sync with the server on an interval. The resources discovered during inventory traversal will be used to collect metrics from the performance managers.
The following objects should be discovered while traversing the inventory:
ClusterComputeResource
Datacenter
Datastore
HostSystem
ResourcePool
VirtualMachine
Note: Parent/children references should be stored so the resource hierarchy can be reflected in labels.
The inventory of a vSphere cluster is organized via a resource hierarchy. Access to objects and their properties/methods are based on their location in the inventory. When starting a session, vSphere creates a
ServiceInstance
with one root folder, oneDatacenter
and four folders that hold different types of inventory objects. Starting with theServiceInstance
associated with a session (the root object of the inventory), the entire inventory hierarchy can be traversed.During initialization of the exporter, this inventory tree should be populated in memory and then kept in sync with the server on an interval. The resources discovered during inventory traversal will be used to collect metrics from the performance managers.
The following objects should be discovered while traversing the inventory:
Note: Parent/children references should be stored so the resource hierarchy can be reflected in labels.