lovoo / ipmi_exporter

IPMI Exporter for prometheus.io, written in Go.
BSD 3-Clause "New" or "Revised" License
80 stars 32 forks source link

Fix parsing of hex output for supermicro raw commands #32

Closed ironsteel closed 2 years ago

ironsteel commented 6 years ago

Uvarint expects a protocol buffer bit format and when the value from ipmitool is >= 0x80 Uvarint returns 0

So pad the hex string with 0's to 8 bytes and use BigEndian.Uint64 for converting to int

ironsteel commented 6 years ago

I've also added a unit test

tommy-muehle commented 2 years ago

Hi, this pull request is being closed because this repo is (or will be) archived and is not maintained since years.