Module: check_mk
Branch: master
Commit: 4c36fc968b9f4975c80dfa86bf5e237506409b8d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4c36fc968b9f49…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Feb 17 11:08:13 2017 +0100
Better error message when plain text is seen while agent encryption is enforced
Change-Id: Id2c4d2efd24aa7fc710f78fe8ff1a9bb66ef648a
---
modules/check_mk_base.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 9fc1546..0fbe62a 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -824,6 +824,10 @@ def get_agent_info_tcp(hostname, ipaddress, port = None):
if len(output) == 0: # may be caused by xinetd not allowing our address
raise MKAgentError("Empty output from agent at TCP port %d" %
port)
+ if encryption_settings["use_regular"] == "enforce" and \
+ output.startswith("<<<check_mk>>>"):
+ raise MKGeneralException("Agent output is plaintext but encryption is
enforced by configuration")
+
if encryption_settings["use_regular"] != "disabled":
try:
# currently ignoring version and timestamp