Listing Monitored Objects on Primary Dimensions
Function
This API is used to query the monitored objects on the primary dimension dcs_instance_id or dcs_memcached_instance_id.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/dims/monitored-objects
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Parameter description: Project ID. For details, see Obtaining a Project ID. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
dim_name |
Yes |
String |
Parameter description: Primary dimension ID. Constraints: N/A. Value range: It can be dcs_instance_id. Default value: N/A. |
|
offset |
No |
Integer |
Parameter description: Offset, which is the position where the query starts. Constraints: N/A. Value range: ≥ 0 Default value: 0 |
|
limit |
No |
Integer |
Parameter description: Number of records displayed on each page. Constraints: N/A. Value range: 1–1,000 Default value: 10 |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
router |
Array of strings |
Parameter description: Route of the specified dimension. If the dimension is the primary dimension, the array contains its ID. Value range: N/A. |
|
children |
Array of DimChild objects |
Parameter description: Secondary dimensions under the specified dimension. This parameter is valid only when the dimension is dcs_instance_id. Value range:
|
|
instances |
Array of InstancesMonitoredObject objects |
Parameter description: Monitored objects of the specified dimension. Value range: N/A. |
|
total |
Integer |
Parameter description: Total number of monitored objects on the primary dimension. Value range: N/A. |
|
Parameter |
Type |
Description |
|---|---|---|
|
dim_name |
String |
Parameter description: Dimension name. Value range:
|
|
dim_route |
String |
Parameter description: Dimension route. Format: Primary dimension name,Secondary dimension name. For example, if dim_name is dcs_cluster_redis_node, the value of this field is dcs_instance_id,dcs_cluster_redis_node. Value range: N/A. |
|
Parameter |
Type |
Description |
|---|---|---|
|
dcs_instance_id |
String |
Parameter description: ID of the monitored object, which is the instance ID. Value range: N/A. |
|
name |
String |
Parameter description: Name of the monitored object, which is the instance name. Value range: N/A. |
|
status |
String |
Parameter description: Status of the monitored object, which is the instance status. Value range: N/A. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
|
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
|
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Example Requests
GET https://{dcs_endpoint}}/v2/{project_id}}/dims/monitored-objects?dim_name={dim_name}
Example Responses
Status code: 200
Successfully listed the monitored objects on the primary dimension.
{
"router" : [ "dcs_instance_id" ],
"total" : 3,
"children" : [ {
"dim_name" : "dcs_cluster_redis_node",
"dim_route" : "dcs_instance_id,dcs_cluster_redis_node"
}, {
"dim_name" : "dcs_cluster_proxy_node",
"dim_route" : "dcs_instance_id,dcs_cluster_proxy_node"
} ],
"instances" : [ {
"name" : "dcs-redis-single-node",
"status" : "RUNNING",
"dcs_instance_id" : "fe909c47-8990-44a0-9154-d0a1e95e78fe"
}, {
"name" : "dcs-redis-master-standby",
"status" : "RUNNING",
"dcs_instance_id" : "877e5ae3-482e-4c38-88a0-030a0fa6f399"
}, {
"name" : "dcs-proxy-cluster",
"status" : "RUNNING",
"dcs_instance_id" : "448ee851-1366-47f2-913a-e21032e690c4"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Successfully listed the monitored objects on the primary dimension. |
|
500 |
Internal service error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.