Module: check_mk
Branch: master
Commit: f1c0639a9bc4fa5fc062d84796f8b9d8d84dc05d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f1c0639a9bc4fa…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Apr 18 17:02:44 2016 +0200
Fixed error during config compilation when using summary hosts with nagios core
---
modules/nagios.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/nagios.py b/modules/nagios.py
index 47ca245..cd22a3a 100644
--- a/modules/nagios.py
+++ b/modules/nagios.py
@@ -217,7 +217,7 @@ def create_nagios_hostdefs(outfile, hostname, attrs):
outfile.write(" host_name\t\t\t%s\n" % summary_hostname(hostname))
outfile.write(" use\t\t\t\t%s-summary\n" % (is_clust and
cluster_template or host_template))
outfile.write(" alias\t\t\t\tSummary of %s\n" % alias)
- outfile.write(" address\t\t\t%s\n" % (ip and ip or
fallback_ip(hostname)))
+ outfile.write(" address\t\t\t%s\n" % (ip and ip or
fallback_ip_for(hostname)))
outfile.write(" _TAGS\t\t\t\t%s\n" % "
".join(tags_of_host(hostname)))
outfile.write(" __REALNAME\t\t\t%s\n" % hostname)
outfile.write(" parents\t\t\t%s\n" % hostname)
@@ -244,7 +244,7 @@ def create_nagios_hostdefs(outfile, hostname, attrs):
outfile.write(" contact_groups\t\t+%s\n" %
make_utf8(",".join(cgrs)))
if is_clust:
- outfile.write(" _NODEIPS\t\t\t%s\n" % "
".join(node_ips))
+ outfile.write(" _NODEIPS\t\t\t%s\n" % "
".join(attrs.get("_NODEIPS")))
outfile.write(extra_summary_host_conf_of(hostname))
outfile.write("}\n")
outfile.write("\n")