Sensors
更新时间: 2026/06/26
在Gitcode上查看源码ResourceDefinition
uris
/redfish/v1/Chassis/chassis_id/Sensors/sensor_id
properties
| 名称 | 类型 | 是否只读 | 取值范围/枚举值 | 说明 |
|---|---|---|---|---|
| @odata.context | string | true | - | 指定Sensor资源模型的OData描述信息 |
| @odata.id | string | true | - | 指定Sensor资源的访问路径 |
| @odata.type | string | true | - | 指定Sensor资源的类型 |
| Id | string | true | - | 传感器资源的ID |
| Name | string | true | - | 传感器资源的名称 |
| PhysicalContext | string | true | - | 传感器度量的设备区域描述 |
| Reading | string | true | - | 传感器的读数 |
| ReadingType | string | true | - | 传感器的读数类型 |
| ReadingUnits | string | true | - | 传感器读值的单位 |
| Status | object | true | - | |
| Health | string | true | - | 传感器的健康状态 |
| HealthRollup | string | true | - | 传感器所在资源的健康状态 |
| State | number | true | - | 传感器的扫描状态 |
| Thresholds | object | true | - | |
| LowerCaution | object | true | - | |
| Activation | string | true | - | 传感器一般低门限的走势方向 |
| Reading | string | true | - | 传感器一般低门限的值 |
| LowerCritical | object | true | - | |
| Activation | string | true | - | 传感器严重低门限的走势方向 |
| Reading | string | true | - | 传感器严重低门限的值 |
| LowerFatal | object | true | - | |
| Activation | string | true | - | 传感器紧急低门限的走势方向 |
| Reading | string | true | - | 传感器紧急低门限的值 |
| UpperCaution | object | true | - | |
| Activation | string | true | - | 传感器一般高门限的走势方向 |
| Reading | string | true | - | 传感器一般高门限的值 |
| UpperCritical | object | true | - | |
| Activation | string | true | - | 传感器严重高门限的走势方向 |
| Reading | string | true | - | 传感器严重高门限的值 |
| UpperFatal | object | true | - | |
| Activation | string | true | - | 传感器紧急高门限的走势方向 |
| Reading | string | true | - | 传感器紧急高门限的值 |
supported_methods
- GET
HTTP methods
GET
命令功能
查询指定 Sensor 资源信息
命令格式
请求头:
X-Auth-Token: 123456789***********************请求消息体: 无
参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| device_ip | 登录设备的IP地址 | IPv4或IPv6地址 |
| chassis_id | 机箱资源的ID | ● 针对机架服务器,取值为1 ● 针对高密服务器,取值为 BladeN(N表示节点槽位 号),例如“Blade1” ● 针对刀片服务器,取值可以为 BladeN(N表示计算节点槽位 号)或SwiN(N表示交换模块 槽位号),例如“Swi1” ● 针对X6800 V5,X6000 V5, G5500,XA320 V2服务器, 取值还可以为Enc,表示计算 节点所在的机框资源 ● 针对设备U位信息,取值可以 为UN(N表示设备U位号),例 如"U1" ● 针对机柜资源,取值为Rack |
| sensor_id | 传感器资源编号 | SensorName.SensorNumber |
| auth_value | 执行该GET请求时,必 须在“Headers”中携 带“X-Auth-Token” 值用于鉴权 | 可通过/redfish/v1/ SessionService/Sessions创建会 话时获得 |
使用指南
无
使用实例
请求样例:
http
GET https://device_ip/redfish/v1/Chassis/1/Sensors/InletTemp.3请求头:
X-Auth-Token: 123456789***********************请求消息体: 无 响应样例:
json
{
"@odata.context": "/redfish/v1/$metadata#Sensor.Sensor",
"@odata.id": "/redfish/v1/Chassis/1/Sensors/InletTemp.13",
"@odata.type": "#Sensor.v1_10_1.Sensor",
"Id": "InletTemp.13",
"Name": "Outlet Temp",
"PhysicalContext": "MainBoard",
"Reading": 34,
"ReadingType": "Temperature",
"ReadingUnits": "degrees C",
"Status": {
"Health": "OK",
"HealthRollup": 0,
"State": "Enabled"
},
"Thresholds": {
"LowerCaution": null,
"LowerCritical": {
"Activation": "Increasing",
"Reading": "0.000"
},
"LowerFatal": {
"Activation": "Increasing",
"Reading": "0.000"
},
"UpperCaution": {
"Activation": "Decreasing",
"Reading": "75.000"
},
"UpperCritical": {
"Activation": "Increasing",
"Reading": "0.000"
},
"UpperFatal": {
"Activation": "Increasing",
"Reading": "0.000"
}
}
}响应码:200