Module: check_mk
Branch: master
Commit: 510ab8c85932cbe64d550bf86dba3a9aebf9bf22
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=510ab8c85932cb…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Jun 16 13:06:34 2013 +0200
Keepalive mode: allow to specify IP address
---
modules/check_mk_base.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index d9be202..d89c202 100755
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -996,9 +996,6 @@ def do_check_keepalive():
ipaddress_cache = {}
- # sys.stdout.write('*')
- # sys.stdout.flush() # signal core that we are ready
-
while True:
cleanup_globals()
hostname = sys.stdin.readline()
@@ -1010,12 +1007,15 @@ def do_check_keepalive():
sys.stdout.write("Restarting myself...\n")
sys.stdout.flush()
os.execvp("cmk", sys.argv)
+ elif not hostname:
+ break
+
timeout = int(sys.stdin.readline())
try:
signal.alarm(timeout)
- if not hostname:
- break
- if hostname in ipaddress_cache:
+ if ';' in hostname:
+ hostname, ipaddress = hostname.split(";", 1)
+ elif hostname in ipaddress_cache:
ipaddress = ipaddress_cache[hostname]
else:
if is_cluster(hostname):