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

How to determine system_id? #30

Closed jyokako closed 3 years ago

jyokako commented 3 years ago

For example , In order to get Chassis information, we need to know the system_id of each vendor's server. As shown below.

Cloud you tell me how to set the system_id in you program, or is it to determine the system_id (System.Embedded.1 or 1) automatically?

jenningsloy318 commented 3 years ago

Hello, Basically I grab all required information via a upstream lib called https://github.com/stmcginnis/gofish.

for chasis, each one has an ID, and it mapped via this lib, you can get more insight within this lib

stmcginnis commented 3 years ago

The Redfish schema does not define how these IDs should be formatted or assigned. That is up to each implementation to decide. As you show, HPE chose to use the longer name of System.Embedded.1, while Dell is more concise with just the ordinal number of 1.

These are accessed via the Service Root. That has a Chassis field that links to any Chassis's managed by this Redfish service. So there is no way to predetermine what those will be named without querying the service root to get this list. Though it does seem vendors are at least consistent across their product lines, so once you know what they use, it's easy to guess what the IDs will be from system to system.

jyokako commented 3 years ago

@jenningsloy318 @stmcginnis Thank you for your detailed answer. I was able to understand how it works. I would implement this source code and check the details . This case will be closed.