Closed matejzero closed 4 years ago
I know this is Lenovo specific exporter, but I also have a Dell server on hand and can compare.
Dell doesn't export MemoryLocation. But I get the DIMM slots in Name
and DeviceLocator
.
JSON from Dell:
{
"@odata.context": "/redfish/v1/$metadata#Memory.Memory",
"@odata.type": "#Memory.v1_6_0.Memory",
"@odata.id": "/redfish/v1/Systems/System.Embedded.1/Memory/DIMM.Socket.A2",
"AllowedSpeedsMHz": [
3200
],
"AllowedSpeedsMHz@odata.count": 1,
"Assembly": {
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Assembly"
},
"BaseModuleType": null,
"BusWidthBits": 72,
"CacheSizeMiB": 0,
"CapacityMiB": 32768,
"DataWidthBits": 64,
"Description": "DIMM A2",
"DeviceLocator": "DIMM A2",
"ErrorCorrection": "MultiBitECC",
"FirmwareRevision": "",
"Id": "DIMM.Socket.A2",
"Links": {
"Chassis": {
"@odata.id": "/redfish/v1/Chassis/System.Embedded.1"
}
},
"LogicalSizeMiB": 0,
"Manufacturer": "Hynix Semiconductor",
"MaxTDPMilliWatts": [],
"MaxTDPMilliWatts@odata.count": 0,
"MemoryDeviceType": "DDR4",
"MemoryMedia": [],
"MemoryMedia@odata.count": 0,
"MemorySubsystemControllerManufacturerID": null,
"MemorySubsystemControllerProductID": null,
"MemoryType": "DRAM",
"Metrics": {
"@odata.id": "/redfish/v1/Systems/System.Embedded.1/Memory/DIMM.Socket.A2/MemoryMetrics"
},
"ModuleManufacturerID": null,
"ModuleProductID": null,
"Name": "DIMM A2",
"NonVolatileSizeMiB": 0,
"Oem": {
"Dell": {
"DellMemory": {
"BankLabel": "A",
"LastSystemInventoryTime": "2020-01-23T14:47:56+00:00",
"LastUpdateTime": "2020-01-04T13:51:14+00:00",
"ManufactureDate": "Mon Dec 09 13:00:00 2019 UTC",
"MemoryTechnology": "DRAM",
"Model": "DDR4 DIMM",
"RemainingRatedWriteEndurancePercent": null,
"SystemEraseCapability": "NotSupported",
"@odata.context": "/redfish/v1/$metadata#DellMemory.DellMemory",
"@odata.type": "#DellMemory.v1_1_0.DellMemory",
"@odata.id": "/redfish/v1/Dell/Systems/System.Embedded.1/Memory/DellMemory/DIMM.Socket.A2"
}
}
},
"OperatingMemoryModes": [
"Volatile"
],
"OperatingMemoryModes@odata.count": 1,
"OperatingSpeedMhz": 3200,
"PartNumber": "zzzzzzz",
"RankCount": 2,
"SerialNumber": "xxxxx",
"Status": {
"Health": "OK",
"State": "Enabled"
},
"VolatileSizeMiB": 32768
}
@matejzero created a issue on upstream https://github.com/stmcginnis/gofish/issues/61, will try to fix it once there is a update
@matejzero Please grab the latest source code, build the binary and then test if the issue is fixed
Working on Lenovo servers, but can't confirm on Dell as it panics due to an error in powersupplies. Will open a separate ticket.
To not clutter https://github.com/jenningsloy318/redfish_exporter/issues/4 too much, I will split the issues to separate tickets.
When querying memory metrics from redfish, I get an error
INFO[0008] Errors Getting memory from computer system : json: cannot unmarshal object into Go struct field .Location of type string source="system_collector.go:386"
.Redfish output for empyt slot
Redfish output for populted slot:
The problem is in the gofish library in https://github.com/stmcginnis/gofish/blob/73f4bfdc949f2942e60cc396a70c7bedd2b95a8c/redfish/memory.go#L240. This should be extended.
Mockup from DMTF page: https://redfish.dmtf.org/redfish/mockups/v1/922#
Looking at http://redfish.dmtf.org/schemas/v1/Resource.v1_9_0.json#/definitions/Location, Location is quite a big resource. I think it could be left out and
MemoryLocation
should be used for memory.