Module: check_mk
Branch: master
Commit: ed908c0b47cfcff7cdadcbf902176f92435e6d23
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ed908c0b47cfcf…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Oct 12 09:05:27 2018 +0200
6779 FIX Fixed displaying unrelated livestatus data to users randomly
Because subsequent requests to the GUI could use left over livestatus connections
of other users it could randomly happen that one user used the livestatus connection
of another user which could then result in wrong data shown to the user in the
GUI.
Change-Id: I53cd562798870a6cac40ef05a2c87f0fb2e8d1f7
---
.werks/6779 | 14 ++++++++++++++
web/app/index.wsgi | 6 ++++++
2 files changed, 20 insertions(+)
diff --git a/.werks/6779 b/.werks/6779
new file mode 100644
index 0000000..d4b6243
--- /dev/null
+++ b/.werks/6779
@@ -0,0 +1,14 @@
+Title: Fixed displaying unrelated livestatus data to users randomly
+Level: 2
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1539264368
+
+Because subsequent requests to the GUI could use left over livestatus connections
+of other users it could randomly happen that one user used the livestatus connection
+of another user which could then result in wrong data shown to the user in the
+GUI.
diff --git a/web/app/index.wsgi b/web/app/index.wsgi
index dcce0ea..563b236 100644
--- a/web/app/index.wsgi
+++ b/web/app/index.wsgi
@@ -168,6 +168,12 @@ class Application(object):
# time before the first login for generating auth.php.
modules.load_all_plugins()
+ # Clean up left over livestatus + connection objects (which are
+ # globally stored in sites module). This is a quick fix for the 1.5
+ # and will be cleaned up in 1.6 by storing these objects in the user
+ # request context instead of a global context.
+ sites.disconnect()
+
handler = pages.get_page_handler(html.myfile, self._page_not_found)
# Some pages do skip authentication. This is done by adding
Module: check_mk
Branch: master
Commit: 29d1a5a5ef2447501bcbc8118c79bb13073444df
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=29d1a5a5ef2447…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Oct 12 07:48:57 2018 +0200
6782 FIX Fixed automatic refresh of "Custom graph" pages
The graphs on the dedicated custom graph pages that are linked
from the sidebar were not refreshed at all. Now they are refreshed
regularly, just like the other views.
Change-Id: I7ddc51aa0d0594417032fa662c32beaebcaf6f6f
---
.werks/6782 | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/.werks/6782 b/.werks/6782
new file mode 100644
index 0000000..14010f4
--- /dev/null
+++ b/.werks/6782
@@ -0,0 +1,13 @@
+Title: Fixed automatic refresh of "Custom graph" pages
+Level: 1
+Component: metrics
+Class: fix
+Compatible: compat
+Edition: cee
+State: unknown
+Version: 1.6.0i1
+Date: 1539323264
+
+The graphs on the dedicated custom graph pages that are linked
+from the sidebar were not refreshed at all. Now they are refreshed
+regularly, just like the other views.
Module: check_mk
Branch: master
Commit: 12b7213f68752408111b8181be95a824e09252bf
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=12b7213f687524…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Oct 11 16:45:14 2018 +0200
added #WK6556
Change-Id: I9a9972dc1e86cb92526b04bcec8c3fed036f2fb1
---
.werks/6665 | 14 ++++++++++++++
cmk_base/checking.py | 28 ++++++++++------------------
2 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/.werks/6665 b/.werks/6665
new file mode 100644
index 0000000..b522304
--- /dev/null
+++ b/.werks/6665
@@ -0,0 +1,14 @@
+Title: Checks may now yield the value None as plugin output
+Level: 1
+Component: checks
+Class: feature
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1539174883
+
+A check usually returns a state, followed by text and optional perfdata.
+The plugin output was not well formatted, in case yield returned an empty string.
+It is now possible to yield None as plugin output, which instructs the Check API
+to ignore this value.
diff --git a/cmk_base/checking.py b/cmk_base/checking.py
index 6dfdf1c..bb7c81e 100644
--- a/cmk_base/checking.py
+++ b/cmk_base/checking.py
@@ -421,33 +421,25 @@ def _sanitize_yield_check_result(result, is_snmp):
if not subresults:
return _item_not_found(is_snmp)
- # Simple check with no separate subchecks (yield wouldn't have been neccessary here!)
- if len(subresults) == 1:
- state, infotext, perfdata = _sanitize_tuple_check_result(subresults[0], allow_missing_infotext=True)
- # just to be safe - infotext should allways be a string
- if infotext == None:
- return state, u"", perfdata
-
- return state, infotext, perfdata
# Several sub results issued with multiple yields. Make that worst sub check
# decide the total state, join the texts and performance data. Subresults with
# an infotext of None are used for adding performance data.
- else:
- perfdata = []
- infotexts = []
- status = 0
+ perfdata = []
+ infotexts = []
+ status = 0
- for subresult in subresults:
- st, text, perf = _sanitize_tuple_check_result(subresult, allow_missing_infotext=True)
+ for subresult in subresults:
+ st, text, perf = _sanitize_tuple_check_result(subresult, allow_missing_infotext=True)
+ status = cmk_base.utils.worst_service_state(st, status)
+ if text != None:
infotexts.append(text + ["", "(!)", "(!!)", "(?)"][st])
- status = cmk_base.utils.worst_service_state(st, status)
- if perf != None:
- perfdata += subresult[2]
+ if perf != None:
+ perfdata += perf
- return status, ", ".join(i for i in infotexts if i), perfdata
+ return status, ", ".join(infotexts), perfdata
def _item_not_found(is_snmp):