查询Topic的磁盘存储情况
功能介绍
查询Topic在Broker上磁盘占用情况。
URI
GET /v2/{project_id}/instances/{instance_id}/topics/diskusage
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
项目ID,获取方式请参见获取项目ID。 |
|
instance_id |
是 |
String |
实例ID。 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
minSize |
否 |
String |
占用磁盘大小,默认值1G (1K,1M,1G)。 |
|
top |
否 |
String |
参数解释: 占用磁盘大小,查询top N。 约束限制: 不涉及。 取值范围: 1~1000。 默认取值: 不涉及。 |
|
percentage |
否 |
String |
占用磁盘大小,查询大于占比的分区。 |
请求参数
无
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
broker_list |
Array of DiskusageEntity objects |
Broker列表。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
broker_name |
String |
Broker名称。 |
|
data_disk_size |
String |
磁盘容量。 |
|
data_disk_use |
String |
已使用的磁盘容量。 |
|
data_disk_free |
String |
剩余可用的磁盘容量。 |
|
data_disk_use_percentage |
String |
消息标签。 |
|
status |
String |
消息标签。 |
|
topic_list |
Array of DiskusageTopicEntity objects |
Topic磁盘容量使用列表。 |
请求示例
查询Topic的磁盘存储情况
GET https://{endpoint}/v2/{project_id}/instances/{instance_id}/topics/diskusage
响应示例
状态码:200
查询成功。
{
"broker_list" : [ {
"broker_name" : "broker-0",
"data_disk_size" : "66G",
"data_disk_use" : "53M",
"data_disk_free" : "63G",
"data_disk_use_percentage" : "1",
"status" : "Success get info",
"topic_list" : [ {
"size" : "12K",
"topic_name" : "topic-test",
"topic_partition" : "2",
"percentage" : 1.7339533025568183E-5
}, {
"size" : "12K",
"topic_name" : "__consumer_offsets",
"topic_partition" : "4",
"percentage" : 1.7339533025568183E-5
}, {
"size" : "12K",
"topic_name" : "__consumer_offsets",
"topic_partition" : "3",
"percentage" : 1.7339533025568183E-5
}, {
"size" : "8.0K",
"topic_name" : "__trace",
"topic_partition" : "6",
"percentage" : 1.1559688683712121E-5
}, {
"size" : "8.0K",
"topic_name" : "__trace",
"topic_partition" : "4",
"percentage" : 1.1559688683712121E-5
}, {
"size" : "8.0K",
"topic_name" : "__trace",
"topic_partition" : "2",
"percentage" : 1.1559688683712121E-5
}, {
"size" : "8.0K",
"topic_name" : "__trace",
"topic_partition" : "0",
"percentage" : 1.1559688683712121E-5
}, {
"size" : "8.0K",
"topic_name" : "topic-test",
"topic_partition" : "0",
"percentage" : 1.1559688683712121E-5
}, {
"size" : "8.0K",
"topic_name" : "topic-1568537362",
"topic_partition" : "2",
"percentage" : 1.1559688683712121E-5
}, {
"size" : "8.0K",
"topic_name" : "__consumer_offsets",
"topic_partition" : "7",
"percentage" : 1.1559688683712121E-5
} ]
} ]
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
查询成功。 |
错误码
请参见错误码。