EventLog
更新时间: 2026/07/01
在AtomGit上查看源码ResourceDefinition
uris
/redfish/v1/Managers/manager_id/LogServices/EventLog
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 | false | - | 指定日志服务资源的覆盖策略 ● Unknown:未知 ● WrapsWhenFull:环形队列记录 ● NeverOverWrites:写满停止记录 |
| DateTime | string | true | - | 指定日志服务资源的系统时间 说明:已屏蔽该属性值频繁变化导致的事件上报 |
| DateTimeLocalOffset | string | true | - | 指定日志服务资源的时区 |
| ServiceEnabled | boolean | true | - | 指定日志服务资源的启用状态 ● true ● false |
| Oem { | object | true | - | 自定义属性 |
| Oem.Public { | object | true | - | 自定义属性 |
| Oem.Public.HealthEvent [ { | array | true | - | 健康事件信息 |
| Oem.Public.HealthEvent[].EventType | string | true | - | 事件类型 ● StatusChange:状态变更 ● ResourceUpdated:资源更新 ● ResourceAdded:资源新增 ● ResourceRemoved:资源移除 ● Alert:告警事件 |
| Oem.Public.HealthEvent[].EntryType | string | true | - | 日志类型 ● Event:事件记录 ● SEL:系统事件日志 ● Oem:自定义私有事件 |
| Oem.Public.HealthEvent[].EventSubject | string | true | - | 事件源标识 |
| Oem.Public.HealthEvent[].Created | string | true | - | 创建时间 |
| Oem.Public.HealthEvent[].Severity | string | true | - | 严重性级别 ● OK:正常 ● Warning:告警 ● Critical:致命 |
| Oem.Public.HealthEvent[].Level | string | true | - | 自定义严重性级别 ● Informational:提示信息 ● Minor:轻微告警 ● Major:严重告警 ● Critical:致命告警 |
| Oem.Public.HealthEvent[].Message | string | true | - | 日志描述 |
| Oem.Public.HealthEvent[].HandlingSuggestion | string | true | - | 告警处理建议,@#AB;符号用于标示换行符 |
| Oem.Public.HealthEvent[].EventId | string | true | - | 事件码 |
| Oem.Public.HealthEvent[].SystemId | string | true | - | 当前事件归属的系统标识 ● null代表来自公共部件 ● 字符串代表归属系统 |
| Oem.Public.HealthEvent[].MessageId | string | true | - | 消息ID |
| Oem.Public.HealthEvent[].MessageArgs[ ] | array | true | - | 消息参数 |
| } ] | ||||
| Oem.Public.ObjectTypeList [ { | array | true | - | 主体类型列表 |
| Oem.Public.ObjectTypeList[].ObjectTypeId | number | true | - | 主体类型id |
| Oem.Public.ObjectTypeList[].ObjectTypeLabel | string | true | - | 主体类型名称 |
| } ] | ||||
| } | ||||
| } | ||||
| Actions { | object | true | - | 指定日志服务组密钥导入操作 |
| Actions.#LogService.ClearLog { | object | true | - | 清空日志操作 |
| Actions.#LogService.ClearLog.target | string | true | - | Action操作路径 |
| Actions.#LogService.ClearLog.@Redfish.ActionInfo | string | true | - | Action操作信息查询路径 |
| } | ||||
| } | ||||
| Entries { | object | true | - | 日志集合资源的访问路径 |
| Entries.@odata.id | string | true | - | Entries资源的访问路径 |
| } |
supported_methods
- GET
- PATCH
HTTP methods
GET
命令功能
查询全量告警信息
命令格式
URL: https://device_ip/redfish/v1/Managers/manager_id/LogServices/EventLog
请求头:
X-Auth-Token: auth_value请求消息体: 无
参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| device_ip | 登录设备的IP地址 | IPv4或IPv6地址 |
| manager_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 |
| auth_value | 执行该GET请求时,必须在“Headers”中携带“X-Auth-Token”值用于鉴权 | 可通过/redfish/v1/SessionService/Sessions创建会话时获得 |
使用指南
无
使用实例
请求样例: GET https://device_ip/redfish/v1/Managers/manager_id/LogServices/EventLog
X-Auth-Token: auth_value 请求消息体:无
响应样例:
json
{
"@odata.context": "/redfish/v1/$metadata#LogService.LogService",
"@odata.id": "/redfish/v1/Managers/1/LogServices/EventLog",
"@odata.type": "#LogService.v1_0_3.LogService",
"Id": "EventLog",
"Name": "Event Log",
"MaxNumberOfRecords": 10000,
"OverWritePolicy": "WrapsWhenFull",
"DateTime": "2017-05-09T07:56:34+00:00",
"DateTimeLocalOffset": "GMT",
"Actions": {
"#LogService.ClearLog": {
"target": "/redfish/v1/Managers/1/LogServices/Log1/Actions/LogService.ClearLog",
"@Redfish.ActionInfo": "/redfish/v1/Managers/1/LogServices/Log1/ClearLogActionInfo"
}
},
"Entries": {
"@odata.id": "/redfish/v1/Managers/1/LogServices/Log1/Entries"
},
"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",
"SystemId": "2",
"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",
"SystemId": "1",
"MessageId": "iBMCEvents.2.0.DiskExpInfo",
"MessageArgs": [
"Disk7"
]
},
{
"EventType": "Alert",
"EntryType": "Event",
"EventSubject": "BMC",
"Created": "2017-04-24T02:19:52+00:00",
"Severity": "Warning",
"Level": "Minor",
"Message": "SSL certificate is about to expire or has expired",
"HandlingSuggestion": "Import the new certificate",
"EventId": "0x1A000023",
"MessageId": "iBMCEvents.2.0.BMCCertOverDue",
"MessageArgs": [
"SSL"
]
}
],
"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"
}
]
}
}
}响应码:200
PATCH
命令功能
设置事件记录模式
命令格式
URL: https://device_ip/redfish/v1/Managers/manager_id/LogServices/EventLog
请求头:
X-Auth-Token: auth_value
Content-Type: header_type
If-Match: ifmatch_value请求消息体:
json
{
"OverWritePolicy": "WrapsWhenFull" / "NeverOverWrites"
}请求头参数说明
参见 请求头参数说明
请求体参数说明
无
使用指南
无
使用实例
请求样例: PATCH https://device_ip/redfish/v1/Managers/manager_id/LogServices/EventLog
X-Auth-Token: auth_value 请求消息体:
json
{
"OverWritePolicy": "WrapsWhenFull" / "NeverOverWrites"
}响应样例:
json
{
"@odata.context": "/redfish/v1/$metadata#LogService.LogService",
"@odata.id": "/redfish/v1/Managers/1/LogServices/EventLog",
"@odata.type": "#LogService.v1_0_3.LogService",
"Id": "EventLog",
"Name": "Event Log",
"MaxNumberOfRecords": 10000,
"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",
"SystemId": "2",
"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",
"SystemId": "1",
"MessageId": "iBMCEvents.2.0.DiskExpInfo",
"MessageArgs": [
"Disk7"
]
},
{
"EventType": "Alert",
"EntryType": "Event",
"EventSubject": "BMC",
"Created": "2017-04-24T02:19:52+00:00",
"Severity": "Warning",
"Level": "Minor",
"Message": "SSL certificate is about to expire or has expired",
"HandlingSuggestion": "Import the new certificate",
"EventId": "0x1A000023",
"MessageId": "iBMCEvents.2.0.BMCCertOverDue",
"MessageArgs": [
"SSL"
]
}
],
"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"
}
]
}
}
}响应码:200