Description
Hi, we're working with the following supermicro BMC output:
$ sudo ipmitool bmc info
Device ID : 32
Device Revision : 1
Firmware Revision : 3.10
IPMI Version : 2.0
Manufacturer ID : 10876
Manufacturer Name : Supermicro
Product ID : 6970 (0x1b3a)
Product Name : Unknown (0x1B3A)
Device Available : yes
Provides Device SDRs : no
Additional Device Support :
Sensor Device
SDR Repository Device
SEL Device
FRU Inventory Device
IPMB Event Receiver
IPMB Event Generator
Chassis Device
Aux Firmware Rev Info :
0x38
0x01
0x00
0x00
We can see it is matched like by the following regex: https://github.com/prometheus-community/ipmi_exporter/blob/master/freeipmi/freeipmi.go#L45C2-L45C30
It does match only major.minor:
Although I would like to get major.minor.patch: 3.10.38 here
We can see the patch version is the first number printed after the Aux Firmware Rev Info
line, we tried on multiples servers with different versions.
I could build an updated regex that would match the patch part if it exists, like this:
^Firmware Revision\s*:\s*(?P<value>[0-9.]*).*$(?:\n(?:^(?!Aux Firmware Rev Info).*$\n)*Aux Firmware Rev Info.*\n\s*0x(?P<patch>[0-9]*))?
Although I'm not sure how to change the file https://github.com/prometheus-community/ipmi_exporter/blob/master/freeipmi/freeipmi.go to do a PR myself, because it's not only changing the regex since there is a new var, it would require to change at least GetBMCInfoFirmwareRevision too.
Could someone work on this feature request, or maybe help me to understand how to work on this by myself if you don't have time to do this?