Module: check_mk
Branch: master
Commit: 0d67adda933ebdcf4f543d07eacaa49e866700de
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0d67adda933ebd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Oct 19 13:46:53 2017 +0200
werk script: Allow choices where all identifying characters are already in use
Change-Id: Ia181142bc06327fdddb4cf83a283dd0126b58f0a
---
werk | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/werk b/werk
index f52e532..c5840e1 100755
--- a/werk
+++ b/werk
@@ -448,17 +448,30 @@ def getch():
return ch
def input_choice(what, choices):
+ next_index = 0
ctc = {}
texts = []
for choice in choices:
if type(choice) == tuple:
choice = choice[0]
+
+ added = False
+
+ # Find an identifying character for the input choice. In case all possible
+ # characters are already used start using unique numbers
for c in str(choice):
if c not in ".-_/" and c not in ctc:
ctc[c] = choice
texts.append(str(choice).replace(c, tty_bold + c + tty_normal, 1))
+ added = True
break
+ if not added:
+ ctc["%s" % next_index] = choice
+ texts.append("%s:%s" % ("%s%d%s" % (tty_bold, next_index, tty_normal), choice))
+ next_index += 1
+
+
while True:
sys.stdout.write("%s (%s): " % (what, ", ".join(texts)))
sys.stdout.flush()
Module: check_mk
Branch: master
Commit: d0f0bb3e0e3f8bc4325d0cefbadaca7ed8118b8e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d0f0bb3e0e3f8b…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Thu Oct 19 09:36:42 2017 +0200
5304 FIX mssql_backup: Fixed error if existing rule has been set before 1.5.0
In werk #4811 the ruleset for mssql_backup has been extended. Since then the
GUI would crash if a rule has been set up previously to this update. This
has been fixed now.
Change-Id: Ibe3917706d6a277430a6129d7f613fd0891159fc
---
.werks/5304 | 12 ++++++++++++
web/plugins/wato/check_parameters.py | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/5304 b/.werks/5304
new file mode 100644
index 0000000..12fee78
--- /dev/null
+++ b/.werks/5304
@@ -0,0 +1,12 @@
+Title: mssql_backup: Fixed error if existing rule has been set before 1.5.0
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1508398316
+Class: fix
+
+In werk #4811 the ruleset for mssql_backup has been extended. Since then the
+GUI would crash if a rule has been set up previously to this update. This
+has been fixed now.
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 9957480..c93e2be 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -9584,7 +9584,7 @@ register_check_parameters(
TextAscii(
title = _("Service descriptions"),
allow_empty = False),
- "dict",
+ "first",
)
register_check_parameters(
Module: check_mk
Branch: master
Commit: d9fb483ae87db0ac2de441caeb8afd8d4274150c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d9fb483ae87db0…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Mon Oct 16 14:59:43 2017 +0200
5303 FIX local: Fixed missing warn/crit in graphs if upper and lower thresholds are in perfdata
A graph did not display warn/crit values if there has been upper and lower
thresholds in the perfdata of a local check. The cause of this has been a colon
in between these values. The upper thresholds are represented in a graph now.
Change-Id: Iee276cf5749ec2213b778b1dd4e4acff4867eb7e
---
.werks/5303 | 12 ++++++++++++
checks/local | 9 +++++++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/.werks/5303 b/.werks/5303
new file mode 100644
index 0000000..a0d9feb
--- /dev/null
+++ b/.werks/5303
@@ -0,0 +1,12 @@
+Title: local: Fixed missing warn/crit in graphs if upper and lower thresholds are in perfdata
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1508158546
+Class: fix
+
+A graph did not display warn/crit values if there has been upper and lower
+thresholds in the perfdata of a local check. The cause of this has been a colon
+in between these values. The upper thresholds are represented in a graph now.
diff --git a/checks/local b/checks/local
index c8d9f0d..c985fe0 100644
--- a/checks/local
+++ b/checks/local
@@ -121,19 +121,24 @@ def _parse_local_line(line):
output = " ".join(line[3:]).replace("\\n", "\n")
perfdata = []
+ compute_data = []
if perftxt != "-":
for entry in perftxt.split('|'):
try:
varname, valuetxt = entry.split('=')
values = valuetxt.split(';')
- perfdata.append( tuple([varname] + values) )
+ compute_data.append( tuple([varname] + values) )
+ # perfdata must not contain values with colons. So we split
+ # these values and use the upper levels only.
+ upper_values = [v.split(':')[-1] for v in values]
+ perfdata.append( tuple([varname] + upper_values) )
except ValueError:
return 3, "Invalid performance data %s in local check output %s" % \
(perftxt, " ".join(line)), []
if statechar == 'P':
- state, texts = local_compute_state(perfdata)
+ state, texts = local_compute_state(compute_data)
if output:
texts = [output] + texts
output = ", ".join(texts)