prometheus-community / node-exporter-textfile-collector-scripts

Scripts for node-exporter's textfile collector
Apache License 2.0
513 stars 191 forks source link

storcli: "BBU Status" field not available in HPE MegaRID controller #190

Open bugspencor opened 11 months ago

bugspencor commented 11 months ago

We have a HPE MR416i-a Gen10+ RAID controller in a HPE ProLiant DL385 Gen10+ Server.

Those systems don't have a Battery Backup Unit on the RAID controller, instead they have a backup battery in the system (Energy pack aka HPE Smart Storage Battery).

storcli.py stops collecting metrics when it does not find the "BBU Status" field. storcli on those servers receives following status data:

                "Status" : {
                        "Controller Status" : "Optimal",
                        "Memory Correctable Errors" : 0,
                        "Memory Uncorrectable Errors" : 0,
                        "ECC Bucket Count" : 0,
                        "Any Offline VD Cache Preserved" : "No",
                        "Energy Pack Status" : 0,
                        "PD Firmware Download in progress" : "No",
                        "Support Drive Firmware Download" : "Yes",
                        "Lock Key Assigned" : "No",
                        "Failed to get lock key on bootup" : "No",
                        "Lock key has not been backed up" : "No",
                        "Bios was not detected during boot" : "No",
                        "Controller must be rebooted to complete security operation" : "No",
                        "A rollback operation is in progress" : "No",
                        "At least one PFK exists in NVRAM" : "No",
                        "SSC Policy is WB" : "No",
                        "Controller has booted into safe mode" : "No",
                        "Controller shutdown required" : "No",
                        "Controller has booted into certificate provision mode" : "No",
                        "Current Personality" : "RAID-Mode "
                },

If I skip the BBU Status field, storcli.py runs without errors. In the output it looks like "Energy Pack Status" is a replacement for "BBU Status" although I don't find official documentation what status values are possible and what they mean.

I'm currently preparing a pull request with a simple fix (skip BBU Status if it does not exist) and will link it here when it's submitted.