Obtains the collected data of a specified metric.
Function
This API is used to obtain the collected data of a specified metric.
Call Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/clusters/{cluster_id}/dms/metrics/{metric_name}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the ID, see Obtaining Project ID. |
cluster_id |
Yes |
String |
Cluster ID. For details about how to obtain the ID, see Obtaining the Cluster ID. |
metric_name |
Yes |
String |
Metric name |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
Yes |
Integer |
Offset from which the query starts, which is greater or equal to 0. |
limit |
Yes |
Integer |
Number of items displayed on each page. The maximum value is 1000. |
from |
Yes |
Long |
Collection start time, which is a 13-digit timestamp. |
to |
Yes |
Long |
Collection end time, which is a 13-digit timestamp. The period from the start time to the end time cannot exceed one day. |
order_by |
No |
String |
Sorting field This parameter is set to a fixed value.
|
sort_by |
No |
String |
Ascending or descending. This parameter is set to a fixed value.
|
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
code |
Integer |
Response code |
msg |
String |
Response message |
data |
Array of Map<String,String> objects |
Indicates the list of collected metric data. For details, see User-defined Counter List. |
count |
Long |
Total list size |
Example Request
https://{Endpoint}/v1/{project_id}/clusters/{cluster_id}/dms/metrics/TableDirtyPageRate?limit=1&offset=0&from=1701914324000&to=1701942194000&order_by=ctime&sort_by=desc
Example Response
Status code: 200
Querying Indicator Collection Data Objects
{ "code" : 0, "msg" : "OK", "data" : [ { "table_size" : 40960, "virtual_cluster_id" : 53, "db_name" : "postgres", "ctime" : 1701929836000, "table_owner" : "Ruby", "schema_name" : "pmk", "table_name" : "pmk_meta_data", "dirty_page_rate" : 0.8 } ], "count" : 3 }
Status Code
Status Code |
Description |
---|---|
200 |
Succeeded in querying the data collection object of the specified metric. |
400 |
Request error. |
401 |
Authentication failed. |
403 |
You do not have required permissions. |
404 |
No resources found. |
500 |
Internal server error. |
503 |
Service unavailable. |
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