Module: check_mk
Branch: master
Commit: b07b00110dc352c807541e219948947057bebe50
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b07b00110dc352…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Nov 29 10:45:42 2016 +0100
Improved error message when a host can not be resolved during config creation
---
modules/check_mk.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 2f689cf..b07890a 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -2969,11 +2969,10 @@ def ip_address_of(hostname, family=None):
return ""
else:
g_failed_ip_lookups.append(hostname)
- addr = fallback_ip_for(hostname, family)
if not ignore_ip_lookup_failures:
- configuration_warning("Cannot lookup IP address of '%s'
(%s). Using "
- "address %s instead." % (hostname, e,
addr))
- return addr
+ configuration_warning("Cannot lookup IP address of '%s'
(%s). "
+ "The host will note be monitored
correctly." % (hostname, e))
+ return fallback_ip_for(hostname, family)
def fallback_ip_for(hostname, family=None):