Vsan System Ex Vsan Query Host Drs Stats

Vsan System Ex Vsan Query Host Drs Stats

Query vSAN DRS stats of this host and all vSAN VMs registered on this host.

Required privileges: System.Read

Request
URI
POST
https://{api_host}/sdk/vim25/{release}/vsan/VsanSystemEx/{moId}/VsanQueryHostDrsStats
COPY
Path Parameters
string
moId
Required

The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId, in this case VsanSystemEx/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 9.0.0.0 APIs.


Request Body
VsanQueryHostDrsStatsRequestType of type(s) application/json
Required
"VsanQueryHostDrsStatsRequestType Object"
array of string
hostUuids
Optional

In regular vSAN cluster, it indicates sorted list of vSAN member host Uuid. It is used to determine the full set of vSAN member hosts and the sequence to organize vSAN VM stats. In stretched compute only cluster, it is an array filled by '0' and '1', to indicate the host membership of configured site fault domains, this is to fill in the gap of absence of vSAN host fault domain on vSAN enabled node.

array of string
vms
Optional

List of VM instance UUID. If specified, only stats of given VMs will be returned, otherwise all vSAN VMs registered on this host will be involved if this parameter is omitted. By default template VM will be ignored unless it is specified by this paramter.

integer As int32 As int32
hostIndex
Optional

Only applicable to stretched compute only node, to indicate the index of the target host in parameter 'hostUuids'.

Authentication
This operation uses the following authentication methods.
Responses
200
Returns VsanHostDrsStats of type(s) application/json
"VsanHostDrsStats Object"
host
Required

vSAN host entity associated to the DRS stats.

string As byte As byte
stats
Required

Binary value to present vSAN DRS stats in below C struct: typedef VmHostStat uint8; // vSAN VM read locality per host.

// 1 means the host can serve read request // without cross site IO, and 0 means // either the data is inaccessible to this // host or the host needs cross site read // to serve the read request. struct VmStats { Uuid vmUuid; // VM instance UUID; uint32 totalSizeInKb; // Total capacity used by this VM in KB on // vSAN datastore; VmHostStat perHostValue[0]; // Weight of VM active vSAN data contributed // per vSAN host. The order is determined by // host member list specified to API // VsanQueryHostDrsStats, and length is // determined by number of vSAN member hosts; }; struct Stats { uint64 hostCapInKb; // host capacity contributed to vSAN in KB; uint64 hostUsageInKb; // host usage on vSAN datastore in KB; uint32 numVms; // number of vSAN VMs registered on this host; uint32 numHosts; // number of vSAN member hosts; It is determined // by host member list specified to API // VsanQueryHostDrsStats. Any host member change // can be detected by vSAN VC service, and trigger // next stats query to capture the new change. VmStats perVmStats[0];// vSAN VM DRS stats, length is determined by // numVms; And note that size of VmStats struct // itself is dynamic. };

boolean
readLocalityPresented
Optional

Whether object site read locality is presented in VmStats


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/vsan/VsanSystemEx/{moId}/VsanQueryHostDrsStats