This API is used to query service monitoring information.
GET /v1/{project_id}/services/{service_id}/monitor
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
service_id |
Yes |
String |
Service ID |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
node_id |
No |
String |
ID of the node to be queried. By default, all nodes are queried. |
None
Parameter |
Type |
Description |
---|---|---|
service_id |
String |
Service ID |
service_name |
String |
Service name |
monitors |
monitor array corresponding to infer_type of a service |
Monitoring details
|
Parameter |
Type |
Description |
---|---|---|
model_id |
String |
Model ID |
model_name |
String |
Model name |
model_version |
String |
Model version |
invocation_times |
Long |
Total number of model instance calls |
failed_times |
Long |
Number of failed model instance calls |
cpu_core_usage |
Float |
Number of used CPUs |
cpu_core_total |
Float |
Total number of CPUs |
cpu_memory_usage |
Integer |
Used memory, in MB |
cpu_memory_total |
Integer |
Total memory, in MB |
gpu_usage |
Float |
Number used GPUs |
gpu_total |
Float |
Total number of GPUs |
The following shows how to query the monitoring information about a real-time service.
GET https://endpoint/v1/{project_id}/services/{service_id}/monitor
{ "service_id": "xxx", "service_name": "mnist", "monitors": [{ "model_id": "xxxx", "model_name": "minst", "model_version": "1.0.0", "invocation_times": 50, "failed_times": 1, "cpu_core_usage": "2.4", "cpu_core_total": "4", "cpu_memory_usage": "2011", "cpu_memory_total": "8192", "gpu_usage": "0.6", "gpu_total": "1" } ] }
For details about the status code, see Table 1.
See Error Codes.