Module: check_mk
Branch: master
Commit: 3c7f42872a8e12a485b8fec4b2d6e08f06312dfc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3c7f42872a8e12…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Mar 6 17:44:11 2015 +0100
#2098 FIX ibm_svc_mdiskgrp: fix rounding bug, decimal digits of size (GB, TB) were always
lost
---
.werks/2098 | 10 ++++++++++
ChangeLog | 1 +
checks/ibm_svc_mdiskgrp | 12 ++++++------
3 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/.werks/2098 b/.werks/2098
new file mode 100644
index 0000000..2f6a0bf
--- /dev/null
+++ b/.werks/2098
@@ -0,0 +1,10 @@
+Title: ibm_svc_mdiskgrp: fix rounding bug, decimal digits of size (GB, TB) were always
lost
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1425660216
+
+
diff --git a/ChangeLog b/ChangeLog
index 4578bce..4ca21e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -235,6 +235,7 @@
* 2055 FIX: agent_vsphere, licenses check: now really configurable on / off...
* 2091 FIX: The check-mk-agent RPM packages can now update the old check_mk-agent
named RPMs...
* 2046 FIX: Replace GBit with Gbit, MBit with Mbit, KBit with Kbit...
+ * 2098 FIX: ibm_svc_mdiskgrp: fix rounding bug, decimal digits of size (GB, TB) were
always lost
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request,
added mailto link for error report...
diff --git a/checks/ibm_svc_mdiskgrp b/checks/ibm_svc_mdiskgrp
index f64d044..17856a4 100644
--- a/checks/ibm_svc_mdiskgrp
+++ b/checks/ibm_svc_mdiskgrp
@@ -42,17 +42,17 @@
def ibm_svc_mdiskgrp_to_mb(size):
if size.endswith("MB"):
- size = int(float(size.replace("MB", "")))
+ size = float(size.replace("MB", ""))
elif size.endswith("GB"):
- size = int(float(size.replace("GB", ""))) * 1024
+ size = float(size.replace("GB", "")) * 1024
elif size.endswith("TB"):
- size = int(float(size.replace("TB", ""))) * 1024 * 1024
+ size = float(size.replace("TB", "")) * 1024 * 1024
elif size.endswith("PB"):
- size = int(float(size.replace("PB", ""))) * 1024 * 1024 *
1024
+ size = float(size.replace("PB", "")) * 1024 * 1024 * 1024
elif size.endswith("EB"):
- size = int(float(size.replace("EB", ""))) * 1024 * 1024 * 1024
* 1024
+ size = float(size.replace("EB", "")) * 1024 * 1024 * 1024 *
1024
else:
- size = int(float(size))
+ size = float(size)
return size
def inventory_ibm_svc_mdiskgrp(info):