Module: check_mk
Branch: master
Commit: cdc6abeea8f88a9acadca8baa15c9a238c563117
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cdc6abeea8f88a…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Nov 17 13:58:52 2015 +0100
#2794 FIX The encoding parameter set in the agent sections was not working
You can configure the encoding of agent sections with the additional section parameter
<i>encoding(cp437)</i>, e.g.
"<<<mycheck:sep(9):encoding(cp437)>>>.
This feature was broken, due to some code restructuring a few months ago.
---
.werks/2794 | 11 +++++++++++
ChangeLog | 3 ++-
modules/check_mk_base.py | 2 +-
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/2794 b/.werks/2794
new file mode 100644
index 0000000..63ff5a6
--- /dev/null
+++ b/.werks/2794
@@ -0,0 +1,11 @@
+Title: The encoding parameter set in the agent sections was not working
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1447764921
+Class: fix
+
+You can configure the encoding of agent sections with the additional section parameter
+<i>encoding(cp437)</i>, e.g.
"<<<mycheck:sep(9):encoding(cp437)>>>.
+This feature was broken, due to some code restructuring a few months ago.
diff --git a/ChangeLog b/ChangeLog
index 9e6912a..dcec0cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -83,6 +83,7 @@
* 2836 FIX: pandacom_psu: fixed handling of not available power supplies
* 2766 FIX: juniper_fru: Don't discover devices reported as "empty"...
* 2790 FIX: check_dns: now able to configure milliseconds as expected response
time...
+ * 2794 FIX: The encoding parameter set in the agent sections was not working...
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
@@ -120,7 +121,7 @@
* 2760 FIX: Fixed case where "activate changes" was not commiting the
pending changes entries correctly...
* 2767 FIX: Fixed broken user list when non unicode mail addresses are loaded
* 2791 FIX: Service parameter overview: Fixed problem displaying incorrect rule for
classical checks...
- * 2793 FIX: Prevent python unicode warnings for services with umlauts...
+ * 2793 FIX: Parameter Overview: Prevent python unicode warnings for services with
umlauts...
Notifications:
* 2728 FIX: Removed debug notification script (was not executable)...
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 3951089..1a5286e 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -944,7 +944,7 @@ def parse_info(lines, hostname):
def decode_incoming_string(s, encoding="utf-8"):
try:
- return s.decode('utf-8')
+ return s.decode(encoding)
except:
return s.decode(fallback_agent_output_encoding)