Performance Manager Query Perf

Performance Manager Query Perf

Retrieves the performance metrics for the specified entity (or entities) based on the properties specified in the PerfQuerySpec data object.

Query Performance for VirtualCenter Server

Required privileges: System.View

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/PerformanceManager/{moId}/QueryPerf
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 PerformanceManager/{moId}.

string
release
Required

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


Request Body
QueryPerfRequestType of type(s) application/json
Required
{
    "querySpec": [
        {
            "_typeName": "string",
            "entity": {
                "_typeName": "string",
                "type": "string",
                "value": "string"
            },
            "startTime": "string",
            "endTime": "string",
            "maxSample": 0,
            "metricId": [
                {
                    "_typeName": "string",
                    "counterId": 0,
                    "instance": "string"
                }
            ],
            "intervalId": 0,
            "format": "string"
        }
    ]
}
querySpec
Required

An array of PerfQuerySpec objects. Each PerfQuerySpec object specifies a managed object reference for an entity, plus optional criteria for filtering results. Only metrics for entities that can be resolved and that are valid performance providers are returned in any result.

Each PerfQuerySpec object in the array submitted in this operation can query for different metrics. Or, select all types of statistics for a single managed entity.

Raw data feed workaround: Normally, QueryPerf will return performance statistics stored in the VirtualCenter database. However this may not be suitable for certain applications. For example, applications that treat VirtualCenter as a raw data source, query for performance statistics regularly (say every 5 minutes) and extract the data for external archival and reporting. Such applications need better query performance. These applications should query statistics using QueryPerf for the base historical interval (5 minutes by default) having a start and end time range within 30 minutes from the current VirtualCenter server system time. These QueryPerf calls will have better performance than other QueryPerf calls.

Authentication
This operation uses the following authentication methods.
Responses
200

The metric values for the specified entity or entities.

Returns Array of PerfEntityMetricBase of type(s) application/json
[
    {
        "_typeName": "string",
        "entity": {
            "_typeName": "string",
            "type": "string",
            "value": "string"
        }
    }
]