Module: check_mk
Branch: master
Commit: 300b2711267c5bd59d9067dc1ed6dbb74794ba25
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=300b2711267c5b…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Dec 5 16:04:46 2014 +0100
#1455 FIX hp_proliant_mem: avoid a crash of the check when module_condition is empty
---
.werks/1455 | 9 +++++++++
ChangeLog | 3 ++-
checks/hp_proliant_mem | 4 ++--
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/.werks/1455 b/.werks/1455
new file mode 100644
index 0000000..fb1fd0c
--- /dev/null
+++ b/.werks/1455
@@ -0,0 +1,9 @@
+Title: hp_proliant_mem: avoid a crash of the check when module_condition is empty
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417791862
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index f82e5d0..f60ce66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -118,9 +118,10 @@
* 1681 FIX: cmciii_lcp_fans: Skipping non FAN units now; cleaned up check
* 1682 FIX: cmciii_lcp_waterflow: Check can now deal with devices with a different
setup
* 1701 FIX: Correctly show absolute level for CPU load in case of warn/crit...
- * 1454 FIX: megaraid checks: megacli binaries in lowercase (Ubuntu..) are now also
detected by the linux agent
* 1702 FIX: Fix check_notify_count: notification had been counted twice...
* 1703 FIX: ups_test: Fix computation of time since last self test...
+ * 1454 FIX: megaraid checks: megacli binaries in lowercase (Ubuntu..) are now also
detected by the linux agent
+ * 1455 FIX: hp_proliant_mem: avoid a crash of the check when module_condition is
empty
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
diff --git a/checks/hp_proliant_mem b/checks/hp_proliant_mem
index c623b1b..16994d1 100644
--- a/checks/hp_proliant_mem
+++ b/checks/hp_proliant_mem
@@ -128,8 +128,8 @@ def check_hp_proliant_mem(item, params, info):
detail_output += '(?) '
condition = 'n/a'
- if int(module_condition) in hp_proliant_mem_condition_map:
- condition = hp_proliant_mem_condition_map[int(module_condition)]
+ if saveint(module_condition) in hp_proliant_mem_condition_map:
+ condition = hp_proliant_mem_condition_map[saveint(module_condition)]
condition_status = hp_proliant_mem_condition_status2nagios_map[condition]
detail_output += ', Condition: %s ' % condition