Module: check_mk
Branch: master
Commit: 2b7bfca646ba07e88493ba73ece42076fe3005bc
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2b7bfca646ba07…
Author: Andreas <ab(a)mathias-kettner.de>
Date: Wed Jun 20 15:42:00 2018 +0200
6232 FIX Notifications rules are no longer sortable
The WATO GUI allowed to sort the list of notification rules.
Since the correct ordering of these rules is very significant, it is no
longer possible to change the (display) order in the GUI.
Change-Id: I94ae8bd975cbfbd7f21c920093eb784dfd5d3e16
---
.werks/6232 | 14 ++++++++++++++
web/htdocs/wato.py | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/6232 b/.werks/6232
new file mode 100644
index 0000000..d04099a
--- /dev/null
+++ b/.werks/6232
@@ -0,0 +1,14 @@
+Title: Notifications rules are no longer sortable
+Level: 1
+Component: notifications
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1529501298
+
+The WATO GUI allowed to sort the list of notification rules.
+Since the correct ordering of these rules is very significant, it is no
+longer possible to change the (display) order in the GUI.
+
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index d908860..432d202 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8666,7 +8666,7 @@ def render_notification_rules(rules, userid="", show_title=False, show_buttons=T
title = code + _("Notification rules of user %s") % userid
else:
title = _("Global notification rules")
- table.begin(title = title, limit = None)
+ table.begin(title = title, limit = None, sortable=False)
if analyse:
analyse_rules, analyse_plugins = analyse
Module: check_mk
Branch: master
Commit: fad8ae06e20c448b8a2c61e7ac9b5a57fb690ed4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fad8ae06e20c44…
Author: Andreas <ab(a)mathias-kettner.de>
Date: Wed Jun 20 15:20:11 2018 +0200
6231 FIX WATO GUI rule matching: Fixed broken evaluation of negated WATO rules
The rule matching algorithm failed, if there was a negated service or item specified.
Instead of a negative match, a positive match was returned. This has been fixed.
Note: This was a GUI only bug, it didn't have any effect on the actual monitoring.
Change-Id: Id9d737f10df4536db5ab250e3015812b86278c98
---
.werks/6231 | 16 ++++++++++++++++
web/htdocs/watolib.py | 9 +++++++--
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/.werks/6231 b/.werks/6231
new file mode 100644
index 0000000..0ad7689
--- /dev/null
+++ b/.werks/6231
@@ -0,0 +1,16 @@
+Title: WATO GUI rule matching: Fixed broken evaluation of negated WATO rules
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1529500572
+
+The rule matching algorithm failed, if there was a negated service or item specified.
+Instead of a negative match, a positive match was returned. This has been fixed.
+Note: This was a GUI only bug, it didn't have any effect on the actual monitoring.
+
+
+
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index a570767..e3f1493 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -8428,8 +8428,13 @@ class Rule(object):
def matches_item(self, item):
for item_spec in self.item_list:
- if re.match(item_spec, "%s" % item):
- return True
+ do_negate = False
+ compare_item = item_spec
+ if compare_item and compare_item[0] == ENTRY_NEGATE_CHAR:
+ compare_item = compare_item[1:]
+ do_negate = True
+ if re.match(compare_item, "%s" % item):
+ return not do_negate
return False
Module: check_mk
Branch: master
Commit: a0f2045a70b0a62c39d48c277a402b4e346343a6
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a0f2045a70b0a6…
Author: Andreas <ab(a)mathias-kettner.de>
Date: Tue Jun 19 09:43:38 2018 +0200
6229 netapp_api_status: now also supports state "ok_with_suppressed"
Some NetApp system seem to report <tt>ok_with_suppressed instead</tt> of <tt>ok-with-suppressed</tt>.
The check will handle this accordingly.
Change-Id: Ia6cbb3d0bd50c3cd31ffb5d6d38699043c9c7efb
---
.werks/6229 | 14 ++++++++++++++
checks/netapp_api_status | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/6229 b/.werks/6229
new file mode 100644
index 0000000..c7e13af
--- /dev/null
+++ b/.werks/6229
@@ -0,0 +1,14 @@
+Title: netapp_api_status: now also supports state "ok_with_suppressed"
+Level: 1
+Component: checks
+Class: feature
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1529394074
+
+Some NetApp system seem to report <tt>ok_with_suppressed instead</tt> of <tt>ok-with-suppressed</tt>.
+The check will handle this accordingly.
+
+
diff --git a/checks/netapp_api_status b/checks/netapp_api_status
index baac6b1..6b12646 100644
--- a/checks/netapp_api_status
+++ b/checks/netapp_api_status
@@ -34,7 +34,7 @@ def check_netapp_api_status(item, _no_params, info):
data = dict([line for line in info if len(line) == 2])
if data.get("status"):
- state = data["status"].lower() not in ["ok", "ok-with-suppressed"] and 2 or 0
+ state = data["status"].lower() not in ["ok", "ok-with-suppressed", "ok_with_suppressed"] and 2 or 0
yield state, "Status: %s" % data["status"]
del data["status"]
Module: check_mk
Branch: master
Commit: 4e8fdbbf0e53b504d367debd0fe23d3e814121f1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4e8fdbbf0e53b5…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Fri Jun 15 13:15:59 2018 +0200
Make DiscoveryResult iterable
This makes two instances comparable to one another.
Change-Id: Ifa562122039c75ca16988e20165634bf2db07695
---
tests/unit/checks/checktestlib.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/unit/checks/checktestlib.py b/tests/unit/checks/checktestlib.py
index 44333f4..203e24a 100644
--- a/tests/unit/checks/checktestlib.py
+++ b/tests/unit/checks/checktestlib.py
@@ -192,11 +192,14 @@ class DiscoveryResult(object):
self.entries.append(DiscoveryEntry(entry))
def __eq__(self, other_value):
- return all(entry in other_value for entry in self.entries) and \
- all(other_entry in self.entries for other_entry in other_value)
+ return all(entry in other_value for entry in self) and \
+ all(other_entry in self for other_entry in other_value)
def __contains__(self, value):
return value in self.entries
+ def __iter__(self):
+ return iter(self.entries)
+
def __repr__(self):
return "DiscoveryResult(%s)" % (",\n".join([repr(entry) for entry in self.entries]))
Module: check_mk
Branch: master
Commit: 9bd8a3db7ff603129b0c6d3b778575136415448a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9bd8a3db7ff603…
Author: Andreas <ab(a)mathias-kettner.de>
Date: Mon Jun 18 13:04:24 2018 +0200
5826 FIX mrpe: Fixed broken option "Append age to output"
Setting this option in the agent bakery, causing the mrpe check not to return any output.
Change-Id: Iffb0b935cf6d9d9e1ba2c8b004825a1d5b157424
---
.werks/5826 | 11 +++++++++++
agents/check_mk_agent.linux | 7 +++++--
agents/check_mk_agent.solaris | 7 +++++--
3 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/.werks/5826 b/.werks/5826
new file mode 100644
index 0000000..6f007ac
--- /dev/null
+++ b/.werks/5826
@@ -0,0 +1,11 @@
+Title: mrpe: Fixed broken option "Append age to output"
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1529319773
+
+Setting this option in the agent bakery, causing the mrpe check not to return any output.
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 530ecfb..6c31894 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -198,6 +198,7 @@ export -f run_mrpe
# run_cached [-s] NAME MAXAGE
# -s creates the section header <<<$NAME>>>
# -m mrpe-mode: stores exit code with the cache
+# -ma mrpe-mode with age: stores exit code with the cache and adds the cache age
# NAME is the name of the section (also used as cache file name)
# MAXAGE is the maximum cache livetime in seconds
function run_cached () {
@@ -206,9 +207,11 @@ function run_cached () {
local section=
local mrpe=0
local append_age=0
+ # TODO: this function is unable to handle mulitple args at once
+ # for example: -s -m won't work, it is read as single token "-s -m"
if [ "$1" = -s ] ; then local section="echo '<<<$2:cached($NOW,$3)>>>' ; " ; shift ; fi
if [ "$1" = -m ] ; then local mrpe=1 ; shift ; fi
- if [ "$1" = -a ] ; then local append_age=1 ; shift ; fi
+ if [ "$1" = "-ma" ] ; then local mrpe=1 ; local append_age=1 ; shift ; fi
local NAME=$1
local MAXAGE=$2
shift 2
@@ -1084,7 +1087,7 @@ then
if [ "$key" = "interval" ] ; then
interval=$value
elif [ "$key" = "appendage" ] ; then
- args="$args -a"
+ args="-ma"
fi
done
fi
diff --git a/agents/check_mk_agent.solaris b/agents/check_mk_agent.solaris
index 6080dc3..87e5f24 100755
--- a/agents/check_mk_agent.solaris
+++ b/agents/check_mk_agent.solaris
@@ -75,9 +75,12 @@ export -f run_mrpe
function run_cached () {
local mrpe=0
local append_age=0
+ # TODO: this function is unable to handle mulitple args at once
+ # for example: -s -m won't work, it is read as single token "-s -m"
+
if [ "$1" = -s ] ; then local section="echo '<<<$2>>>' ; " ; shift ; fi
if [ "$1" = -m ] ; then local mrpe=1 ; shift ; fi
- if [ "$1" = -a ] ; then local append_age=1 ; shift ; fi
+ if [ "$1" = "-ma" ] ; then local mrpe=1 ; local append_age=1 ; shift ; fi
local NAME=$1
local MAXAGE=$2
shift 2
@@ -442,7 +445,7 @@ then
if [ "$key" = "interval" ] ; then
interval=$value
elif [ "$key" = "appendage" ] ; then
- args="$args -a"
+ args="-ma"
fi
done
fi