Module: check_mk
Branch: master
Commit: b482d0c0899655d720cf0efd98ebd77fd0b54be6
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b482d0c0899655…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue May 10 14:45:53 2011 +0200
FIX: Avoid duplicate SNMP scan of checktypes containing a period
---
ChangeLog | 1 +
modules/check_mk.py | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e57bf8b..194d0db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
1.1.11i1:
Core, Setup, etc.:
+ * FIX: Avoid duplicate SNMP scan of checktypes containing a period
* FIX: honor ignored_checktypes also on SNMP scan
* FIX: cmk -II also refreshes cluster checks, if all nodes are specified
* FIX: avoid floating points with 'e' in performance data
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 2bba92c..79ad2d2 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -1615,7 +1615,7 @@ def inventorable_checktypes(what): # tcp, all
checknames = [ k for k in check_info.keys()
if check_info[k][3] != no_inventory_possible
# and (k not in ignored_checktypes)
- and (what == "all" or k not in snmp_info)
+ and (what == "all" or k.split('.')[0] not in snmp_info)
]
checknames.sort()
return checknames
Module: check_mk
Branch: master
Commit: 798c3e1e262759fe051559fbc62307f8ace57ab9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=798c3e1e262759…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue May 10 09:07:22 2011 +0200
FIX: Multisite: avoid duplicate import of plugins
This happend in a local OMD setup. Also the plugins are now
read in alphabetical order.
---
ChangeLog | 1 +
web/htdocs/views.py | 15 ++++++++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5a56adc..8d8a241 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -31,6 +31,7 @@
* FIX: custom_style_sheet now also honored by sidebar
* FIX: ignore case when sorting groups in ...groups snapin
* FIX: Fixed handling of embedded graphs to support the changes made to
+ * FIX: avoid duplicate import of plugins in OMD local installation
the PNP webservice
* Added snmp_uptime, uptime and printer_supply perfometers
* Allow for displaying service data in host tables
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 9f1b26e..45dc34b 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -195,16 +195,21 @@ class Filter:
# Load all view plugins
plugins_path = defaults.web_dir + "/plugins/views"
-for fn in os.listdir(plugins_path):
+fns = os.listdir(plugins_path)
+fns.sort()
+for fn in fns:
if fn.endswith(".py"):
execfile(plugins_path + "/" + fn)
if defaults.omd_root:
local_plugins_path = defaults.omd_root + "/local/share/check_mk/web/plugins/views"
- if os.path.exists(local_plugins_path):
- for fn in os.listdir(local_plugins_path):
- if fn.endswith(".py"):
- execfile(local_plugins_path + "/" + fn)
+ if local_plugins_path != plugins_path: # honor ./setup.sh in site
+ if os.path.exists(local_plugins_path):
+ fns = os.listdir(local_plugins_path)
+ fns.sort()
+ for fn in fns:
+ if fn.endswith(".py"):
+ execfile(local_plugins_path + "/" + fn)
# Declare permissions for builtin views
config.declare_permission_section("view", "Builtin views")
Module: check_mk
Branch: master
Commit: 7d9771d9add9324b4309ab3631584b552dacafef
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7d9771d9add932…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri May 6 16:27:43 2011 +0200
df: fix problems with check parameters
The check crashed, if old style (tuple) parameters where used.
---
checks/df.include | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/checks/df.include b/checks/df.include
index 6f8d3dd..930ce0b 100644
--- a/checks/df.include
+++ b/checks/df.include
@@ -59,13 +59,20 @@ factory_settings["filesystem_default_levels"] = {
# compute warning and critical levels. Takes into account the size of
# the filesystem and the magic number. Since the size is only known at
# check time this function's result cannot be precompiled.
+# Note: this function is in our days only needed in order to support
+# old style params a'la (80, 90). As soon as we drop support for that
+# (can happen any decade now), we can get rid of this function.
def get_filesystem_levels(host, mountpoint, size_gb, params):
- # convert default levels to dictionary
+ # Start with factory settings
+ levels = factory_settings["filesystem_default_levels"].copy()
+ # convert default levels to dictionary. This is in order support
+ # old style levels like (80, 90)
if type(filesystem_default_levels) == dict:
- levels = filesystem_default_levels.copy()
+ levels.update(filesystem_default_levels)
else:
- levels = { "levels": filesystem_default_levels[:2] }
+ levels = factory_settings["filesystem_default_levels"].copy()
+ levels["levels"] = filesystem_default_levels[:2]
if len(filesystem_default_levels) == 2:
levels["magic"] = None
else: