Module: check_mk
Branch: master
Commit: 75631cfffb400e0582bc1c09c369cce47180ea04
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=75631cfffb400e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Apr 7 18:27:48 2013 +0200
ipmi: remove obsolete exception handler
---
checks/ipmi | 56 +++++++++++++++++++++++++++-----------------------------
1 files changed, 27 insertions(+), 29 deletions(-)
diff --git a/checks/ipmi b/checks/ipmi
index 9282fd9..6814ba5 100644
--- a/checks/ipmi
+++ b/checks/ipmi
@@ -143,36 +143,34 @@ def check_ipmi_summarized(info):
count = 0
ambient_count = 0
ambient_sum = 0.0
- try:
- for name, val, unit, status, unrec_low, crit_low, \
- warn_low, warn_high, crit_high, unrec_high in info:
- # Skip datasets which have no valid data (zero value, no unit and state nc)
- if val == '0.000' and unit == 'unspecified' and status ==
'nc':
- continue
-
- if ipmi_ignore_entry(name, status):
- continue
-
- text = "%s is %s" % (name, val)
- if unit != 'unspecified':
- text += ' %s' % unit
- count += 1
- if status == 'nc':
- worst_status = max(worst_status, 1)
- warn_texts.append(text)
- elif status == 'nr' and ipmi_ignore_nr:
+
+ for name, val, unit, status, unrec_low, crit_low, \
+ warn_low, warn_high, crit_high, unrec_high in info:
+ # Skip datasets which have no valid data (zero value, no unit and state nc)
+ if val == '0.000' and unit == 'unspecified' and status ==
'nc':
+ continue
+
+ if ipmi_ignore_entry(name, status):
+ continue
+
+ text = "%s is %s" % (name, val)
+ if unit != 'unspecified':
+ text += ' %s' % unit
+ count += 1
+ if status == 'nc':
+ worst_status = max(worst_status, 1)
+ warn_texts.append(text)
+ elif status == 'nr' and ipmi_ignore_nr:
+ pass
+ elif status != 'ok':
+ worst_status = 2
+ crit_texts.append(text)
+ if "amb" in name or "Ambient" in name:
+ try:
+ ambient_count += 1
+ ambient_sum += float(val)
+ except:
pass
- elif status != 'ok':
- worst_status = 2
- crit_texts.append(text)
- if "amb" in name or "Ambient" in name:
- try:
- ambient_count += 1
- ambient_sum += float(val)
- except:
- pass
- except:
- return (3, "invalid or incomplete output from agent")
if ambient_count > 0: