Files
logpile/bible-local/docs/msi-redfish-api.md
Mikhail Chusavitin 96e65d8f65 feat: Redfish hardware event log collection + MSI ghost GPU filter + inventory improvements
- Collect hardware event logs (last 7 days) from Systems and Managers/SEL LogServices
- Parse AMI raw IPMI dump messages into readable descriptions (Sensor_Type: Event_Type)
- Filter out audit/journal/non-hardware log services; only SEL from Managers
- MSI ghost GPU filter: exclude processor GPU entries with temperature=0 when host is powered on
- Reanimator collected_at uses InventoryData/Status.LastModifiedTime (30-day fallback)
- Invalidate Redfish inventory CRC groups before host power-on
- Log inventory LastModifiedTime age in collection logs
- Drop SecureBoot collection (SecureBootMode, SecureBootDatabases) — not hardware inventory
- Add build version to UI footer via template
- Add MSI Redfish API reference doc to bible-local/docs/

ADL-032–ADL-035

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 23:47:22 +03:00

344 lines
16 KiB
Markdown

# MSI BMC Redfish API Reference
Source: MSI Enterprise Platform Solutions — Redfish BMC User Guide v1.0 (AMI/MegaRAC stack).
Spec compliance: DSP0266 1.15.1, DSP8010 2019.2.
> This document is trimmed to sections relevant to LOGPile collection and inventory analysis.
> Auth, LDAP/AD, SMTP, VirtualMedia, Certificates, RADIUS, Composability, and BMC config
> sections are omitted.
---
## Supported HTTP methods
`GET`, `POST`, `PATCH`, `DELETE`. Unsupported methods return `405`.
PATCH requires an `If-Match` / `ETag` precondition header; missing header → `428`, mismatch → `412`.
---
## 1. Core Redfish API endpoints
| Resource | URI | Schema |
|---|---|---|
| Service Root | `/redfish/v1/` | ServiceRoot.v1_7_0 |
| ComputerSystem Collection | `/redfish/v1/Systems` | ComputerSystemCollection |
| ComputerSystem | `/redfish/v1/Systems/{sys}` | ComputerSystem.v1_16_2 |
| Memory Collection | `/redfish/v1/Systems/{sys}/Memory` | MemoryCollection |
| Memory | `/redfish/v1/Systems/{sys}/Memory/{mem}` | Memory.v1_19_0 |
| MemoryMetrics | `/redfish/v1/Systems/{sys}/Memory/{mem}/MemoryMetrics` | MemoryMetrics.v1_7_0 |
| MemoryDomain Collection | `/redfish/v1/Systems/{sys}/MemoryDomain` | MemoryDomainCollection |
| MemoryDomain | `/redfish/v1/Systems/{sys}/MemoryDomain/{dom}` | MemoryDomain.v1_2_3 |
| MemoryChunks Collection | `/redfish/v1/Systems/{sys}/MemoryDomain/{dom}/MemoryChunks` | MemoryChunksCollection |
| MemoryChunks | `/redfish/v1/Systems/{sys}/MemoryDomain/{dom}/MemoryChunks/{chunk}` | MemoryChunks.v1_4_0 |
| Processor Collection | `/redfish/v1/Systems/{sys}/Processors` | ProcessorCollection |
| Processor | `/redfish/v1/Systems/{sys}/Processors/{proc}` | Processor.v1_15_0 |
| SubProcessors Collection | `/redfish/v1/Systems/{sys}/Processors/{proc}/SubProcessors` | ProcessorCollection |
| SubProcessor | `/redfish/v1/Systems/{sys}/Processors/{proc}/SubProcessors/{sub}` | Processor.v1_15_0 |
| ProcessorMetrics | `/redfish/v1/Systems/{sys}/Processors/{proc}/ProcessorMetrics` | ProcessorMetrics.v1_4_0 |
| Bios | `/redfish/v1/Systems/{sys}/Bios` | Bios.v1_2_0 |
| SimpleStorage Collection | `/redfish/v1/Systems/{sys}/SimpleStorage` | SimpleStorageCollection |
| SimpleStorage | `/redfish/v1/Systems/{sys}/SimpleStorage/{ss}` | SimpleStorage.v1_3_0 |
| Storage Collection | `/redfish/v1/Systems/{sys}/Storage` | StorageCollection |
| Storage | `/redfish/v1/Systems/{sys}/Storage/{stor}` | Storage.v1_9_0 |
| StorageController Collection | `/redfish/v1/Systems/{sys}/Storage/{stor}/Controllers` | StorageControllerCollection |
| StorageController | `/redfish/v1/Systems/{sys}/Storage/{stor}/Controllers/{ctrl}` | StorageController.v1_0_0 |
| Drive | `/redfish/v1/Systems/{sys}/Storage/{stor}/Drives/{drv}` | Drive.v1_13_0 |
| Volume Collection | `/redfish/v1/Systems/{sys}/Storage/{stor}/Volumes` | VolumeCollection |
| Volume | `/redfish/v1/Systems/{sys}/Storage/{stor}/Volumes/{vol}` | Volume.v1_5_0 |
| NetworkInterface Collection | `/redfish/v1/Systems/{sys}/NetworkInterfaces` | NetworkInterfaceCollection |
| NetworkInterface | `/redfish/v1/Systems/{sys}/NetworkInterfaces/{nic}` | NetworkInterface.v1_2_0 |
| EthernetInterface (System) | `/redfish/v1/Systems/{sys}/EthernetInterfaces/{eth}` | EthernetInterface.v1_6_2 |
| GraphicsController Collection | `/redfish/v1/Systems/{sys}/GraphicsControllers` | GraphicsControllerCollection |
| GraphicsController | `/redfish/v1/Systems/{sys}/GraphicsControllers/{gpu}` | GraphicsController.v1_0_0 |
| USBController Collection | `/redfish/v1/Systems/{sys}/USBControllers` | USBControllerCollection |
| USBController | `/redfish/v1/Systems/{sys}/USBControllers/{usb}` | USBController.v1_0_0 |
| SecureBoot | `/redfish/v1/Systems/{sys}/SecureBoot` | SecureBoot.v1_1_0 |
| LogService Collection (System) | `/redfish/v1/Systems/{sys}/LogServices` | LogServiceCollection |
| LogService (System) | `/redfish/v1/Systems/{sys}/LogServices/{log}` | LogService.v1_1_3 |
| LogEntry Collection | `/redfish/v1/Systems/{sys}/LogServices/{log}/Entries` | LogEntryCollection |
| LogEntry | `/redfish/v1/Systems/{sys}/LogServices/{log}/Entries/{entry}` | LogEntry.v1_12_0 |
| Chassis Collection | `/redfish/v1/Chassis` | ChassisCollection |
| Chassis | `/redfish/v1/Chassis/{ch}` | Chassis.v1_15_0 |
| Power | `/redfish/v1/Chassis/{ch}/Power` | Power.v1_5_4 |
| PowerSubSystem | `/redfish/v1/Chassis/{ch}/PowerSubSystem` | PowerSubsystem.v1_1_0 |
| PowerSupplies Collection | `/redfish/v1/Chassis/{ch}/PowerSubSystem/PowerSupplies` | PowerSupplyCollection |
| PowerSupply | `/redfish/v1/Chassis/{ch}/PowerSubSystem/PowerSupplies/{psu}` | PowerSupply.v1_3_0 |
| PowerSupplyMetrics | `/redfish/v1/Chassis/{ch}/PowerSubSystem/PowerSupplies/{psu}/Metrics` | PowerSupplyMetrics.v1_0_1 |
| Thermal | `/redfish/v1/Chassis/{ch}/Thermal` | Thermal.v1_5_3 |
| ThermalSubSystem | `/redfish/v1/Chassis/{ch}/ThermalSubSystem` | ThermalSubsystem.v1_0_0 |
| ThermalMetrics | `/redfish/v1/Chassis/{ch}/ThermalSubSystem/ThermalMetrics` | ThermalMetrics.v1_0_1 |
| Fans Collection | `/redfish/v1/Chassis/{ch}/ThermalSubSystem/Fans` | FanCollection |
| Fan | `/redfish/v1/Chassis/{ch}/ThermalSubSystem/Fans/{fan}` | Fan.v1_1_1 |
| Sensor Collection | `/redfish/v1/Chassis/{ch}/Sensors` | SensorCollection |
| Sensor | `/redfish/v1/Chassis/{ch}/Sensors/{sen}` | Sensor.v1_0_2 |
| PCIeDevice Collection | `/redfish/v1/Chassis/{ch}/PCIeDevices` | PCIeDeviceCollection |
| PCIeDevice | `/redfish/v1/Chassis/{ch}/PCIeDevices/{dev}` | PCIeDevice.v1_9_0 |
| PCIeFunction Collection | `/redfish/v1/Chassis/{ch}/PCIeDevices/{dev}/PCIeFunctions` | PCIeFunctionCollection |
| PCIeFunction | `/redfish/v1/Chassis/{ch}/PCIeDevices/{dev}/PCIeFunctions/{fn}` | PCIeFunction.v1_2_3 |
| PCIeSlots | `/redfish/v1/Chassis/{ch}/PCIeSlots` | PCIeSlots.v1_5_0 |
| NetworkAdapter Collection | `/redfish/v1/Chassis/{ch}/NetworkAdapters` | NetworkAdapterCollection |
| NetworkAdapter | `/redfish/v1/Chassis/{ch}/NetworkAdapters/{na}` | NetworkAdapter.v1_8_0 |
| NetworkDeviceFunction Collection | `/redfish/v1/Chassis/{ch}/NetworkAdapters/{na}/NetworkDeviceFunctions` | NetworkDeviceFunctionCollection |
| NetworkDeviceFunction | `/redfish/v1/Chassis/{ch}/NetworkAdapters/{na}/NetworkDeviceFunctions/{fn}` | NetworkDeviceFunction.v1_5_0 |
| Assembly | `/redfish/v1/Chassis/{ch}/Assembly` | Assembly.v1_2_2 |
| Assembly (Drive) | `/redfish/v1/Systems/{sys}/Storage/{stor}/Drives/{drv}/Assembly` | Assembly.v1_2_2 |
| Assembly (Processor) | `/redfish/v1/Systems/{sys}/Processors/{proc}/Assembly` | Assembly.v1_2_2 |
| Assembly (Memory) | `/redfish/v1/Systems/{sys}/Memory/{mem}/Assembly` | Assembly.v1_2_2 |
| Assembly (NetworkAdapter) | `/redfish/v1/Chassis/{ch}/NetworkAdapters/{na}/Assembly` | Assembly.v1_2_2 |
| Assembly (PCIeDevice) | `/redfish/v1/Chassis/{ch}/PCIeDevices/{dev}/Assembly` | Assembly.v1_2_2 |
| MediaController Collection | `/redfish/v1/Chassis/{ch}/MediaControllers` | MediaControllerCollection |
| MediaController | `/redfish/v1/Chassis/{ch}/MediaControllers/{mc}` | MediaController.v1_1_0 |
| LogService Collection (Chassis) | `/redfish/v1/Chassis/{ch}/LogServices` | LogServiceCollection |
| LogService (Chassis) | `/redfish/v1/Chassis/{ch}/LogServices/{log}` | LogService.v1_1_3 |
| Manager Collection | `/redfish/v1/Managers` | ManagerCollection |
| Manager | `/redfish/v1/Managers/{mgr}` | Manager.v1_13_0 |
| EthernetInterface (Manager) | `/redfish/v1/Managers/{mgr}/EthernetInterfaces/{eth}` | EthernetInterface.v1_6_2 |
| LogService Collection (Manager) | `/redfish/v1/Managers/{mgr}/LogServices` | LogServiceCollection |
| LogService (Manager) | `/redfish/v1/Managers/{mgr}/LogServices/{log}` | LogService.v1_1_3 |
| UpdateService | `/redfish/v1/UpdateService` | UpdateService.v1_6_0 |
| TaskService | `/redfish/v1/TasksService` | TaskService.v1_1_4 |
| Task Collection | `/redfish/v1/TaskService/Tasks` | TaskCollection |
| Task | `/redfish/v1/TaskService/Tasks/{task}` | Task.v1_4_2 |
---
## 2. Telemetry API endpoints
| Resource | URI | Schema |
|---|---|---|
| TelemetryService | `/redfish/v1/TelemetryService` | TelemetryService.v1_2_1 |
| MetricDefinition Collection | `/redfish/v1/TelemetryService/MetricDefinitions` | MetricDefinitionCollection |
| MetricDefinition | `/redfish/v1/TelemetryService/MetricDefinitions/{md}` | MetricDefinition.v1_0_3 |
| MetricReportDefinition Collection | `/redfish/v1/TelemetryService/MetricReportDefinitions` | MetricReportDefinitionCollection |
| MetricReportDefinition | `/redfish/v1/TelemetryService/MetricReportDefinitions/{mrd}` | MetricReportDefinition.v1_3_0 |
| MetricReport Collection | `/redfish/v1/TelemetryService/MetricReports` | MetricReportCollection |
| MetricReport | `/redfish/v1/TelemetryService/MetricReports/{mr}` | MetricReport.v1_2_0 |
| Telemetry LogService | `/redfish/v1/TelemetryService/LogService` | LogService.v1_1_3 |
| Telemetry LogEntry Collection | `/redfish/v1/TelemetryService/LogService/Entries` | LogEntryCollection |
---
## 3. Processor / NIC sub-resources (GPU-relevant)
| Resource | URI |
|---|---|
| Processor (NetworkAdapter) | `/redfish/v1/Chassis/{ch}/NetworkAdapters/{na}/Processors/{proc}` |
| AccelerationFunction Collection | `/redfish/v1/Systems/{sys}/Processors/{proc}/AccelerationFunctions` |
| AccelerationFunction | `/redfish/v1/Systems/{sys}/Processors/{proc}/AccelerationFunctions/{fn}` |
| Port Collection (NetworkAdapter) | `/redfish/v1/Chassis/{ch}/NetworkAdapters/{na}/Ports` |
| Port (GraphicsController) | `/redfish/v1/Systems/{sys}/GraphicsControllers/{gpu}/Ports/{port}` |
| OperatingConfig Collection | `/redfish/v1/Systems/{sys}/Processors/{proc}/OperatingConfigs` |
| OperatingConfig | `/redfish/v1/Systems/{sys}/Processors/{proc}/OperatingConfigs/{cfg}` |
---
## 4. Error response format
On error, the service returns an HTTP status code and a JSON body with a single `error` property:
```json
{
"error": {
"code": "Base.1.12.0.ActionParameterMissing",
"message": "...",
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_8.Message",
"MessageId": "Base.1.12.0.ActionParameterMissing",
"Message": "...",
"MessageArgs": [],
"Severity": "Warning",
"Resolution": "..."
}
]
}
}
```
**Common status codes:**
| Code | Meaning |
|------|---------|
| 200 | OK with body |
| 201 | Created |
| 204 | Success, no body |
| 400 | Bad request / validation error |
| 401 | Unauthorized |
| 403 | Forbidden / firmware update in progress |
| 404 | Resource not found |
| 405 | Method not allowed |
| 412 | ETag precondition failed (PATCH) |
| 415 | Unsupported media type |
| 428 | Missing precondition header (PATCH) |
| 501 | Not implemented |
**Request validation sequence:**
1. Authorization check → 401
2. Entity privilege check → 403
3. URI existence → 404
4. Firmware update lock → 403
5. Method allowed → 405
6. Media type → 415
7. Body format → 400
8. PATCH: ETag header → 428/412
9. Property validation → 400
---
## 5. OEM: Inventory refresh (AMI/MSI-specific)
### 5.1 InventoryCrc — force component re-inventory
`GET/POST/DELETE /redfish/v1/Systems/{sys}/Oem/Ami/Inventory/Crc`
The `GroupCrcList` field lists current CRC checksums per component group. When a group's CRC
changes (host sends new inventory) or is explicitly zeroed out via POST, the BMC discards its
cached inventory and re-reads that group from the host.
**CRC groups:**
| Group | Covers |
|-------|--------|
| `CPU` | Processors, ProcessorMetrics |
| `DIMM` | Memory, MemoryDomains, MemoryChunks, MemoryMetrics |
| `PCIE` | Storage, PCIeDevices, NetworkInterfaces, NetworkAdapters |
| `CERTIFICATES` | Boot Certificates |
| `SECURBOOT` | SecureBoot data |
**POST — invalidate selected groups (force re-inventory):**
```
POST /redfish/v1/Systems/{sys}/Oem/Ami/Inventory/Crc
Content-Type: application/json
{
"GroupCrcList": [
{ "CPU": 0 },
{ "DIMM": 0 },
{ "PCIE": 0 }
]
}
```
Setting a group's value to `0` signals the BMC to invalidate and repopulate that group on next
host inventory push (typically at next boot or host-interface inventory cycle).
**DELETE** — remove all CRC records entirely.
**Note:** Inventory data is populated by the host via the Redfish Host Interface (in-band),
not by the BMC itself. Zeroing a CRC group does not immediately re-read hardware — it marks
the group as stale so the next host-side inventory push will be accepted. A cold reboot is the
most reliable trigger.
### 5.2 InventoryData Status — monitor inventory processing
`GET /redfish/v1/Oem/Ami/InventoryData/Status`
Available only after the host has posted an inventory file. Shows current processing state.
**Status enum:**
| Value | Meaning |
|-------|---------|
| `BootInProgress` | Host is booting |
| `Queued` | Processing task queued |
| `In-Progress` | Processing running in background |
| `Ready` / `Completed` | Processing finished successfully |
| `Failed` | Processing failed |
Response also includes:
- `InventoryData.DeletedModules` — array of groups updated in this population cycle
- `InventoryData.Messages` — warnings/errors encountered during processing
- `ProcessingTime` — milliseconds taken
- `LastModifiedTime` — ISO 8601 timestamp of last successful update
### 5.3 Systems OEM properties — Inventory reference
`GET /redfish/v1/Systems/{sys}``Oem.Ami` contains:
| Property | Notes |
|----------|-------|
| `Inventory` | Reference to InventoryCrc URI + current GroupCrc data |
| `RedfishVersion` | BIOS Redfish version (populated via Host Interface) |
| `RtpVersion` | BIOS RTP version (populated via Host Interface) |
| `ManagerBootConfiguration.ManagerBootMode` | PATCH to trigger soft reset: `SoftReset` / `ResetTimeout` / `None` |
---
## 6. OEM: Component state actions
### 6.1 Memory enable/disable
```
POST /redfish/v1/Systems/{sys}/Memory/{mem}/Actions/AmiBios.ChangeState
Content-Type: application/json
{ "State": "Disabled" }
```
Response: 204.
### 6.2 PCIeFunction enable/disable
```
POST /redfish/v1/Chassis/{ch}/PCIeDevices/{dev}/PCIeFunctions/{fn}/Actions/AmiBios.ChangeState
Content-Type: application/json
{ "State": "Disabled" }
```
Response: 204.
---
## 7. OEM: Storage sensor readings
`GET /redfish/v1/Systems/{sys}/Storage/{stor}``Oem.Ami.StorageControllerSensors`
Array of sensor objects per storage controller instance. Each entry exposes:
- `Reading` (Number) — current sensor value
- `ReadingType` (String) — type of reading
- `ReadingUnit` (String) — unit
---
## 8. OEM: Power and Thermal OwnerLUN
Both `GET /redfish/v1/Chassis/{ch}/Power` and `GET /redfish/v1/Chassis/{ch}/Thermal` expose
`Oem.Ami.OwnerLUN` (Number, read-only) — the IPMI LUN associated with each
temperature/fan/voltage sensor entry. Useful for correlating Redfish sensor readings with IPMI
SDR records.
---
## 9. UpdateService
`GET /redfish/v1/UpdateService``Oem.Ami.BMC.DualImageConfiguration`:
| Property | Description |
|----------|-------------|
| `ActiveImage` | Currently active BMC image slot |
| `BootImage` | Image slot BMC boots from |
| `FirmwareImage1Name` / `FirmwareImage1Version` | First image slot name + version |
| `FirmwareImage2Name` / `FirmwareImage2Version` | Second image slot name + version |
Standard `SimpleUpdate` action available at `/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate`.
---
## 10. Inventory refresh summary
| Approach | Trigger | Latency | Scope |
|----------|---------|---------|-------|
| Host reboot | Physical/soft reset | Minutes | All groups |
| `POST InventoryCrc` (groups = 0) | Explicit API call | Next host inventory push | Selected groups |
| Firmware update (`SimpleUpdate`) | Explicit API call | Minutes + reboot | Full platform |
| Sensor/telemetry reads | Always live on GET | Immediate | Sensors only |
**Key constraint:** `InventoryCrc POST` marks groups stale but does not re-read hardware
directly. Actual inventory data flows from the host to BMC via the Redfish Host Interface
in-band channel, typically during POST/boot. For immediate inventory refresh without a full
reboot, a soft reset via `ManagerBootMode: SoftReset` PATCH may be sufficient on some
configurations.