Module: check_mk
Branch: master
Commit: ff327e6c5ff242e84fab36b308afef19ed80060e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ff327e6c5ff242…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Feb 26 18:02:21 2013 +0100
FIX: check_mk: improved support of utf-8 characters in extra_service_conf
---
ChangeLog | 1 +
modules/check_mk.py | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d0e730d..6e72926 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -44,6 +44,7 @@
* FIX: allow unicode encoded extra_service_conf
* FIX: no default PING service if custom checks are defined
* FIX: check_mk_base: fixed rounding error in get_bytes_human_readable
+ * FIX: check_mk: improved support of utf-8 characters in extra_service_conf
* New configuration variable contactgroup_members
Checks & Agents:
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 07fa1b4..52ef4a8 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -1253,7 +1253,7 @@ def extra_service_conf_of(hostname, description):
if define_servicegroups:
servicegroups_to_define.update(sergr)
conf += extra_conf_of(extra_service_conf, hostname, description)
- return conf
+ return conf.encode("utf-8")
def extra_summary_service_conf_of(hostname, description):
return extra_conf_of(extra_summary_service_conf, hostname, description)
@@ -1747,7 +1747,7 @@ def create_nagios_servicedefs(outfile, hostname):
}
""" % ( template, hostname, description, logwatch,
- extra_service_conf_of(hostname, description).encode("utf-8"), checkname
))
+ extra_service_conf_of(hostname, description), checkname ))
checknames_to_define.add(checkname)
have_at_least_one_service = True
@@ -1809,7 +1809,7 @@ define service {
host_name\t\t\t%s
%s service_description\t\tCheck_MK
}
-""" % (active_service_template, hostname, extra_service_conf_of(hostname,
"Check_MK").encode("utf-8")))
+""" % (active_service_template, hostname, extra_service_conf_of(hostname,
"Check_MK")))
# Inventory checks - if user has configured them. Not for clusters.
if inventory_check_interval and not is_cluster(hostname):
outfile.write("""