Module: check_mk
Branch: master
Commit: eafb080031dcbda1021f56422ce250661ad2855b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eafb080031dcbd…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Sep 30 14:17:57 2014 +0200
Fix UNKNOWN - invalid output from check in automation
---
modules/automation.py | 4 +++-
modules/check_mk_base.py | 4 +---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/automation.py b/modules/automation.py
index d2822d6..6dffd46 100644
--- a/modules/automation.py
+++ b/modules/automation.py
@@ -388,10 +388,12 @@ def automation_try_inventory_node(hostname, leave_no_tcp=False,
with_snmp_scan=F
params = compute_check_parameters(hostname, ct, item, params)
try:
- result = convert_check_result(check_function(item, params, info))
+ result = convert_check_result(check_function(item, params, info),
check_uses_snmp(ct))
except MKCounterWrapped, e:
result = (None, "WAITING - Counter based check, cannot be done
offline")
except Exception, e:
+ if opt_debug:
+ raise
result = (3, "UNKNOWN - invalid output from agent or error in
check implementation")
if len(result) == 2:
result = (result[0], result[1], [])
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 8ebd08e..da5a01f 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1247,11 +1247,9 @@ def do_all_checks_on_host(hostname, ipaddress, only_check_types =
None):
try:
dont_submit = False
- is_snmp = check_info[checkname].get("snmp_info") or \
- ( infotype in check_info and
check_info[infotype].get("snmp_info"))
# Call the actual check function
- result = convert_check_result(check_function(item, params, info),
is_snmp)
+ result = convert_check_result(check_function(item, params, info),
check_uses_snmp(checkname))
# handle check implementations that do not yet support the