Module: check_mk
Branch: master
Commit: f730fabe1820b4f9c67911cdfdb1f93e8c97b0c5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f730fabe1820b4…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Jul 25 16:52:15 2018 +0200
FIX 6383 db2_bp_hitratios: Fixed conversion to float if any value contains a comma instead
of a dot
Change-Id: Ia9e466fdd833b31bfef8ab8e49814ec6be64ac40
---
.werks/6383 | 10 ++++++++++
checks/db2_bp_hitratios | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/6383 b/.werks/6383
new file mode 100644
index 0000000..e6380c7
--- /dev/null
+++ b/.werks/6383
@@ -0,0 +1,10 @@
+Title: db2_bp_hitratios: Fixed conversion to float if any value contains a comma instead
of a dot
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1532530045
+Class: fix
+
+
diff --git a/checks/db2_bp_hitratios b/checks/db2_bp_hitratios
index 7948f10..674d62c 100644
--- a/checks/db2_bp_hitratios
+++ b/checks/db2_bp_hitratios
@@ -81,7 +81,7 @@ def check_db2_bp_hitratios(item, no_params, parsed):
hr_info = dict(zip(headers[1:], line[1:])) # skip BP_NAME
for key in headers[1:]:
value = hr_info[key]
- value = value.replace("-","0")
+ value = value.replace("-","0").replace(",",
".")
key = key.replace("_RATIO_PERCENT","")
map_key_to_text = {
"TOTAL_HIT": "Total",