Module: check_mk
Branch: master
Commit: 1c4e1bcca78b550eec65bad3b92e9a3b2dee0fa8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1c4e1bcca78b55…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Dec 23 11:36:15 2014 +0100
#1797 FIX Fix incomplete configuration during checking when using CMC
This also affected the Discovery checks - which didn't honor any rules that
affected the service discovery (e.g. diskstat inventory mode).
---
.werks/1797 | 11 +++++++++++
ChangeLog | 1 +
modules/check_mk.py | 6 ++++--
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/1797 b/.werks/1797
new file mode 100644
index 0000000..0c754d1
--- /dev/null
+++ b/.werks/1797
@@ -0,0 +1,11 @@
+Title: Fix incomplete configuration during checking when using CMC
+Level: 2
+Component: core
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1419330925
+
+This also affected the Discovery checks - which didn't honor any rules that
+affected the service discovery (e.g. diskstat inventory mode).
diff --git a/ChangeLog b/ChangeLog
index b4d664e..9520bde 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
* 1759 Packed RPM and DEB agent packages are now shipped with normal Check_MK
package...
* 1791 FIX: Fix problem where many bogus RRD files for Check_MK service would be
created...
* 1792 FIX: Fix path to special agents in case of manual installation
+ * 1797 FIX: Fix incomplete configuration during checking when using CMC...
Checks & Agents:
* 1665 agent_netapp: New special agent for NetApp monitoring via Web-API...
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 045a7d3..f5b6e1c 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -330,7 +330,7 @@ def load_checks():
value = None
ignored_variable_types = [ type(lambda: None), type(os) ]
- known_vars = set(vars().keys()) # track new configuration variables
+ known_vars = set(globals().keys()) # track new configuration variables
for f in filelist:
if not f.endswith("~"): # ignore emacs-like backup files
@@ -342,7 +342,7 @@ def load_checks():
raise
sys.exit(5)
- for varname, value in vars().iteritems():
+ for varname, value in globals().iteritems():
if varname[0] != '_' \
and varname not in known_vars \
and type(value) not in ignored_variable_types:
@@ -351,6 +351,8 @@ def load_checks():
# Now convert check_info to new format.
convert_check_info()
+load_checks()
+
#.
# .--Checks--------------------------------------------------------------.
# | ____ _ _ |