查询HBlock服务状态
更新时间 2025-09-29 17:49:42
最近更新时间: 2025-09-29 17:49:42
本节主要介绍如何使用API查询HBlock服务状态。
此操作用来查询HBlock状态,包括系统、存储池(集群版)、服务器、数据目录(单机版)、卷的状态。
请求语法
GET /rest/v1/system/status HTTP/1.1
Date: date
Host: ip:port
Authorization: authorization响应结果
| 名称 | 类型 | 描述 |
|---|---|---|
| system.status | String | HBlock服务状态:
|
| system.licenseStatus | String | 软件许可证状态:
|
| server.status | Object | 服务器的状态,详见“表1 响应参数server.status说明”。 |
| disk.status | Object | 磁盘的状态(仅单机版支持),详见“表2 响应参数disk.status说明(仅单机版支持)”。 |
| disk.usage | Object | HBlock数据目录使用情况,详见“表3 响应参数disk.usage说明(仅单机版支持)”。 |
| lun.status | Object | 卷状态,详见“表4 响应参数lun.status说明”。 |
| lun.data | Object | 卷数据信息,详见“表5 响应参数lun.data说明”。 |
| storagePool.number | Integer | 存储池个数(仅集群版支持)。 |
| storagePool.basePool | Sring | 基础存储池名称(仅集群版支持)。 |
| storagePool.basePoolDetail | Object | 基础存储池详情(仅集群版支持),详见“表6 响应参数storagePool.basePoolDetail说明(仅集群版支持)”。 |
表1 响应参数server.status说明
| 名称 | 类型 | 描述 |
|---|---|---|
| connected | Integer | 状态为连接的服务器个数。 |
| disconnected | Integer | 状态为断开连接的服务器个数。 |
| removing | Integer | 状态为正在移除的服务器个数。 |
表2 响应参数disk.status说明(仅单机版支持)
| 名称 | 类型 | 描述 |
|---|---|---|
| healthy | Integer | 状态为健康的磁盘个数。 |
| warning | Integer | 状态为告警的磁盘个数。 |
| error | Integer | 状态为错误的磁盘个数。 |
表3 响应参数disk.usage说明(仅单机版支持)
| 名称 | 类型 | 描述 |
|---|---|---|
| used | Long | HBlock数据目录对应分区的已用容量,单位是字节。 |
| total | Long | HBlock数据目录对应分区的总容量,单位是字节。 |
表4 响应参数lun.status说明
| 名称 | 类型 | 描述 |
|---|---|---|
| number | Integer | 卷的总个数。 |
| cacheNumber | Integer | 缓存模式卷的个数。 |
| storageNumber | Integer | 存储模式卷的个数。 |
| localNumber | Integer | 本地模式卷的个数。 |
| cacheCapacity | Long | 缓存模式卷的容量,单位是字节。 |
| storageCapacity | Long | 存储模式卷的容量,单位是字节。 |
| localCapacity | Long | 本地模式卷的容量,单位是字节。 |
表5 响应参数lun.data说明
| 名称 | 类型 | 描述 |
|---|---|---|
| normal | Integer | 正常状态的卷数量百分比。 |
| lowRedundancy | Integer | 低冗余状态的卷数据量百分比。 |
| error | Integer | 错误状态的卷数据量百分比。 |
表6响应参数storagePool.basePoolDetail说明(仅集群版支持)
| 名称 | 类型 | 描述 |
|---|---|---|
| faultDomain.level | String | 基础存储池的故障域级别。 |
| faultDomain.status.healthy | Integer | 状态为健康的故障域个数。 |
| faultDomain.status.warning | Integer | 状态为告警的故障域个数。 |
| faultDomain.status.error | Integer | 状态为错误的故障域个数。 |
| disk.status.healthy | Integer | 状态为健康的磁盘个数。 |
| disk.status.warning | Integer | 状态为告警的磁盘个数。 |
| disk.status.error | Integer | 状态为错误的磁盘个数。 |
| disk.usage.used | Long | HBlock数据目录对应分区的已用容量,单位是字节。 |
| disk.usage.total | Long | HBlock数据目录对应分区的总容量,单位是字节。 |
请求示例1
单机版:查询HBlock状态。
GET /rest/v1/system/status HTTP/1.1
Date: Mon, 13 May 2024 11:06:55 GMT
Authorization: HBlock userName:signature
Host:192.168.0.32:1443响应示例1
HTTP/1.1 200 OK
x-hblock-request-id: b9a47583b571487697f327cfd70723fe
Connection: keep-alive
Content-Length: 443
Date: Mon, 13 May 2024 11:06:55 GMT
Content-Type: application/json;charset=utf-8
Server: HBlock
{
"data": {
"system": {
"status": "Working",
"licenseStatus": "Effective"
},
"server": {
"status": {
"connected": 1,
"disconnected": 0,
"removing": 0
}
},
"disk": {
"status": {
"healthy": 1,
"warning": 0,
"error": 0
},
"usage": {
"used": 63168512,
"total": 100167352320
}
},
"lun": {
"status": {
"number": 5,
"cacheNumber": 0,
"storageNumber": 2,
"localNumber": 3,
"cacheCapacity": 0,
"storageCapacity": 654982512640,
"localCapacity": 665719930880
},
"data": {
"normal": 100,
"lowRedundancy": 0,
"error": 0
}
}
}
}请求示例2
集群版:查询HBlock状态。
GET /rest/v1/system/status HTTP/1.1
Date: Wed, 7 Aug 2024 06:20:45 GMT
Authorization: HBlock userName:signature
Host:192.168.0.32:1443响应示例2
HTTP/1.1 200 OK
x-hblock-request-id: 34e45fb7348647a6afbfb1dcb5b602cf
Connection: keep-alive
Content-Length: 597
Date: Wed, 7 Aug 2024 06:20:45 GMT
Content-Type: application/json;charset=utf-8
Server: HBlock
{
"data": {
"system": {
"status": "Working",
"licenseStatus": "None"
},
"server": {
"status": {
"connected": 4,
"disconnected": 0,
"removing": 0
}
},
"storagePool": {
"number": 4,
"basePool": "default",
"basePoolDetail": {
"faultDomain": {
"level": "server",
"status": {
"healthy": 3,
"warning": 0,
"error": 0
}
},
"disk": {
"status": {
"healthy": 4,
"warning": 0,
"error": 0
},
"usage": {
"used": 40795934720,
"total": 336471511040
}
}
}
},
"lun": {
"status": {
"number": 5,
"cacheNumber": 1,
"storageNumber": 1,
"localNumber": 3,
"cacheCapacity": 214748364800,
"storageCapacity": 322122547200,
"localCapacity": 429496729600
},
"data": {
"normal": 100,
"lowRedundancy": 0,
"error": 0
}
}
}
}