Module: check_mk
Branch: master
Commit: 4595668d1edf7da2a014f9a266f8f04472935e0b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4595668d1edf7d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu May 8 12:37:30 2014 +0200
FIX blade_health: correctly output error message in non-OK state
---
.werks/969 | 8 ++++++++
ChangeLog | 1 +
checks/blade_health | 6 +-----
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/.werks/969 b/.werks/969
new file mode 100644
index 0000000..a06924d
--- /dev/null
+++ b/.werks/969
@@ -0,0 +1,8 @@
+Title: blade_health: correctly output error message in non-OK state
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1399545417
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 17f4122..e3b0ec6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -67,6 +67,7 @@
* 0910 FIX: brocade.power: fixed an error where the check reports an UNKNOWN on power
supply failure...
* 0158 FIX: dell_om_disks: Handle hotspares more correctly
* 0161 FIX: cisco_fru_power: Exluded not existing devices from the inventory
+ * 0969 FIX: blade_health: correctly output error message in non-OK state
Multisite:
* 0779 Hostgroups (Summary): Empty hostgroups are no longer shown (can be re-enabled
by filter)
diff --git a/checks/blade_health b/checks/blade_health
index cc631f4..de27f9c 100644
--- a/checks/blade_health
+++ b/checks/blade_health
@@ -38,9 +38,7 @@ def inventory_blade_health(info):
def check_blade_health(_no_item, _no_params, info):
state = info[0][0]
- descr = ''
- if len(info[0]) > 1:
- descr = ': %s' % info[0][1]
+ descr = ": " + ", ".join([ line[1] for line in info if len(line)
> 1 ])
if state == "255":
return (0, "State is good")
@@ -55,8 +53,6 @@ def check_blade_health(_no_item, _no_params, info):
-
-
check_info["blade_health"] = {
'check_function': check_blade_health,
'inventory_function': inventory_blade_health,