Closed fschlich closed 2 years ago
Hi @fschlich will it prompt an error when some server don't have such tag ? did you have tested such case ?
I believe SKU is one of the standard members of the Chassis struct, see https://pkg.go.dev/github.com/stmcginnis/gofish/redfish#Chassis
When I query one of my servers, it will return two redfish_chassis_model_info
lines, one for the actual server where SKU is set, and one for some internal RAID device, which does not have an SKU and the field is set to ""
# HELP redfish_chassis_model_info organization responsible for producing the chassis, the name by which the manufacturer generally refers to the chassis, and a part number and sku assigned by the organization that is responsible for producing or manufacturing the chassis
# TYPE redfish_chassis_model_info gauge
redfish_chassis_model_info{chassis_id="Enclosure.Internal.0-1:RAID.Slot.6-1",manufacturer="",model="BP14G+EXP 0:1",part_number="",resource="chassis",sku=""} 1
redfish_chassis_model_info{chassis_id="System.Embedded.1",manufacturer="Dell Inc.",model="PowerEdge R740",part_number="0YNY86A02",resource="chassis",sku="1PYYY03"} 1
There is no error or other notice about the missing SKU value logged (while there are 3 info lines notifying that there was no thermal / power / network adapters data found for the internal chassis).
I believe SKU is one of the standard members of the Chassis struct
Yep, this looks like it should be safe. If the system does not return a SKU
for some reason it will just return the default value, so just an empty string.
Hi @jenningsloy318, what's keeping you from merging this? Do you still have concerns about the safety of the change, or its usefulness, or would you rather add even more of the standard members (think AssetTag, SerialNumber, UUID, ...) to the chassis_model_info metric?
Dell PowerEdge servers store the service tag in SKU, which is often what's necessary when Redfish reports unhealthyness...