Module: check_mk
Branch: master
Commit: b749b36d4648bc297fa69762ac7569a8b785b372
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b749b36d4648bc…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Nov 23 21:16:10 2015 +0100
check_mk.agent_update: fixed in case of duplicate output
---
checks/check_mk | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/checks/check_mk b/checks/check_mk
index 2937c0a..03a466b 100644
--- a/checks/check_mk
+++ b/checks/check_mk
@@ -164,18 +164,20 @@ def check_cmk_agent_update(_no_item, _no_params, info):
levels_text = " (warn/crit at %s/%s)" %
(get_age_human_readable(warn), get_age_human_readable(crit))
else:
levels_text = ""
- yield state, "last update check: " +
output_age(parsed["last_check"]) + levels_text
+ yield state, "previous update check: " +
output_age(parsed["last_check"]) + levels_text
except:
yield 1, "no successful connect to server yet"
yield 0, "last agent update: %s" %
output_age(parsed["last_update"])
if parsed["aghash"] != "None":
- yield 0, "agent configuration: %s" %
parsed["aghash"]
+ yield 0, "agent configuration: %s" %
parsed["aghash"][:8]
if parsed["error"] != "None":
yield 2, "error: %s" % parsed["error"]
else:
yield 0, "no errors"
+ return
+
check_info["check_mk.agent_update"] = {
'check_function' : check_cmk_agent_update,