Fetch machine metrics data
POST/api/v1/machines/metrics
This API endpoint retrieve metrics data for the machine identified by the provided machineId or machine alias, filtered by the specified metrics label. Note that metrics data is only collected if metrics collection is enabled in machine telemetry. Machine metrics refer to quantitative data points that provide insight into the performance, health, and utilization of a machine.
Request
- application/json
Body
required
The request body containing the required details to get machine metrics
Possible values: [SYSTEM_CPU_UTILIZATION
, SYSTEM_MEMORY_USAGE
, SYSTEM_CPU_LOAD_AVERAGE_15M
, SYSTEM_NETWORK_IO
, SYSTEM_DISK_IO
, SYSTEM_FILESYSTEMS_USAGE
]
Timestamp in epoch seconds
Timestamp in epoch seconds
Responses
- 200
Success response
- application/json
- Schema
- Example (from schema)
- Fetch machine metrics data example
Schema
Array [
]
payload
object
Schema for telemetry data response type
data
object
Schema for telemetry data
result
object[]
metric
object
Schema for telemetry data metrics
{
"success": true,
"message": "string",
"status": "string",
"statusCode": 0,
"errorCode": "string",
"subErrors": [
{}
],
"payload": {
"status": "string",
"data": {
"resultType": "string",
"result": [
{
"metric": {
"state": "string",
"device": "string",
"machine_id": "string",
"direction": "string",
"type": "string",
"system_cpu_logical_number": "string"
},
"values": [
[
{}
]
]
}
]
}
}
}
Fetch machine metrics data response example
{
"success": true,
"message": "Machine metrics fetched successfully",
"status": "OK",
"statusCode": 200,
"errorCode": "",
"subErrors": [
{}
],
"payload": {
"status": "success",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"state": null,
"device": "eth0",
"machine_id": "xxb63e2aaedx-xxxx-123",
"direction": "receive",
"type": null,
"system_cpu_logical_number": null
},
"values": [
[
1717747560,
"7"
],
[
1717747620,
"8"
]
]
}
]
}
}
}