Deploy monitoring
Query base model resource monitoring information, including CPU, GPU (VRAM and computing power), and MEM (requires Prometheus deployment specialized for monitoring business Pods).
GET
https://api.alayanew.com/api/serverless-infer/v1/deployment/{serviceId}/resource/metrics
Authorizations
Authorizations:StringHeaderRequired
用户可通过已获取Open API Key做验证,例如:plain Credential=[YOUR_AK],Signature=[YOUR_SK]。
Path Parameters
serviceId:StringRequired
Service ID.
Response
状态码:application/json
200
code:Int
The 'code' is a common return value format indicating the execution result of the query operation.
0
-1
0 is the success indicator, meaning the operation completed successfully.
data:Array
msg:StringRequired
Returns error information when the code value is -1.
cURL
Python
JavaScript
Go
Java
curl --location --request GET 'https://api.alayanew.com/api/serverless-infer/v1/deployment/38fbfc3d-6a88-4c35-b8b6-9efc83949d47/resource/metrics'
--header 'Authorization:plain Credential=YOUR_AK,Signature=YOUR_SK'
--header 'Content-Type: application/json'
200
400
401
403
404
500
{
"code": 0,
"data": {
"ks-49eo39mdrmvjuqngw2cabuthw6lt5uma-00001": {
"worker-0": {
"mem": {
"total": 0.0146,
"rate": 212.3701,
"used": 3.1109
},
"cpu": {
"total": 7.0,
"rate": 0.0517,
"used": 0.3616
}
},
"worker-1": {
"mem": {
"total": 0.0146,
"rate": 174.9089,
"used": 2.5621
},
"cpu": {
"total": 7.0,
"rate": 0.0842,
"used": 0.5895
},
"gpu": {
"GPU-b61c1fde-9dba-e840-0b58-086ce93486e5": {
"mem": {
"used": 42.4805
},
"name": "gpu-l40s",
"utilization": {
"used": 0.0
}
}
}
}
}
}
}