Module: check_mk
Branch: master
Commit: 4b31e8e646c3572ab3816450ec12ddd811ef4b43
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4b31e8e646c357…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Nov 21 13:13:06 2014 +0100
Force option -f, --force force using outdated persisted files
---
modules/check_mk.py | 4 ++++
modules/check_mk_base.py | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 8b1b58a..16af22b 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -4874,6 +4874,10 @@ NOTES:
of the RRDs has changed. The option --split will activate conversion
from exising RRDs in PNP storage type SINGLE to MULTIPLE.
+ -i, --inventory does a HW/SW-Inventory for all, one or several
+ hosts. If you add the option -f, --force then persisted sections
+ will be used even if they are outdated.
+
""" % (check_mk_configfile,
precompiled_hostchecks_dir,
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index d89e2a1..f03b192 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -478,7 +478,7 @@ def add_persisted_info(hostname, info):
now = time.time()
for section, (persisted_until, persisted_section) in persisted.items():
- if now < persisted_until:
+ if now < persisted_until or opt_force:
if section not in info:
info[section] = persisted_section
if opt_debug: