Querying the List of Metrics Used by a Cluster
Function
This API is used to query the list of metrics used by a cluster.
Call Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/clusters/{cluster_id}/dms/metrics
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. |
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. |
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 ClusterMetric objects |
Metric list |
count |
Long |
Total list size |
Parameter |
Type |
Description |
---|---|---|
scope |
String |
Metric name |
fields |
Array of SimpleFieldDto objects |
Field information in the metric table. |
metric_name |
String |
Name of the valid region |
collect_rate |
Integer |
Collection Rate |
collect_range |
Array of strings |
Period |
create_time |
String |
Creation time |
Example Request
https://{Endpoint}/v1/{project_id}/clusters/{cluster_id}/dms/metrics?limit=1&offset=0&order_by=create_time&sort_by=desc
Example Response
Status code: 200
{ "code" : 0, "msg" : "OK", "data" : [ { "scope" : "CN,ANY", "fields" : [ { "column_name" : "db_name", "column_type" : "text" }, { "column_name" : "schema_name", "column_type" : "text" }, { "column_name" : "table_name", "column_type" : "text" }, { "column_name" : "table_owner", "column_type" : "text" }, { "column_name" : "table_size", "column_type" : "bigint" }, { "column_name" : "dirty_page_rate", "column_type" : "double precision" } ], "metric_name" : "TableDirtyPageRate", "collect_rate" : 7200, "collect_range" : [ ], "create_time" : "1701915436000" } ], "count" : 1 }
Status Code
Status Code |
Description |
---|---|
200 |
The list of metrics used by the cluster is queried successfully. |
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