Module: check_mk
Branch: master
Commit: 771c5ece2b0b5c06467c07f11191e34a48e86222
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=771c5ece2b0b5c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 15 14:46:33 2015 +0100
Fixed reported agent output in case of crashes in real time checks
---
modules/check_mk_base.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 3eaeeb4..a83cccb 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1612,9 +1612,12 @@ def write_crash_dump_snmp_info(crash_dir, hostname, check_type):
def write_crash_dump_agent_output(crash_dir, hostname):
- cachefile = tcp_cache_dir + "/" + hostname
- if os.path.exists(cachefile):
- file(crash_dir + "/agent_output",
"w").write(file(cachefile).read())
+ if "get_rtc_package" in globals():
+ file(crash_dir + "/agent_output",
"w").write(get_rtc_package())
+ else:
+ cachefile = tcp_cache_dir + "/" + hostname
+ if os.path.exists(cachefile):
+ file(crash_dir + "/agent_output",
"w").write(file(cachefile).read())
def pack_crash_dump(crash_dir):