query cpu.md
Query Cpu
Channels API · metrics
GET /ui/connectors/channels-api/latest/metrics/cpu/
Query CPU utilization over time range. Returns Prometheus format.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
start |
string | Yes | Start time (ISO8601 or Unix timestamp) |
end |
string | Yes | End time (ISO8601 or Unix timestamp) |
step |
string | No | Query resolution step Defaults to 60s |
Example request
curl -X GET "/ui/connectors/channels-api/latest/metrics/cpu/?step=60s"
Responses
200 — Successful Response
status· string · Required — 'success' or 'error'data· object · Optional- One of the following variants:
- PrometheusMatrixData (object)
resultType· string · Optional · Defaults to matrixresult· list of objects · Required- Array items (object):
metric· object · Required — Metric labels from Prometheus. Allows arbitrary labels.serverID· object · Optional- One of the following variants:
- string (string)
- null (null)
- One of the following variants:
name· object · Optional- One of the following variants:
- string (string)
- null (null)
- One of the following variants:
job· object · Optional- One of the following variants:
- string (string)
- null (null)
- One of the following variants:
values· list of list of items · Required — Array of [unix_timestamp, value_string] pairs- Array items (list of items):
- Array items (object):
- null (null)
- PrometheusMatrixData (object)
- One of the following variants:
error· object · Optional — Error message if status is 'error'- One of the following variants:
- string (string)
- null (null)
- One of the following variants:
errorType· object · Optional- One of the following variants:
- string (string)
- null (null)
- One of the following variants:
Example:
{
"status": "string",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"serverID": "string",
"name": "string",
"job": "string"
},
"values": [
[]
]
}
]
},
"error": "string",
"errorType": "string"
}
422 — Validation Error
detail· list of objects · Optional- Array items (object):
loc· list of objects · Required- Array items (object):
- One of the following variants:
- string (string)
- integer (integer)
- One of the following variants:
- Array items (object):
msg· string · Requiredtype· string · Requiredinput· any · Optionalctx· object · Optional
- Array items (object):
Example:
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}