ResourceDefinition
uris
/redfish/v1/Systems/system_id/LogServices/LogService_id
properties
| 名称 | 类型 | 是否只读 | 取值范围/枚举值 | 说明 |
|---|---|---|---|---|
| @odata.context | string | true | - | 指定日志服务资源模型的OData描述信息 |
| @odata.id | string | true | - | 指定日志服务资源的访问路径 |
| @odata.type | string | true | - | 指定日志服务资源的类型 |
| Id | string | true | - | 指定日志服务资源的ID |
| Name | string | true | - | 指定日志服务资源的名称 |
| MaxNumberOfRecords | number | true | - | 指定日志服务资源的最大可记录日志条数 |
| OverWritePolicy | string | true | - | 指定日志服务资源的覆盖策略 ● Unknown ● WrapsWhenFull ● NeverOverWrites |
| DateTime | string | true | - | 指定日志服务资源的系统时间 说明 已屏蔽该属性值频繁变化导致的事件上报 |
| DateTimeLocalOffset | string | false | - | 指定日志服务资源的时区 |
| ServiceEnabled | boolean | true | - | 指定日志服务资源的启用状态 ● true ● false |
| EventType | string | true | - | 事件类型 ● StatusChange ● ResourceUpdated ● ResourceAdded ● ResourceRemoved ● Alert |
| EntryType | string | true | - | 日志类型 ● Event ● SEL ● Oem |
| EventSubject | string | true | - | 事件源标识 |
| Created | string | true | - | 创建时间 |
| Severity | string | true | - | 严重性级别 ● OK ● Warning ● Critical |
| Level | string | true | - | 自定义严重性级别 ● Informational ● Minor ● Major ● Critical |
| Message | string | true | - | 日志描述 |
| HandlingSuggestion | string | true | - | 告警处理建议,@#AB;符号用于标示换行符 |
| EventId | string | true | - | 事件码 |
| MessageId | string | true | - | 消息ID |
| MessageArgs | array | true | - | 消息参数 |
| ObjectTypeList | array | true | - | 主体类型列表 |
| ObjectTypeId | number | true | - | 主体类型id |
| ObjectTypeLabel | string | true | - | 主体类型名称 |
| #LogService.ClearLog | object | true | - | 清空日志操作 |
| target | string | true | - | Action操作路径 |
| @Redfish.ActionInfo | string | true | - | Action操作信息查询路径 |
| #LogService.CollectSel | object | true | - | SEL日志收集 |
| #LogService.QuerySelLogEntries | object | true | - | 查询SEL日志操作 |
| Entries | object | true | - | 日志集合资源的访问路径 |
supported_methods
- GET
- PATCH
- POST
HTTP methods
GET
命令功能
查询指定日志服务资源信息
命令格式
URL: https://device_ip/redfish/v1/Systems/system_id/LogServices/logservices_id
请求头:
X-Auth-Token: 123456789***********************请求消息体: 无
参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| device_ip | 登录设备的IP地址 | IPv4或IPv6地址 |
| system_id | 系统资源的ID | 参见源文件参数说明 |
| auth_value | 请求消息的鉴权参数 | 可通过/redfish/v1/SessionService/Sessions创建会话时获得 |
使用指南
无
使用实例
请求样例:
GET https://device_ip/redfish/v1/Systems/system_id/LogServices/logservices_idX-Auth-Token: 123456789***********************
请求消息体:无
响应样例:
{
"@odata.context": "/redfish/v1/$metadata#Systems/Members/1/LogServices/Members/$entity",
"@odata.id": "/redfish/v1/Systems/1/LogServices/Log1",
"@odata.type": "#LogService.v1_0_3.LogService",
"Id": "Log1",
"Name": "System Service Log",
"MaxNumberOfRecords": 2000,
"OverWritePolicy": "WrapsWhenFull",
"DateTime": "2017-05-09T07:56:34+00:00",
"DateTimeLocalOffset": "GMT",
"ServiceEnabled": true,
"Oem": {
"Public": {
"HealthEvent": [
{
"EventType": "Alert",
"EntryType": "Event",
"EventSubject": "Disk5",
"Created": "2017-05-08T05:00:41+00:00",
"Severity": "Warning",
"Level": "Minor",
"Message": "The disk (Disk5) failure.",
"HandlingSuggestion": null,
"EventId": "0x02000007",
"MessageId": "iBMCEvents.2.0.DiskExpInfo",
"MessageArgs": [
"Disk5",
{
"EventType": "Alert",
"EntryType": "Event",
"EventSubject": "Disk7",
"Created": "2017-05-09T04:54:01+00:00",
"Severity": "Warning",
"Level": "Minor",
"Message": "The disk (Disk7) failure.",
"HandlingSuggestion": null,
"EventId": "0x02000007",
"MessageId": "iBMCEvents.2.0.DiskExpInfo",
"MessageArgs": [
"Disk7",
{
"EventType": "Alert",
"EntryType": "Event",
"EventSubject": "cable",
"Created": "2017-04-24T02:19:52+00:00",
"Severity": "Warning",
"Level": "Minor",
"Message": "The SAS or PCIe cable to disk backplane is incorrectly connected.",
"HandlingSuggestion": null,
"EventId": "0x28000001",
"MessageId": "iBMCEvents.2.0.SasConnectErrInfo",
"MessageArgs": [],
"ObjectTypeList": [
{
"ObjectTypeId": 39,
"ObjectTypeLabel": "PCH",
"ObjectTypeId": 16,
"ObjectTypeLabel": "Mainboard",
"ObjectTypeId": 3,
"ObjectTypeLabel": "PSU",
"ObjectTypeId": 0,
"ObjectTypeLabel": "CPU",
"ObjectTypeId": 1,
"ObjectTypeLabel": "Memory",
"ObjectTypeId": 4,
"ObjectTypeLabel": "Fan",
"ObjectTypeId": 18,
"ObjectTypeLabel": "Chassis",
"ObjectTypeId": 44,
"ObjectTypeLabel": "System",
"ObjectTypeId": 26,
"ObjectTypeLabel": "BMC",
"ObjectTypeId": 49,
"ObjectTypeLabel": "Button",
"ObjectTypeId": 17,
"ObjectTypeLabel": "LCD",
"ObjectTypeId": 40,
"ObjectTypeLabel": "Cable",
"ObjectTypeId": 5,
"ObjectTypeLabel": "Disk Backplane",
"ObjectTypeId": 6,
"ObjectTypeLabel": "RAID Card",
"ObjectTypeId": 15,
"ObjectTypeLabel": "PCIe Riser",
"ObjectTypeId": 2,
"ObjectTypeLabel": "Disk",
"ObjectTypeId": 73,
"ObjectTypeLabel": "BMA",
"ObjectTypeId": 13,
"ObjectTypeLabel": "NIC",
"ObjectTypeId": 41,
"ObjectTypeLabel": "Port",
"Actions": {
"#LogService.ClearLog": {
"target": "/redfish/v1/Systems/1/LogServices/Log1/Actions/LogService.ClearLog",
"@Redfish.ActionInfo": "/redfish/v1/Systems/1/LogServices/Log1/ClearLogActionInfo",
"Oem": {
"Public": {
"#LogService.CollectSel": {
"target": "/redfish/v1/Systems/1/LogServices/Log1/Actions/Oem/Public/LogService.CollectSel",
"@Redfish.ActionInfo": "/redfish/v1/Systems/1/LogServices/Log1/CollectSelActionInfo",
"#LogService.QuerySelLogEntries": {
"target": "/redfish/v1/Systems/1/LogServices/Log1/Actions/Oem/Public/LogService.QuerySelLogEntries",
"@Redfish.ActionInfo": "/redfish/v1/Systems/1/LogServices/Log1/QuerySelLogEntriesActionInfo",
"Entries": {
"@odata.id": "/redfish/v1/Systems/1/LogServices/Log1/Entries"
}
}
}
}
}
}
}
}
]
}
]
}
]
}
]
}
}
}响应码:200
PATCH
命令功能
修改指定日志服务资源属性
命令格式
URL: https://device_ip/redfish/v1/Systems/system_id/LogServices/LogService_id
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type
If-Match: ifmatch_value请求消息体:
{
"DateTimeLocalOffset": offset
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| system_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 |
| logService_id | 日志服务资源的ID | 示例:Log1 |
| ifmatch_value | 请求消息的匹配参数 | 可通过对相应资源发起 GET操作,从响应头中获 取(对应于“ETag”参 数) |
| offset | 日志服务资源的时区 | ● 时间偏移 格式:+hh:mm或-hh:mm 取值范围:-12:00~ +14:00 示例:+08:59 ● 时区名称 示例:Asia/ Shanghai,America/ New_York |
使用指南
无
使用实例
请求样例:
PATCH https://device_ip/redfish/v1/Systems/system_id/LogServices/LogService_idX-Auth-Token: 123456789*********************** Content-Type: header_type If-Match: ifmatch_value 请求消息体:
{
"DateTimeLocalOffset": offset
}响应样例:
{
"@odata.context": "/redfish/v1/$metadata#Systems/Members/1/LogServices/Members/$entity",
"@odata.id": "/redfish/v1/Systems/1/LogServices/Log1",
"@odata.type": "#LogService.v1_0_3.LogService",
"Id": "Log1",
"Name": "System Service Log",
"MaxNumberOfRecords": 2000,
"OverWritePolicy": "WrapsWhenFull",
"DateTime": "2017-05-11T10:14:35+01:00",
"DateTimeLocalOffset": "GMT+01:00",
"ServiceEnabled": true,
"Oem": {
"Public": {
"HealthEvent": [
{
"EventType": "Alert",
"EntryType": "Event",
"EventSubject": "Disk5",
"Created": "2017-05-11T10:13:19+01:00",
"Severity": "Warning",
"Level": "Minor",
"Message": "The disk (Disk5) failure.",
"HandlingSuggestion": null,
"EventId": "0x02000007",
"MessageId": "iBMCEvents.2.0.DiskExpInfo",
"MessageArgs": [
"Disk5",
{
"EventType": "Alert",
"EntryType": "Event",
"EventSubject": "cable",
"Created": "2017-05-11T08:26:44+01:00",
"Severity": "Warning",
"Level": "Minor",
"Message": "The SAS or PCIe cable to disk backplane is incorrectly connected.",
"HandlingSuggestion": null,
"EventId": "0x28000001",
"MessageId": "iBMCEvents.2.0.SasConnectErrInfo",
"MessageArgs": [],
"ObjectTypeList": [
{
"ObjectTypeId": 39,
"ObjectTypeLabel": "PCH",
"ObjectTypeId": 16,
"ObjectTypeLabel": "Mainboard",
"ObjectTypeId": 3,
"ObjectTypeLabel": "PSU",
"ObjectTypeId": 0,
"ObjectTypeLabel": "CPU",
"ObjectTypeId": 1,
"ObjectTypeLabel": "Memory",
"ObjectTypeId": 4,
"ObjectTypeLabel": "Fan",
"ObjectTypeId": 18,
"ObjectTypeLabel": "Chassis",
"ObjectTypeId": 44,
"ObjectTypeLabel": "System",
"ObjectTypeId": 26,
"ObjectTypeLabel": "BMC",
"ObjectTypeId": 49,
"ObjectTypeLabel": "Button",
"ObjectTypeId": 17,
"ObjectTypeLabel": "LCD",
"ObjectTypeId": 40,
"ObjectTypeLabel": "Cable",
"ObjectTypeId": 5,
"ObjectTypeLabel": "Disk Backplane",
"ObjectTypeId": 6,
"ObjectTypeLabel": "RAID Card",
"ObjectTypeId": 15,
"ObjectTypeLabel": "PCIe Riser",
"ObjectTypeId": 2,
"ObjectTypeLabel": "Disk",
"ObjectTypeId": 73,
"ObjectTypeLabel": "BMA",
"ObjectTypeId": 13,
"ObjectTypeLabel": "NIC",
"ObjectTypeId": 41,
"ObjectTypeLabel": "Port",
"Actions": {
"#LogService.ClearLog": {
"target": "/redfish/v1/Systems/1/LogServices/Log1/Actions/LogService.ClearLog",
"@Redfish.ActionInfo": "/redfish/v1/Systems/1/LogServices/Log1/ClearLogActionInfo",
"Oem": {
"Public": {
"#LogService.CollectSel": {
"target": "/redfish/v1/Systems/1/LogServices/Log1/Actions/Oem/Public/LogService.CollectSel",
"@Redfish.ActionInfo": "/redfish/v1/Systems/1/LogServices/Log1/CollectSelActionInfo",
"#LogService.QuerySelLogEntries": {
"target": "/redfish/v1/Systems/1/LogServices/Log1/Actions/Oem/Public/LogService.QuerySelLogEntries",
"@Redfish.ActionInfo": "/redfish/v1/Systems/1/LogServices/Log1/QuerySelLogEntriesActionInfo",
"Entries": {
"@odata.id": "/redfish/v1/Systems/1/LogServices/Log1/Entries"
}
}
}
}
}
}
}
}
]
}
]
}
]
}
}
}响应码:200
POST (ACTION)
ClearLog
命令功能
清空日志信息
命令格式
URL: https://device_ip/redfish/v1/Systems/system_id/LogServices/LogService_id/Actions/LogService.ClearLog
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type请求消息体:
{}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| system_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 |
| LogService_id | 日志服务资源的ID | 当前仅可为Log1 |
使用指南
无
使用实例
请求样例:
POST https://device_ip/redfish/v1/Systems/system_id/LogServices/LogService_id/Actions/LogService.ClearLogX-Auth-Token: 123456789*********************** Content-Type: header_type 请求消息体:
{}响应样例:
{
"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
POST (ACTION)
CollectSel
命令功能
收集 SEL 日志
命令格式
URL: https://device_ip/redfish/v1/Systems/systems_id/LogServices/LogService_id/Actions/Oem/Public/LogService.CollectSel
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type请求消息体:
{
"StartEntryId": StartEntryId_value,
"EntriesCount": EntriesCount_value,
"SelLevel": SelLevelvalue,
"SelObjectType": SelObjectTypevalue,
"SelBeginTime": SelBeginTime_value,
"SelEndTime": SelEndTimevalue,
"SelSearchString": SelSearchStringvalue
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| system_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 |
| LogService_id | 日志服务资源的ID | 当前仅可为Log1 |
| StartEntryId_value | 查询SEL日志起始条数, 必选参数 | 大于0且不大于Sel日志总 数的整数 |
| EntriesCount_value | 日志数目,查询该数目的 SEL日志,必选参数 | 大于等于0且小于等于50 的整数 |
| SelLevelvalue | 日志级别,查询符合日志 级别条件的SEL日志,非 必选参数 | 支持的日志级别: ● Informational ● Minor ● Major ● Critical |
| SelObjectTypevalue | 主体类型,查询符合主体 类型条件的SEL日志,非 必选参数 | 可通过查询redfish/v1/ Systems/system_id/ LogServices/ LogServices_id资源获得主 体类型列表 |
| SelBeginTime_value | 起始时间,查询在起始时 间到结束时间范围内产生 的SEL日志,非必选参数 | 支持的日期格式: yyyy-MM-dd HH:mm:ss |
| SelEndTimevalue | 结束时间,查询在起始时 间到结束时间范围内产生 的SEL日志,非必选参数 | 支持的日期格式: yyyy-MM-dd HH:mm:ss |
| SelSearchStringvalue | 关键字,查询事件描述或 事件码包含该关键字的 SEL日志,非必选参数 | ASCII码在0x20~0x7E范围 内的字符组成的字符串, 长度为1~20个字符 |
使用指南
无
使用实例
请求样例:
POST https://device_ip/redfish/v1/Systems/system_id/LogServices/LogService_id/Actions/Oem/Public/LogService.QuerySelLogEntriesX-Auth-Token: 123456789*********************** Content-Type: header_type 请求消息体:
{
"StartEntryId": StartEntryId_value,
"EntriesCount": EntriesCount_value,
"SelLevel": SelLevelvalue,
"SelObjectType": SelObjectTypevalue,
"SelBeginTime": SelBeginTime_value,
"SelEndTime": SelEndTimevalue,
"SelSearchString": SelSearchStringvalue
}响应样例:
{
"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",
"Oem": {
"Public": {
"SelLogEntries": [
{
"level": "0",
"eventid": "120",
"subjecttype": "26",
"eventdesc": "iBMC is reset and started.",
"trigmode": "1",
"alerttime": "2018-08-08 11:26:07",
"status": "Asserted",
"eventcode": "0x1A000021",
"oldeventcode": "0x0941FFFF",
"eventsubject": "BMC Boot Up",
"eventsugg": "N/A."
},
{
"level": "0",
"eventid": "114",
"subjecttype": "26",
"eventdesc": "iBMC is reset and started.",
"trigmode": "1",
"alerttime": "2018-08-08 09:11:02",
"status": "Asserted",
"eventcode": "0x1A000021",
"oldeventcode": "0x0941FFFF",
"eventsubject": "BMC Boot Up",
"eventsugg": "N/A."
},
{
"level": "0",
"eventid": "95",
"subjecttype": "26",
"eventdesc": "iBMC is reset and started.",
"trigmode": "1",
"alerttime": "2018-08-08 08:37:05",
"status": "Asserted",
"eventcode": "0x1A000021",
"oldeventcode": "0x0941FFFF",
"eventsubject": "BMC Boot Up",
"eventsugg": "N/A."
},
{
"number": 23
}
]
}
}
}
]
}
}响应码:200
POST (ACTION)
CollectSel
命令功能
收集 SEL 日志
命令格式
URL: https://device_ip/redfish/v1/Systems/systems_id/LogServices/LogService_id/Actions/Oem/Public/LogService.CollectSel
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type请求消息体:
{
"Type": type_value,
"Content": content_value
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| LogService_id | 日志服务资源的ID | 示例:Log1 |
| type_value | 收集SEL日志文件方法 | ● URI |
| content_value | 收集SEL日志文件的路径 | ● 操作路径 ● 1、本地导出:"/tmp/ 文件路径" ● 2、远程导出:"文件传 输协议://用户名:密码 @ip地址/目录/文件名" ● 文件传输协议包括五 种:sftp、https、nfs、 cifs、scp |
使用指南
无
使用实例
请求样例:
POST https://device_ip/redfish/v1/Systems/system_id/LogServices/LogService_id/Actions/Oem/Public/LogService.CollectSelX-Auth-Token: 123456789*********************** Content-Type: header_type 请求消息体:
{
"Type": type_value,
"Content": content_value
}响应样例:
{
"@odata.context": "/redfish/v1/$metadata#TaskService/Tasks/Members/$entity",
"@odata.type": "#Task.v1_0_2.Task",
"@odata.id": "/redfish/v1/TaskService/Tasks/1",
"Id": "1",
"Name": "1",
"Description": "",
"TaskState": "Running",
"TaskStatus": "OK",
"StartTime": "2017-05-09T16:57:14+00:00",
"Messages": [],
"PercentComplete": null,
"Oem": {
"Public": {
"TaskPercentage": null
}
}
}响应码:202