Module: check_mk
Branch: master
Commit: 5967c5d9adf54983df223c21120895e45ddb1b41
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5967c5d9adf549…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Oct 23 12:24:38 2013 +0200
FIX: Ignore snmp_check_interval cache in interactive situations (e.g. -nv)
---
modules/check_mk_base.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 205109c..e2990b4 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -369,7 +369,11 @@ def get_realhost_info(hostname, ipaddress, check_type, max_cache_age,
ignore_che
else:
table = get_snmp_table(hostname, ipaddress, oid_info)
store_cached_checkinfo(hostname, check_type, table)
- write_cache_file(cache_relpath, repr(table) + "\n")
+ # only write cache file in non interactive mode. Otherwise it would
+ # prevent the regular checking from getting status updates during
+ # interactive debugging, for example with cmk -nv.
+ if not opt_dont_submit:
+ write_cache_file(cache_relpath, repr(table) + "\n")
return table
# Note: even von SNMP-tagged hosts TCP based checks can be used, if