Module: check_mk
Branch: master
Commit: 2b637b89d5b913aec1a604965e1da429ec9271fc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2b637b89d5b913…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 2 13:37:26 2015 +0100
#2855 FIX ibm_svc_mdiskgrp: Fixed crash when capacity of pool is 0
---
.werks/2855 | 10 ++++++++++
ChangeLog | 1 +
checks/ibm_svc_mdiskgrp | 2 ++
3 files changed, 13 insertions(+)
diff --git a/.werks/2855 b/.werks/2855
new file mode 100644
index 0000000..e9406d6
--- /dev/null
+++ b/.werks/2855
@@ -0,0 +1,10 @@
+Title: ibm_svc_mdiskgrp: Fixed crash when capacity of pool is 0
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1449059825
+
+
diff --git a/ChangeLog b/ChangeLog
index a84ad8e..8491810 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -121,6 +121,7 @@
* 2852 FIX: check_http: SSL can now be configured to use specific SSL version
* 2853 FIX: cisco_asa_failover: Added support for CISCO PIX security devices
* 2854 FIX: winperf_if: Assuming interfaces without status to be up
+ * 2855 FIX: ibm_svc_mdiskgrp: Fixed crash when capacity of pool is 0
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/ibm_svc_mdiskgrp b/checks/ibm_svc_mdiskgrp
index 6cbb77c..5934b45 100644
--- a/checks/ibm_svc_mdiskgrp
+++ b/checks/ibm_svc_mdiskgrp
@@ -94,6 +94,8 @@ def check_ibm_svc_mdiskgrp(item, params, info):
yield status, message, perfdata
# Compute provisioning
+ if not capacity:
+ return # provisioning does not make sense when capacity is 0
provisioning = 100.0 * virtual_capacity / capacity
if "provisioning_levels" in params:
warn, crit = params["provisioning_levels"]