跳到主要内容

POST – 收集 BMC 诊断数据

使用 POST 方法收集 BMC 诊断数据。

请求 URL

POST https://<BMC_IPADDR>/redfish/v1/Systems/1/LogServices/DiagnosticLog/Actions/LogService.CollectDiagnosticData

请求正文

字段类型描述

DiagosticDataType

字符串“Manager”

响应正文

状态代码

HTTP 状态代码错误消息 ID
500InternalError

示例

以下示例是 POST 正文。

{
"DiagnosticDataType" : "Manager"
}

此操作在成功时返回一个任务。返回以下示例 JSON 响应:

{
"StartTime": "2022-09-19T02:57:13+00:00",
"@odata.etag": "\"1663556233921\"",
"@odata.context": "/redfish/v1/$metadata#Task.Task",
"HidePayload": true,
"@odata.type": "#Task.v1_5_1.Task",
"Id": "34be0171-cfc9-4cf8-9d40-2c6224b0800e",
"TaskState": "New",
"Messages": [],
"Name": "Task 34be0171-cfc9-4cf8-9d40-2c6224b0800e",
"TaskMonitor": "/redfish/v1/TaskService/0f121786-b93a-4095-bc94-ab749ebe43ab",
"@odata.id": "/redfish/v1/TaskService/Tasks/34be0171-cfc9-4cf8-9d40-2c6224b0800e",
"Description": "This resource represents a task for a Redfish implementation."
}

此任务将继续监控诊断数据生成进度。用户可访问返回的属性“TaskMonitor”中指示的 URI 来获取进度、任务状态和更多详细信息。返回以下示例 JSON 响应。

{
"StartTime": "2022-09-19T02:57:13+00:00",
"Id": "34be0171-cfc9-4cf8-9d40-2c6224b0800e",
"HidePayload": true,
"@odata.context": "/redfish/v1/$metadata#Task.Task",
"TaskStatus": "OK",
"@odata.etag": "\"1663556278229\"",
"@odata.type": "#Task.v1_5_1.Task",
"Messages": [
{
"Message": "The request completed successfully.",
"MessageId": "Base.1.12.Success",
"MessageSeverity": "OK",
"@odata.type": "#Message.v1_1_2.Message",
"MessageArgs": [],
"Resolution": "None"
},
{
"Message": "'FFDC' diagnostic data collected.",
"MessageId": "LogService.1.0.DiagnosticDataCollected",
"MessageSeverity": "OK",
"@odata.type": "#Message.v1_1_2.Message",
"Resolution": "None.",
"MessageArgs": [
"FFDC"
]
}
],
"EndTime": "2022-09-19T02:57:58+00:00",
"TaskState": "Completed",
"Name": "Task 34be0171-cfc9-4cf8-9d40-2c6224b0800e",
"TaskMonitor": "/redfish/v1/TaskService/0f121786-b93a-4095-bc94-ab749ebe43ab",
"@odata.id": "/redfish/v1/TaskService/Tasks/34be0171-cfc9-4cf8-9d40-2c6224b0800e",
"Description": "This resource represents a task for a Redfish implementation."
}

任务完成时,用户可以在返回的任务监控器的 HTTP 标头“Location”中找到 LogEntry 资源路径。此 LogEntry 资源告诉用户所获得的诊断数据的基本信息。借助 Redfish X-Auth-Token(请参阅POST – 创建会话),用户可以使用属性“AdditionalDataURI”中指示的 URI 通过 HTTPS 来下载诊断数据。下面是相应 LogEntry 资源的示例。

{
"OemRecordFormat": "Lenovo",
"AdditionalDataSizeBytes": 18521125,
"@odata.etag": "\"3bd1c929ad52266950f\"",
"@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry",
"Description": "This resource is used to represent a log entry for log services for a Redfish implementation.",
"DiagnosticDataType": "Manager",
"Name": "FFDC",
"Created": "2022-09-19T02:57:53+00:00",
"Id": "FFDC",
"EntryType": "Oem",
"@odata.type": "#LogEntry.v1_11_0.LogEntry",
"@odata.id": "/redfish/v1/Systems/1/LogServices/DiagnosticLog/Entries/FFDC",
"AdditionalDataURI": "/imm_dump/FFDC/7D72RCZ000_1234567890_xcc_220919-025717.tzz"
}

在此示例中,可以使用 Redfish X-Auth-Token 通过“https://<bmc_ip>/imm_dump/FFDC/7D72RCZ000_1234567890_xcc_220919-025717.tzz”下载所获得的诊断数据。