Querying Microservice Reporting Information
Function
This API is used to query microservice reporting information.
URI
GET /v3/{project_id}/csemonitor/metric
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID, which must be unique. The value contains 1 to 64 characters. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
service |
Yes |
String |
List of service names, which are separated by commas (,). |
instance |
No |
String |
Instance name. |
function |
No |
String |
Function name. |
flag |
No |
String |
Batch query flag. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
X-Enterprise-Project-ID |
No |
String |
If this parameter is not set, the default enterprise project is default and the ID is 0. Default value: 0 |
Content-Type |
Yes |
String |
Set it to application/json;charset=UTF-8. |
Accept |
Yes |
String |
Set it to application/json. |
Response
Parameter |
Type |
Description |
---|---|---|
OK |
Array of MetricInfo objects |
Query result. |
Parameter |
Type |
Description |
---|---|---|
time |
Long |
Timestamp. |
appId |
String |
Service appId. |
version |
String |
Service version. |
qps |
Double |
Number of requests per second. |
latency |
Double |
Delay, in milliseconds. |
rate |
Double |
Success rate (%). Value range: 0–100. |
failureRate |
Double |
Failure rate (%). Value range: 0–100. |
total |
Long |
Total number of requests. |
breakerRateAgg |
Float |
Average circuit breaker rate. |
circuitBreakerOpen |
Boolean |
Current circuit breaker status. |
failure |
Long |
Total number of failures. |
shortCircuited |
Long |
Total number of short circuits. |
semaphoreRejected |
Long |
Total number of rejected semaphores. |
threadPoolRejected |
Long |
Total number of rejected threads in the thread pool. |
countTimeout |
Long |
Total number of timeout requests. |
l995 |
double |
Top 99.5% of all request latency sorted in ascending order. |
l99 |
double |
Top 99% of all request latency sorted in ascending order. |
l90 |
double |
Top 90% of all request latency sorted in ascending order. |
l75 |
double |
Top 75% of all request latency sorted in ascending order. |
l50 |
double |
Top 50% of all request latency sorted in ascending order. |
l25 |
double |
Top 25% of all request latency sorted in ascending order. |
l5 |
double |
Top 5% of all request latency sorted in ascending order. |
name |
String |
Name. |
serviceId |
String |
Service ID. |
instanceCount |
Long |
Number of service instances. |
environment |
String |
Environment name. |
diagnosis |
Array of Diagnosisobject |
Service diagnosis result. |
instanceId |
String |
Instance ID. |
thread |
Integer |
Number of threads. |
cpu |
Double |
CPU usage (%). |
memory |
Map object |
Memory usage (%). |
functionCount |
Long |
Number of functions. |
customs |
Map object |
Custom variable. |
providersCache |
Array of ProviderCache object |
Server instance set. |
functionType |
String |
Function type. |
Parameter |
Type |
Description |
---|---|---|
appId |
String |
Application ID. |
microserviceName |
String |
Service name. |
detail |
String |
Details. |
pulledInstances |
Array of ProviderInstance object |
Service provider instance information. |
status |
String |
Status information. |
Parameter |
Type |
Description |
---|---|---|
instanceId |
String |
Instance ID. |
endpoints |
Array of String |
List of instance access points. |
hostName |
String |
Instance domain name. |
timestamp |
String |
Timestamp. |
Parameter |
Type |
Description |
---|---|---|
instanceCache |
Array of InstanceCache object |
Service instance cache result. |
Parameter |
Type |
Description |
---|---|---|
status |
String |
Check status. Enumerated values:
|
timestamp |
Long |
Timestamp. |
producers |
Array of Producer object |
Service provider list. |
checkTime |
Long |
Check time. If an exception occurs, the latest exception time is displayed. Otherwise, the latest check time is displayed. |
latestStatus |
String |
Check status. Enumerated values:
|
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
detail |
String |
Location details. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
detail |
String |
Location details. |
Example Request
GET https://{endpoint}/v3/{project_id}/csemonitor/metric
Example Response
Status code: 200
OK
[
[
{
"time": 1733973104652,
"appId": "weathermap",
"version": "0.0.2",
"qps": 0.0,
"latency": 0.0,
"failureRate": 0.0,
"total": 0,
"breakerRateAgg": 0.0,
"circuitBreakerOpen": false,
"failure": 0,
"shortCircuited": 0,
"semaphoreRejected": 0,
"threadPoolRejected": 0,
"countTimeout": 0,
"l995": 0,
"l99": 0,
"l90": 0,
"l75": 0,
"l50": 0,
"l25": 0,
"l5": 0,
"serviceId": "da21c8749d7ca08047b7d8da63f79e296127c21b",
"instanceCount": 10,
"environment": "",
"diagnosis": {
"instanceCache": null
},
"name": "weather"
}
]
]
Status Code
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
500 |
Internal Server Error |
Error Code
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot