Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storcli.py: Skip battery backup unit status if it does not exist #191

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion storcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def handle_sas_controller(response):
def handle_megaraid_controller(response):
controller_index = response["Basics"]["Controller"]

if response["Status"]["BBU Status"] != "NA":
if "BBU Status" in response["Status"] and response["Status"]["BBU Status"] != "NA":
# BBU Status Optimal value is 0 for normal, 8 for charging.
metrics["bbu_healthy"].labels(controller_index).set(
response["Status"]["BBU Status"] in [0, 8, 4096]
Expand Down