Query Cluster Metrics
Query the metrics of a specific cluster.
The base URL for this API is in the following format:
https://api.cloud.zilliz.com
export BASE_URL="https://api.cloud.zilliz.com"
The authentication token should be an API key with appropriate privileges.
ID of the target cluster.
The starting date and time for the metric reporting period, expressed in ISO 8601 timestamp format in UTC. Include this parameter and end
when the period
parameter is not set.
The ending date and time for the metric reporting period, expressed in ISO 8601 timestamp format in UTC. Include this parameter and start
when the period
parameter is not set.
The duration over which Zilliz Cloud reports the metrics, expressed in ISO 8601 duration format in UTC. Include this parameter when both start
and end
parameters are not set.
The time interval at which Zilliz Cloud reports the metrics, expressed in ISO 8601 duration format in UTC. The minimum granularity is PT30S.
List of MetricQuery objects.
A MetricQuery object.
Name of a metric.
For possible values, refer to the enumerations.
For details on these metrics, refer to Metrics & Alerts Reference.
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.
export TOKEN="YOUR_API_KEY"
export CLUSTER_ID="inxx-xxxxxxxxxxxxxxx"
curl --request POST \
--url "${BASE_URL}/v2/clusters/${CLUSTER_ID}/metrics/query" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"start": "2024-06-30T16:09:53Z",
"end": "2024-07-01T16:09:53Z",
"granularity": "PT6H",
"metricQueries": [
{
"name": "CU_COMPUTATION",
"stat": "AVG"
}
]
}'
Response code.
Response payload.
List of collected statistics on the specified metric.
A set of collected statistics.
A metric name.
Statistical method applied.
Unit of the value in the statistics.
List of collected statistics at an interval.
Statistics collected within an interval period.
The timestamp for the data point in ISO 8601 format.
The value of the metric at the given timestamp.
Returns an error message.
Response code.
Error message.
{
"code": 0,
"data": {
"results": [
{
"name": "CU_COMPUTATION",
"stat": "AVG",
"unit": "percent",
"values": [
{
"timestamp": "2024-06-30T16:09:53Z",
"value": null
},
{
"timestamp": "2024-06-30T22:09:53Z",
"value": "1.00"
},
{
"timestamp": "2024-07-01T04:09:53Z",
"value": "1.00"
},
{
"timestamp": "2024-07-01T10:09:53Z",
"value": "1.00"
}
]
}
]
}
}