Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com> Co-authored-by: chenjunjie <chenjunjie@huawei.com> Co-committed-by: chenjunjie <chenjunjie@huawei.com>
14 KiB
Listing Monitored Objects on Primary Dimensions
Function
This API is used to query the monitored objects on the primary dimension dcs_instance_id.
URI
GET /v2/{project_id}/dims/monitored-objects
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Tenant ID. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
dim_name |
Yes |
String |
Primary dimension ID, which can be dcs_instance_id. |
offset |
No |
Integer |
Offset, which is the position where the query starts. The value must be greater than or equal to 0. |
limit |
No |
Integer |
Number of items displayed per page. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
router |
Array of strings |
Route of the specified dimension. If the dimension is the primary dimension, the array contains the ID of the primary dimension. |
children |
Array of DimChild objects |
Secondary dimensions under the specified dimension. This parameter is valid only when the dimension is dcs_instance_id.
|
instances |
Array of InstancesMonitoredObject objects |
Monitored objects of the specified dimension. |
total |
Integer |
Total number of monitored objects on the primary dimension. |
Parameter |
Type |
Description |
|---|---|---|
dim_name |
String |
Dimension name. The value can be dcs_instance_id, dcs_cluster_redis_node, or dcs_cluster_proxy_node. |
dim_route |
String |
Dimension route. Format: Dimension name,Sub-dimension name. For example, if dim_name is dcs_cluster_redis_node, the value of dim_route is dcs_instance_id,dcs_cluster_redis_node. |
Parameter |
Type |
Description |
|---|---|---|
dcs_instance_id |
String |
ID of the monitored object, which is the instance ID. |
name |
String |
Name of the monitored object, which is the instance name. |
status |
String |
Status of the monitored object, which is the instance status. |
Status code: 500
Parameter |
Type |
Description |
|---|---|---|
error_msg |
String |
Error message. |
error_code |
String |
Error code. |
error_ext_msg |
String |
Extended error information. This parameter is not used currently and is set to null. |
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.