From 1574cd13d374a3aeb36531c183192627218a2896 Mon Sep 17 00:00:00 2001 From: Pall Sigurdsson Date: Fri, 21 Feb 2014 11:06:00 +0000 Subject: [PATCH] ibm_bladecenter - another firmware bug workaround --- check_ibm_bladecenter/check_ibm_bladecenter.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/check_ibm_bladecenter/check_ibm_bladecenter.py b/check_ibm_bladecenter/check_ibm_bladecenter.py index f164b2f..ef7cb3c 100644 --- a/check_ibm_bladecenter/check_ibm_bladecenter.py +++ b/check_ibm_bladecenter/check_ibm_bladecenter.py @@ -502,18 +502,17 @@ def check_systemhealth(): index, severity, description, date = (1, 2, 3, 4) # Sometimes chassis delivers warning when absolutely nothing is going on. # Lets work around that - workaround = {1: '1', 2: 'Good', 3: - 'No critical or warning events', 4: 'No timestamp'} + workaround = [{1: '1', 2: 'Good', 3: 'No critical or warning events', 4: 'No timestamp'}] # Check overall health if systemhealthstat == '255': nagios_status(ok) add_summary("Bladecenter health: OK. ") + elif summary.values() == workaround: + add_summary("Non-Critical Error (bug in firmware): '%s' " % + workaround[0][description]) + nagios_status(ok) + return elif systemhealthstat == "2": - if summary.values() == workaround: - add_summary("Non-Critical Error: %s " % - workaround[0][description]) - nagios_status(ok) - return nagios_status(warning) add_summary("Non-Critical Error. ") elif systemhealthstat == "4":