We are using vim25 provided with vsphere SDK version 6.7u2.
We are trying to fetch the performance data for specific datastore from vCenter. By using counters like numberReadAveraged, numberWriteAveraged, read, write, totalReadLatency, totalWriteLatency.
First up all, We are fetching all available counters for group datastore from vCenter. It is returning approx. 40+ counter which includes my required counters also. i.e. (numberReadAveraged, numberWriteAveraged, read, write, totalReadLatency, totalWriteLatency)
Before fetching this actual data, We are verifying this counters are available for specific datastore or not by using MOR of that datastore. refer following snippet,
Here, we are getting counter id of numberReadAveraged(178), numberWriteAveraged(179), read (180), write (181) but NOT getting counter id for totalReadLatency(182), totalWriteLatency(183).
Hence, we are unable to retrieve performance data for latency due to not getting this counters for datastore.
When we check the same counters in UI of vCenter then we observed that, this counters available for same datastore.
As well as, performance data is also available against this counters and selected datastore,
We have refer this code from java sample programs available in SDK. Attaching sample program file for reference. (TestPerformanceData.java)
Please suggest if we are missing anything here.
Thanks in Advance!