vmware / govmomi

Go library for the VMware vSphere API
Apache License 2.0
2.26k stars 896 forks source link

vCenter : QueryPerf metrics support #3447

Open dbhat-arkin opened 1 month ago

dbhat-arkin commented 1 month ago

Summary: Our application (vRNI) collects the Host, Datastore, VM metrics using the vCenter SDK : . But, the GoVcSim instance is not returning the required metrics for Hosts, VMs and Datastore. Request to implement the required methods to export the metrics respective to entities in GoVcSim.

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered Earlier vcsim (simulator of which support ended in vSphere 5.5) had support for exporting the VM metrics.

Additional details: We had enabled the tracelog for the GoVcSim instance. Below are trace log entries:

queryPerf_trace_log.log

Link to QuerPerf: https://vdc-repo.vmware.com/vmwb-repository/dcr-public/6b586ed2-655c-49d9-9029-bc416323cb22/fa0b429a-a695-4c11-b7d2-2cbc284049dc/doc/vim.PerformanceManager.html#queryStats

<_this type="PerformanceManager">PerfMgr</_this><querySpec><entity type="VirtualMachine">vm-1564</entity><startTime xsi:type="xsd:dateTime">2024-05-20T09:40:00.034Z</startTime><endTime xsi:type="xsd:dateTime">2024-05-20T09:51:17.318Z</endTime><metricId><counterId xsi:type="xsd:int">2</counterId><instance></instance></metricId><intervalId>20</intervalId><format>csv</format></querySpec>