Module: check_mk
Branch: master
Commit: defd075dae12af81c9f9f0f57fb16303823f2187
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=defd075dae12af…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue May 19 11:41:45 2015 +0200
#2254 FIX Fixed error message in parameter columns of discovered services
All discovered services were showing up the "Invalid check parameter" error
message
in the "check parameters" column of the service discovery table of a host.
This error was simply a problem of visualisation in this table and had no other
negative effect, the checks worked without a problem.
---
.werks/2254 | 13 +++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 1 +
web/plugins/wato/check_parameters.py | 9 ++++++++-
4 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/.werks/2254 b/.werks/2254
new file mode 100644
index 0000000..15b2180
--- /dev/null
+++ b/.werks/2254
@@ -0,0 +1,13 @@
+Title: Fixed error message in parameter columns of discovered services
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1432028372
+
+All discovered services were showing up the "Invalid check parameter" error
message
+in the "check parameters" column of the service discovery table of a host.
+This error was simply a problem of visualisation in this table and had no other
+negative effect, the checks worked without a problem.
diff --git a/ChangeLog b/ChangeLog
index b2b3c23..10f0137 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -498,6 +498,7 @@
* 2203 FIX: Fix sorting of unselected elements in a list choice with two panes
* 2244 FIX: Fixed sorting of host tag topics in dropdown selections
* 2263 FIX: Bulk service discovery: Fixed error when doing bulk inventory on locked
folders...
+ * 2254 FIX: Fixed error message in parameter columns of discovered services...
Notifications:
* 1662 notification plugin spectrum: finalized script. now able to handle host
notications
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 2c223bc..12c0774 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -3291,6 +3291,7 @@ def show_service_table(host, firsttime):
except Exception, e:
paramtext = _("Invalid check parameter: %s!") % e
paramtext += _(" The parameter is: %r") % (params,)
+ paramtext += _(" The varname is: %s") % varname
html.write(paramtext)
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index db770a8..0cee1fc 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -7737,6 +7737,13 @@ def ps_convert_from_singlekeys(old_params):
del params[key]
return params
+def ps_convert_inventorized_from_singlekeys(old_params):
+ params = ps_convert_from_singlekeys(old_params)
+ if 'user' in params:
+ del params['user']
+ if 'process' in params:
+ del params['process']
+ return params
# Rule for disovered process checks
register_check_parameters(
@@ -7752,7 +7759,7 @@ register_check_parameters(
))
]
),
- forth = ps_convert_from_singlekeys,
+ forth = ps_convert_inventorized_from_singlekeys,
),
TextAscii(
title = _("Process name as defined at discovery"),