jenningsloy318 / redfish_exporter

exporter to get metrics from redfish based hardware such as lenovo/dell/superc servers
Apache License 2.0
70 stars 62 forks source link

processors: json: cannot unmarshal object into Go struct field .Metrics of type string #9

Closed matejzero closed 4 years ago

matejzero commented 4 years ago

While running the exporter, I also get the following error: Errors Getting Processors from system: json: cannot unmarshal object into Go struct field .Metrics of type string source="system_collector.go:403"

Processors .Metrics field in my case (Lenovo SR630) is not a string:

{
    "ProcessorArchitecture": "x86",
    "Metrics": {
        "@odata.id": "/redfish/v1/Systems/1/Processors/1/ProcessorMetrics"
    },
...

Dell server doesn't even report Metrics resource.

jenningsloy318 commented 4 years ago

@matejzero created a issue on upstream https://github.com/stmcginnis/gofish/issues/61, will try to fix it once there is a update

jenningsloy318 commented 4 years ago

@matejzero Please grab the latest source code, build the binary and then test if the issue is fixed

matejzero commented 4 years ago

This is fixed and works on Lenovo servers. Thanks.