Metrics
更新时间: 2026/09/24
在AtomGit上查看源码ResourceDefinition
uris
/redfish/v1/PowerEquipment/RackPDUs/power_distribution_id/Metrics
properties
| 名称 | 类型 | 是否只读 | 取值范围/枚举值 | 说明 |
|---|---|---|---|---|
| @odata.context | string | true | - | 机架配电单元统计资源模型的OData描述信息 |
| @odata.id | string | true | - | 资源OID |
| @odata.type | string | true | - | 资源类型 |
| Id | string | true | - | 资源ID |
| Name | string | true | - | 资源名称 |
| PowerWatts { | object | true | - | - |
| PowerWatts.Reading | number | true | - | 有功功率读数(W),IgnoreEtags |
| PowerWatts.ApparentVA | number | true | - | 视在功率(VA) |
| PowerWatts.PhaseAngleDegrees | number | true | - | 相角(度) |
| PowerWatts.PowerFactor | number | true | - | 功率因数 |
| PowerWatts.ReactiveVAR | number | true | - | 无功功率(VAR) |
| } | ||||
| EnergykWh { | object | true | - | - |
| EnergykWh.Reading | number | true | - | 电能读数(kWh),IgnoreEtags |
| EnergykWh.ApparentkVAh | number | true | - | 视在电能(kVAh) |
| EnergykWh.LifetimeReading | number | true | - | 累计电能读数(kWh) |
| EnergykWh.ReactivekVARh | number | true | - | 无功电能(kVARh) |
| EnergykWh.SensorResetTime | number | true | - | 传感器重置时间 |
| } | ||||
| AbsoluteHumidity { | object | true | - | - |
| AbsoluteHumidity.Reading | number | true | - | 绝对湿度读数,IgnoreEtags |
| } | ||||
| HumidityPercent { | object | true | - | - |
| HumidityPercent.Reading | number | true | - | 相对湿度读数(%), |
| } | ||||
| PowerLoadPercent { | object | true | - | - |
| PowerLoadPercent.Reading | number | true | - | 负载百分比读数, |
| } | ||||
| TemperatureCelsius { | object | true | - | - |
| TemperatureCelsius.Reading | number | true | - | 温度读数(℃), |
| } | ||||
| Actions { | object | true | - | - |
| Actions.#PowerDistributionMetrics.ResetMetrics { | object | true | - | - |
| Actions.#PowerDistributionMetrics.ResetMetrics.target | string | true | - | ResetMetrics操作目标 |
| Actions.#PowerDistributionMetrics.ResetMetrics.@Redfish.ActionInfo | string | true | - | ResetMetrics操作信息链接 |
| } | ||||
| } |
supported_methods
- GET
- POST
HTTP methods
GET
命令功能
查询单个机架配电单元统计资源信息。
命令格式
URL: https://device_ip/redfish/v1/PowerEquipment/RackPDUs/power_distribution_id/Metrics
请求头:
X-Auth-Token: 123456789***********************请求消息体: 无
参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| device_ip | 登录设备的IP地址 | IPv4或IPv6地址 |
| power_distribution_id | 配电单元Id | 在查询配电单元列表的返回信息中包含各配电单元Id |
| auth_value | 执行该GET请求时,必须在“Headers”中携带“X-Auth-Token”值用于鉴权。 | 可通过/redfish/v1/SessionService/Sessions创建会话时获得。 |
使用指南
BMC300 5.14.0.1及以上版本支持(仅RM310支持)
使用实例
请求样例:
http
GET https://device_ip/redfish/v1/PowerEquipment/RackPDUs/1/Metrics请求头:
X-Auth-Token: 123456789***********************请求消息体:无
响应样例:
json
{
"@odata.context": "/redfish/v1/$metadata#PowerDistributionMetrics.PowerDistributionMetrics",
"@odata.id": "/redfish/v1/PowerEquipment/RackPDUs/1/Metrics",
"@odata.type": "#PowerDistributionMetrics.v1_4_0.PowerDistributionMetrics",
"Id": "Metrics",
"Name": "Summary Metrics",
"AbsoluteHumidity": {
"Reading": null
},
"EnergykWh": {
"ApparentkVAh": null,
"LifetimeReading": null,
"ReactivekVARh": null,
"Reading": null,
"SensorResetTime": ""
},
"HumidityPercent": {
"Reading": null
},
"PowerLoadPercent": {
"Reading": null
},
"PowerWatts": {
"ApparentVA": null,
"PhaseAngleDegrees": null,
"PowerFactor": null,
"ReactiveVAR": null,
"Reading": null
},
"TemperatureCelsius": {
"Reading": null
},
"Actions": {
"#PowerDistributionMetrics.ResetMetrics": {
"target": "/redfish/v1/PowerEquipment/RackPDUs/1/Metrics/Actions/PowerDistributionMetrics.ResetMetrics",
"@Redfish.ActionInfo": "/redfish/v1/PowerEquipment/RackPDUs/1/Metrics/ResetMetricsActionInfo"
}
}
}响应码:200
POST (ACTION)
ResetMetrics
命令功能
清空单个机架配电单元统计资源信息。
命令格式
URL: https://device_ip/redfish/v1/PowerEquipment/RackPDUs/power_distribution_id/Metrics/Actions/PowerDistributionMetrics.ResetMetrics
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type请求消息体: 无
请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| device_ip | 登录设备的IP地址 | IPv4或IPv6地址 |
| power_distribution_id | 配电单元Id | 在查询配电单元列表的返回信息中包含各配电单元Id |
| auth_value | 请求消息的鉴权参数 | 可通过/redfish/v1/SessionService/Sessions创建会话时获得。 |
| header_type | 请求消息的格式 | 支持的消息格式包括: ● application/json ● application/json;charset=utf-8 |
使用指南
BMC300 5.14.0.1及以上版本支持(仅RM310支持)
使用实例
请求样例:
http
GET https://device_ip/redfish/v1/PowerEquipment/RackPDUs/1/Metrics/Actions/PowerDistributionMetrics.ResetMetrics请求头:
X-Auth-Token: 123456789***********************
Content-Type: application/json请求消息体:无
响应样例:
json
{
"error": {
"code": "Base.1.0.GeneralError",
"message": "A general error has occurred. See ExtendedInfo for more information.",
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"MessageId": "Base.1.0.Success",
"RelatedProperties": [],
"Message": "Successfully Completed Request",
"MessageArgs": [],
"Severity": "OK",
"Resolution": "None"
}
]
}
}响应码:200