Module: check_mk
Branch: master
Commit: 2302ed9063d2fab7a5da780a230bf905c6ab1d11
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2302ed9063d2fa…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Apr 25 12:12:35 2012 +0200
Fixed umlaut problems in host ip addresses generated by WATO
---
ChangeLog | 2 +-
modules/check_mk.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a7306b5..dafbcdc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,7 +19,7 @@
* Reimplemented folder listing in host/folders module
* Redesigned the breadcrumb navigation
* FIX: fix page header after confirmation dialogs
- * FIX: fixed umlaut problem in host aliases created by WATO
+ * FIX: fixed umlaut problem in host aliases and ip addresses created by WATO
1.2.0b2:
Core:
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 20e654e..a1b0c66 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -1471,7 +1471,7 @@ def create_nagios_hostdefs(outfile, hostname):
outfile.write("\ndefine host {\n")
outfile.write(" host_name\t\t\t%s\n" % hostname)
outfile.write(" use\t\t\t\t%s\n" % (is_clust and cluster_template or
host_template))
- outfile.write(" address\t\t\t%s\n" % (ip and ip or "0.0.0.0"))
+ outfile.write(" address\t\t\t%s\n" % (ip and ip.encode('utf-8') or
"0.0.0.0"))
outfile.write(" _TAGS\t\t\t\t%s\n" % "
".join(tags_of_host(hostname)))
# Levels for host check