Query Metrics
View metric statistics.
POST
https://controller.${CLOUD_REGION}.zillizcloud.com/v1/clusters/CLUSTER_ID/metrics/query
Example
📘Notes
This API requires an API key as the authentication token.
export CLOUD_REGION="gcp-us-west1"
export API_KEY=""
curl --location --request POST "https://controller.api.${CLOUD_REGION}.zillizcloud.com/v1/clusters/inxx-xxxxxxxxxxxxxxx/metrics/query" \
--header "Authorization: Bearer ${API_KEY}" \
--data-raw '{
"start": "",
"end": "",
"period": "PT99H",
"granularity": "PT5H",
"metricQueries": [
{
"name": "CU_CAPACITY",
"stat": "AVG"
}
]
}'
Possible response is similar to the following.
{
"code": 200,
"data": {
"results": [
{
"name": "CU_CAPACITY",
"stat": "AVG",
"unit": "percent",
"values": [
{
"timestamp": "2024-07-06T04:27:53Z",
"value": null
},
{
"timestamp": "2024-07-06T09:27:53Z",
"value": null
},
{
"timestamp": "2024-07-06T14:27:53Z",
"value": null
}
]
}
]
}
}
Request
Parameters
-
No query parameters required
-
No path parameters required
-
Header parameters
Parameter Description Authorization string(required)
Request Body
{
"start": "string",
"end": "string",
"period": "string",
"granularity": "string",
"metricQueries": [
{
"name": "string",
"stat": "string"
}
]
}
Parameter | Description |
---|---|
start | string The starting date and time for the metric reporting period, expressed in ISO 8601 timestamp format in UTC. Include this parameter when the period parameter is not set. |
end | string The ending date and time for the metric reporting period, expressed in ISO 8601 timestamp format in UTC. Include this parameter when the period parameter is not set. |
period | string The duration over which Milvus reports the metrics, expressed in ISO 8601 duration format in UTC. Include this parameter when both start and end parameters are not set. |
granularity | string The time interval at which Milvus reports the metrics, expressed in ISO 8601 duration format in UTC. The minimum granularity is PT30S. |
metricQueries | array An array of MetricQuery objects. |
metricQueries[] | object |
metricQueries[].name | string The name of the metric to query. Valid values include CU_COMPUTATION, CU_CAPACITY, STORAGE_USE, REQ_INSERT_COUNT, REQ_BULK_INSERT_COUNT, REQ_UPSERT_COUNT, REQ_DELETE_COUNT, REQ_SEARCH_COUNT, REQ_QUERY_COUNT, VECTOR_REQ_INSERT_COUNT, VECTOR_REQ_UPSERT_COUNT, VECTOR_REQ_SEARCH_COUNT, REQ_INSERT_LATENCY, REQ_BULK_INSERT_LATENCY, REQ_UPSERT_LATENCY, REQ_DELETE_LATENCY, REQ_SEARCH_LATENCY, REQ_QUERY_LATENCY, REQ_SUCCESS_RATE, REQ_FAIL_RATE, REQ_FAIL_RATE_INSERT, REQ_FAIL_RATE_BULK_INSERT, REQ_FAIL_RATE_UPSERT, REQ_FAIL_RATE_DELETE, REQ_FAIL_RATE_SEARCH, REQ_FAIL_RATE_QUERY, ENTITIES_LOADED, ENTITIES_INSERT_RATE, COLLECTIONS_COUNT, ENTITIES_COUNT. |
metricQueries[].stat | string The statistical method to apply to the metric. Valid values include AVG (average) and P99 (99th percentile) for latency metrics. AVG is available for all other metrics. |
Response
Returns the collected statistics on the queried metrics.
Response Body
{
"code": "integer",
"data": {
"results": [
{
"name": "string",
"stat": "string",
"unit": "string",
"values": [
{
"timestamp": "string",
"value": "string"
}
]
}
]
}
}
Property | Description |
---|---|
code | integer Indicates whether the request succeeds.
|
data | object The container for the response data. |
data[].results | array An array of result objects. |
data[].results[] | object |
data[].results[].name | string The name of the metric. |
data[].results[].stat | string The statistical function applied to the metric. |
data[].results[].unit | string The unit of measurement for the metric (e.g., percent). |
data[].results[][].values | array An array of data points. |
data[].results[][].values[] | object |
data[].results[][].values[].timestamp | string The timestamp for the data point in ISO 8601 format. |
data[].results[][].values[].value | string The value of the metric at the given timestamp. |
Error Response
{
"code": integer,
"message": string
}
Property | Description |
---|---|
code | integer Indicates whether the request succeeds.
|
message | string Indicates the possible reason for the reported error. |