Reporting Service Metrics
Function
This API is used to report service metrics to the dashboard.
Call Method
See Calling APIs.
URI
POST /v2/{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. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
x-domain-name |
Yes |
String |
Tenant account name. |
X-Auth-Token |
Yes |
String |
User token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
No |
String |
Name. |
appId |
No |
String |
Application ID. |
serviceId |
No |
String |
Service ID. |
version |
No |
String |
Version. |
instanceId |
No |
String |
Instance ID. |
instance |
No |
String |
Instance information. |
thread |
No |
Integer |
Thread name. |
cpu |
No |
Double |
CPU information. |
memory |
No |
Map<String, Long> |
Memory information. |
interfaces |
No |
Array of FunctionMetricInfo objects |
Monitoring item list. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
functionName |
No |
String |
Name of the monitoring item. |
functionType |
No |
String |
Monitoring item type. |
desc |
No |
String |
Monitoring item description. |
time |
No |
Long |
Time. |
appId |
No |
String |
Application ID. |
version |
No |
String |
Version. |
qps |
No |
Double |
Throughput. |
latency |
No |
Double |
Latency. |
rate |
No |
Double |
Percentage. |
failureRate |
No |
Double |
Failure percentage. |
shortCircuited |
No |
Integer |
Number of circuits. |
semaphoreRejected |
No |
Integer |
Number of rejected semaphores. |
threadPoolRejected |
No |
Integer |
Number of rejected threads. |
countTimeout |
No |
Integer |
Timeout duration. |
l995 |
No |
Double |
99.5% requests have a value smaller than the value of this parameter. |
l99 |
No |
Double |
99% requests have a value smaller than the value of this parameter. |
l90 |
No |
Double |
90% requests have a value smaller than the value of this parameter. |
l75 |
No |
Double |
75% requests have a value smaller than the value of this parameter. |
l50 |
No |
Double |
50% requests have a value smaller than the value of this parameter. |
l25 |
No |
Double |
25% requests have a value smaller than the value of this parameter. |
l5 |
No |
Double |
5% requests have a value smaller than the value of this parameter. |
Response
Status code: 400
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Error code. |
errorMessage |
String |
Error message. |
detail |
String |
Location details. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Error code. |
errorMessage |
String |
Error message. |
detail |
String |
Location details. |
Example Request
POST https://{endpoint}/v2/{project_id}/csemonitor/metric { "name" : "test", "appId" : "default", "version" : "1.0.0", "instance" : "hostNameTest", "thread" : 0, "cpu" : 0, "memory" : { "1":"1" }, "interfaces" : [ { "time" : 0, "name" : "test", "qps" : 0, "latency" : 0, "rate" : 0, "total" : 0, "isCircuitBreakerOpen" : true, "failure" : 0, "shortCircuited" : 0, "semaphoreRejected" : 0, "threadPoolRejected" : 0, "countTimeout" : 0, "l995" : 0, "l99" : 0, "l90" : 0, "l75" : 0, "l50" : 0, "l25" : 0, "l5" : 0 } ] }
Example Response
Status code: 400
{ "errorCode" : "string", "errorMessage" : "string", "detail" : "string" }
Status code: 500
{ "errorCode" : "string", "errorMessage" : "string", "detail" : "string" }
Status Code
Status Code |
Description |
---|---|
200 |
The data is reported successfully. |
400 |
Bad Request |
500 |
Internal Server Error |
Error Code
See CSE 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