Module: check_mk
Branch: master
Commit: dd13accc09e39167449c2712e8398a569cf2fcd0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dd13accc09e391…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Apr 16 15:16:00 2015 +0200
mknotifyd parameter: moved help text to correct valuespec
---
web/plugins/wato/mknotifyd.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/web/plugins/wato/mknotifyd.py b/web/plugins/wato/mknotifyd.py
index 5f21afd..b1dcf96 100644
--- a/web/plugins/wato/mknotifyd.py
+++ b/web/plugins/wato/mknotifyd.py
@@ -53,13 +53,13 @@ if mknotifyd_enabled:
( "both", _("Asynchronous local delivery plus remote forwarding" ) ),
],
default_value = False,
- help = _("This option dedices how notifications will be processed. Without the "
- "notification spooler (<tt>mknotifyd</tt>) only direct local delivery "
- "is possible. Long lasting or excessive notifications might slow down "
- "the monitoring. If you select remote forwarding then make sure that "
- "your notification spooler is correctly setup for incoming and/or "
- "outgoing connections."),
),
+ help = _("This option dedices how notifications will be processed. Without the "
+ "notification spooler (<tt>mknotifyd</tt>) only direct local delivery "
+ "is possible. Long lasting or excessive notifications might slow down "
+ "the monitoring. If you select remote forwarding then make sure that "
+ "your notification spooler is correctly setup for incoming and/or "
+ "outgoing connections."),
forth = lambda x: (x == False and "off" or (x == True and "local" or x)),
),
domain = "check_mk",
Module: check_mk
Branch: master
Commit: 26242c3f226d809d519317cbe7679a4e0b4a3ef1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=26242c3f226d80…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Apr 16 14:42:18 2015 +0200
#2068 FIX Filesystem checks: Fix crash when legacy parameters (tuple) were used
A library function, which is used by many filesystem checks, raised an exception
when the check parameters were not specified as dictionary. For example (93, 96).
This has been fixed.
---
.werks/2068 | 11 +++++++++++
ChangeLog | 1 +
checks/df.include | 21 +++++++++++----------
3 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/.werks/2068 b/.werks/2068
new file mode 100644
index 0000000..34b95b7
--- /dev/null
+++ b/.werks/2068
@@ -0,0 +1,11 @@
+Title: Filesystem checks: Fix crash when legacy parameters (tuple) were used
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1429187803
+Class: fix
+
+A library function, which is used by many filesystem checks, raised an exception
+when the check parameters were not specified as dictionary. For example (93, 96).
+This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index 9757f2e..b4ad364 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -331,6 +331,7 @@
* 2065 FIX: windows agent: now correctly installs service with elevated privileges...
* 2179 FIX: apc_symmetra: Fixed regression introduced with last release when output state is empty
* 2067 FIX: windows agent: product version is no longer set to 1.0.0...
+ * 2068 FIX: Filesystem checks: Fix crash when legacy parameters (tuple) were used...
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/checks/df.include b/checks/df.include
index 6caf03a..7fd2ad1 100644
--- a/checks/df.include
+++ b/checks/df.include
@@ -338,16 +338,17 @@ def df_check_filesystem_single(hostname, mountpoint, size_mb, avail_mb, reserved
elif used_mb >= warn_mb:
status = max(1, status)
- show_levels = params.get("show_levels")
- if show_levels == "always" or \
- (show_levels == "onproblem" and status > 0) or \
- (show_levels == "onmagic" and (status > 0 or levels.get("magic", 1.0) != 1.0)):
- infotext += ", " + levels["levels_text"]
-
- if reserved_mb > 0 and params["show_reserved"]:
- reserved_perc = 100.0 * float(reserved_mb) / size_mb
- infotext += ", therein reserved for root: %.1f%% (%.2f MB)" % (reserved_perc, reserved_mb)
- perfdata.append(("reserved", reserved_mb))
+ if type(params) == dict:
+ show_levels = params.get("show_levels")
+ if show_levels == "always" or \
+ (show_levels == "onproblem" and status > 0) or \
+ (show_levels == "onmagic" and (status > 0 or levels.get("magic", 1.0) != 1.0)):
+ infotext += ", " + levels["levels_text"]
+
+ if reserved_mb > 0 and params["show_reserved"]:
+ reserved_perc = 100.0 * float(reserved_mb) / size_mb
+ infotext += ", therein reserved for root: %.1f%% (%.2f MB)" % (reserved_perc, reserved_mb)
+ perfdata.append(("reserved", reserved_mb))
# Trends. The trends are computed in two steps. In the first step we
# compute the delta to the last check, using a normal check_mk counter.
Module: check_mk
Branch: master
Commit: c45c5dc2fadf879a1942ec54b2ac993473c5b472
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c45c5dc2fadf87…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Apr 16 12:21:45 2015 +0200
#2203 FIX Fix sorting of unselected elements in a list choice with two panes
---
.werks/2203 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/valuespec.py | 7 ++++---
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/.werks/2203 b/.werks/2203
new file mode 100644
index 0000000..ee67927
--- /dev/null
+++ b/.werks/2203
@@ -0,0 +1,9 @@
+Title: Fix sorting of unselected elements in a list choice with two panes
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.7i1
+Date: 1429179695
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index eecf934..f965069 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -447,6 +447,7 @@
* 2191 FIX: Fixed handling of URL variable 'mode' in web API for discovering services...
* 1956 FIX: WATO Web-API: Fixed exception information for single sites...
* 2178 FIX: Fixed handling of user erros in WATO when using Python < 2.5
+ * 2203 FIX: Fix sorting of unselected elements in a list choice with two panes
Notifications:
* 1662 notification plugin spectrum: finalized script. now able to handle host notications
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 6945703..3054f8f 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -1621,7 +1621,8 @@ class DualListChoice(ListChoice):
for v in value:
if v in allowed_keys:
selected.append((v, edict[v]))
- for v in allowed_keys:
+
+ for v, name in self._elements:
if v not in value:
unselected.append((v, edict[v]))
else:
@@ -1655,7 +1656,8 @@ class DualListChoice(ListChoice):
onchange_selected += ';vs_duallist_enlarge(\'selected\', \'%s\')' % varprefix
onchange_unselected += ';vs_duallist_enlarge(\'unselected\', \'%s\')' % varprefix
- html.sorted_select(varprefix + '_unselected', unselected,
+ func = self._custom_order and html.select or html.sorted_select
+ func(varprefix + '_unselected', unselected,
attrs = {
'size' : self._rows,
'multiple' : 'multiple',
@@ -1664,7 +1666,6 @@ class DualListChoice(ListChoice):
},
onchange = onchange_unselected)
html.write('</td><td>')
- func = self._custom_order and html.select or html.sorted_select
func(varprefix + '_selected', selected,
attrs = {
'size' : self._rows,
Module: check_mk
Branch: master
Commit: 080f4dbfbb9cf1173bf7a1ae1c39cd2e59489c52
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=080f4dbfbb9cf1…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Thu Apr 16 12:14:20 2015 +0200
hitachi_hus_dkc, hitachi_hus_dku: small changes to criteria for states
---
checkman/hitachi_hus_dkc | 7 ++++---
checkman/hitachi_hus_dku | 8 +++++---
checks/hitachi_hus_dkc | 25 ++++++++++++++-----------
checks/hitachi_hus_dku | 15 +++++++++------
4 files changed, 32 insertions(+), 23 deletions(-)
diff --git a/checkman/hitachi_hus_dkc b/checkman/hitachi_hus_dkc
index 51443ad..dc22290 100644
--- a/checkman/hitachi_hus_dkc
+++ b/checkman/hitachi_hus_dkc
@@ -12,9 +12,10 @@ description:
Processor, Internal Bus, Cache, Shared Memory, Power Supply, Battery,
Fan, Environment.
- The checks gets CRIT if one of the components is not in the state "noError".
- In addition, the Environment component is also OK, when it is in the state
- "moderate".
+ The check is {OK} if all of the components are in the state "noError".
+ It is {WARN} if some of the components are in the states "moderate" or
+ "service". It is {CRIT} if some of the components are in other states as
+ the above-mentioned.
inventory:
One item for every DKC chassis found
diff --git a/checkman/hitachi_hus_dku b/checkman/hitachi_hus_dku
index 38a9a52..ec1a3e2 100644
--- a/checkman/hitachi_hus_dku
+++ b/checkman/hitachi_hus_dku
@@ -10,9 +10,11 @@ description:
extract state information of the following hardware components of the DKU:
Power Supply, Drive, Fan, Environment.
- The checks gets CRIT if one of the components is not in the state "noError".
- In addition, the Environment component is also OK, when it is in the state
- "moderate".
+ The check is {OK} if all of the components are in the state "noError".
+ It is {WARN} if some of the components are in the states "moderate" or
+ "service". It is {CRIT} if some of the components are in other states as
+ the above-mentioned.
+
inventory:
One service for every DKU chassis found
diff --git a/checks/hitachi_hus_dkc b/checks/hitachi_hus_dkc
index 727b7b6..5cfac6f 100644
--- a/checks/hitachi_hus_dkc
+++ b/checks/hitachi_hus_dkc
@@ -31,16 +31,16 @@ def inventory_hitachi_hus_dkc(info):
yield line[0], None
def check_hitachi_hus_dkc(item, _no_params, info):
- # table of end-OIDs, monitored entities and OK states
+ # table of end-OIDs, monitored entities and OK/Warn states
component_map = {
- 2: ("Processor", (1, ) ),
- 3: ("Internal Bus", (1, ) ),
- 4: ("Cache", (1, ) ),
- 5: ("Shared Memory", (1, ) ),
- 6: ("Power Supply", (1, ) ),
- 7: ("Battery", (1, ) ),
- 8: ("Fan", (1, ) ),
- 9: ("Environment", (1, 4) ),
+ 2: ("Processor", (1, ), (4, 5) ),
+ 3: ("Internal Bus", (1, ), (4, 5) ),
+ 4: ("Cache", (1, ), (4, 5) ),
+ 5: ("Shared Memory", (1, ), (4, 5) ),
+ 6: ("Power Supply", (1, ), (4, 5) ),
+ 7: ("Battery", (1, ), (4, 5) ),
+ 8: ("Fan", (1, ), (4, 5) ),
+ 9: ("Environment", (1, ), (4, 5) ),
}
error_list = [
"unknown",
@@ -55,9 +55,12 @@ def check_hitachi_hus_dkc(item, _no_params, info):
if line[0] == item:
infotext = ""
errors = False
- for end_oid, (component, ok_states) in component_map.iteritems():
+ for end_oid, (component, ok_states, warn_states) in component_map.iteritems():
severity = int(line[end_oid - 1])
- if severity not in ok_states:
+ if severity in warn_states:
+ errors = True
+ yield 1, "%s has errors of severity \"%s\"" % (component, error_list[severity])
+ elif severity not in ok_states:
errors = True
yield 2, "%s has errors of severity \"%s\"" % (component, error_list[severity])
if not errors:
diff --git a/checks/hitachi_hus_dku b/checks/hitachi_hus_dku
index a766096..ba15a7b 100644
--- a/checks/hitachi_hus_dku
+++ b/checks/hitachi_hus_dku
@@ -33,10 +33,10 @@ def inventory_hitachi_hus_dku(info):
def check_hitachi_hus_dku(item, _no_params, info):
# table of end-OIDs, monitored components and OK states
component_map = {
- 2: ("Power Supply", (1,) ),
- 3: ("Fan", (1,) ),
- 4: ("Environment", (1, 4,) ),
- 5: ("Drive", (1,) ),
+ 2: ("Power Supply", (1,), (4, 5) ),
+ 3: ("Fan", (1,), (4, 5) ),
+ 4: ("Environment", (1,), (4, 5) ),
+ 5: ("Drive", (1,), (4, 5) ),
}
error_list = [
"unknown",
@@ -51,9 +51,12 @@ def check_hitachi_hus_dku(item, _no_params, info):
if line[0] == item:
infotext = ""
errors = False
- for end_oid, (component, ok_states) in component_map.iteritems():
+ for end_oid, (component, ok_states, warn_states) in component_map.iteritems():
severity = int(line[end_oid - 1])
- if severity not in ok_states:
+ if severity in warn_states:
+ errors = True
+ yield 1, "%s has errors of severity \"%s\"" % (component, error_list[severity])
+ elif severity not in ok_states:
errors = True
yield 2, "%s has errors of severity \"%s\"" % (component, error_list[severity])
if not errors:
Module: check_mk
Branch: master
Commit: a73512cddcef016ad34ebf348c088653a032d525
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a73512cddcef01…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Apr 16 08:39:17 2015 +0200
Fixed exception in action menu when views are not yet loaded in apache process
---
web/htdocs/views.py | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index ddaedfb..e76af72 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -93,7 +93,13 @@ def load_views():
transform_old_views()
def permitted_views():
- return available_views
+ try:
+ return available_views
+ except:
+ # In some cases, for example when handling AJAX calls the views might
+ # have not been loaded yet
+ load_views()
+ return available_views
# Convert views that are saved in the pre 1.2.6-style
# FIXME: Can be removed one day. Mark as incompatible change or similar.
@@ -794,18 +800,14 @@ def page_view():
def get_needed_columns(view, painters):
# Make sure that the information about the available views is present. If
# called via the reporting, than this might not be the case
- try:
- available_views
- except:
- load_views()
-
+ views = permitted_views()
columns = []
for entry in painters:
painter = entry[0]
linkview_name = entry[1]
columns += painter["columns"]
if linkview_name:
- linkview = available_views.get(linkview_name)
+ linkview = views.get(linkview_name)
if linkview:
for filt in [ visuals.get_filter(fn) for fn in visuals.get_single_info_keys(linkview) ]:
columns += filt.link_columns
@@ -2069,7 +2071,7 @@ def url_to_view(row, view_name):
if 'I' not in html.display_options:
return None
- view = available_views.get(view_name)
+ view = permitted_views().get(view_name)
if view:
# Get the context type of the view to link to, then get the parameters of this
# context type and try to construct the context from the data of the row