VMware Cloud Community
saurabh_agr001
Contributor
Contributor

How to fetch ESX Host based on its UUID using OpenDataImporter3().lookupResourceByProperty() API in vCOps vCenter Adapter.

Hi,

We are using the vCOps application 5.8.1 in which we have vCenter Adapter deployed. In the resource configuration of vCenter adapter, we were able to fetch data of VirtualMachine, HostSystem resource-kinds using various metric keys using OpenDataImporter3().lookupResourceByProperty().

But our requirement is to fetch HostSystem using its uuid of property. When searching in the "Managed Object browser" (vCenter mob), I was able to track property summary|hardware|uuid for HostSystem resource-kind, but in describe.xml of vCenter adapter, uuid property is not defined. Does that mean, we are not allowed to fetch HostSystem using uuid in vCOps? Or is there any other way of fetching this information in vCOps?

Best Regards,

Saurabh Agarwal

0 Kudos
1 Reply
Sumit_Tyagi
Enthusiast
Enthusiast

In the vCenter Adapter, there is resource attribute hostuuid under the resource group summary.

I have tried the curl expression and able to get the resoirce key object

curl --request POST -u <user_UI_VM>:<pwd_UI_VM> --insecure https://<IP_UI_VM>/HttpPostAdapter/OpenAPIServlet --data "action=lookupResourceByProperty&adapterKindKey=VMWARE&resourceKindKey=HostSystem&metricKey=summary|hostuuid&propertyValues=<HOSTUUID>"

So In API need to define the correct metric key to fetch the resource key.

ResourceKey object of vCenter adapter will be available.

But the issue is that how can we use/combine that resource key object in out custom dashboard.xml? to show up the resource as "HOST SYSTEM" ???

0 Kudos