galexrt / dellhw_exporter

Prometheus exporter for Dell Hardware components using Dell OMSA.
https://dellhw-exporter.galexrt.moe
Apache License 2.0
119 stars 41 forks source link

Export omreport chassis info metric(s) #135

Closed B0go closed 3 weeks ago

B0go commented 1 month ago

Hi

Recently a need to display and map the Chassis models of all our Dell hardware arose, which made me think that we could export this kind of data out of omreport into one or two metrics to automatically visualize details on all of them. Here is an example output of the command:

$ omreport chassis info
Chassis Information

Index                                    : 0
Chassis Name                             : Main System Chassis
Host Name                                : hostname
iDRAC9 Version                           : x.x.x.x (Build 32)
Lifecycle Controller Version             : x.x.x.00
Chassis Model                            : PowerEdge RXXXX
Chassis Lock                             : Present
Chassis Service Tag                      : {tag}
Express Service Code                     : {code}
Chassis Asset Tag                        : Unknown
Flash chassis identify LED state         : Off
Flash chassis identify LED timeout value : 300

Is that something that have been considered already?

galexrt commented 1 month ago

I can look into introducing a collector for it, that is by default disabled though. I would need to build it upon the #134 PR which is not tested on a live server yet, so I would propose that I'll look into adding a collector to that PR and creating a version that you can build/test, to verify that the rewrite works as expected on a live server.

What do you think? :smile:

Edit: Could you please provide the command output of omreport chassis info -fmt ssv

B0go commented 1 month ago

I might be able to help with the testing, yeah! Here is the command output:

$ omreport chassis info -fmt ssv
Chassis Information

Index;0
Chassis Name;Main System Chassis
Host Name;hostname
iDRAC9 Version;5.x.x.x (Build x)
Lifecycle Controller Version;5.x.x.x
Chassis Model;PowerEdge Rxxxx
Chassis Lock;Present
Chassis Service Tag;123XXX
Express Service Code;123456
Chassis Asset Tag;Unknown
Flash chassis identify LED state;Off
Flash chassis identify LED timeout value;300
galexrt commented 1 month ago

@B0go I have added such a metric to my PR #134, what would be the best way for you to test it? Can you compile it, or should I look into creating a release candidate (that binaries and container images will be easily available) that includes the rework and the chassis info metric?

B0go commented 1 month ago

Great @galexrt, I will reserve some time this week or the next to test it. Thanks

B0go commented 3 weeks ago

Hi @galexrt, sorry for the delay. I should test it this week.

galexrt commented 3 weeks ago

I have release 2.0.0-rc.1 https://github.com/galexrt/dellhw_exporter/releases/tag/v2.0.0-rc.1

If you have a chance to test the release candidate and find any issues with it, please let me know via a new issue.

Closing this issue as the feature is implemented now and just waiting for a full release.