Module: check_mk
Branch: master
Commit: e2358103ae2335793bd0dd2e0c35fe928f6c5f7e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e2358103ae2335…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Tue Mar 19 17:12:01 2019 +0100
7066 FIX k8s_stats.network: prefer lnx_if check if present
When the check_mk_agent was used together with the Kubernetes
special agent duplicate interfaces were discovered. Now the
lnx_if check from the check_mk_agent is preferred over the
k8s_stats.network check from the special agent.
Change-Id: Ic91376da1594d8861dd7cd9d6731775d62cb7e29
---
.werks/7066 | 14 ++++++++++++++
checks/k8s_stats | 39 +++++++++++++++++++++++++++++----------
2 files changed, 43 insertions(+), 10 deletions(-)
diff --git a/.werks/7066 b/.werks/7066
new file mode 100644
index 0000000..83056f2
--- /dev/null
+++ b/.werks/7066
@@ -0,0 +1,14 @@
+Title: k8s_stats.network: prefer lnx_if check if present
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1553011735
+
+When the check_mk_agent was used together with the Kubernetes
+special agent duplicate interfaces were discovered. Now the
+lnx_if check from the check_mk_agent is preferred over the
+k8s_stats.network check from the special agent.
diff --git a/checks/k8s_stats b/checks/k8s_stats
index 2ee6b4e..0e58d36 100644
--- a/checks/k8s_stats
+++ b/checks/k8s_stats
@@ -25,18 +25,32 @@
# Boston, MA 02110-1301 USA.
-@discover
-def discover_k8s_stats_network(key, value):
- if key == 'network':
- return set([interface.get('name') for interface in value['interfaces']])
+def discover_k8s_stats_network(parsed):
+ # don't use the k8s check if the check_mk_agent delivers interface data
+ parsed, lnx_info = parsed
+ if lnx_info:
+ return
+ for key, value in parsed.iteritems():
+ if key != 'network':
+ continue
-@discover
-def discover_k8s_stats_fs(key, value):
+ for interface in value['interface']:
+ yield interface.get('name'), {}
+
+
+def discover_k8s_stats_fs(parsed):
+ parsed, _ = parsed
ignore_fs = ['tmpfs', 'rootfs']
- if key == 'filesystem':
+
+ for key, value in parsed.iteritems():
+ if key != 'filesystem':
+ continue
+
devices = [disk.get('device') for disk in value]
- return set([x for x in devices if x not in ignore_fs])
+ for device in devices:
+ if device not in ignore_fs:
+ yield device, {}
def k8s_network_err_pac(device, params, now):
@@ -65,7 +79,9 @@ def k8s_network_err_pac(device, params, now):
yield status, infotext, perf_data
-def check_k8s_stats_network(item, params, metrics):
+def check_k8s_stats_network(item, params, parsed):
+ metrics, _ = parsed
+
device = sum([
collections.Counter(device)
for device in metrics['network']['interfaces']
@@ -98,7 +114,9 @@ def check_k8s_stats_network(item, params, metrics):
yield check_levels(rate, dsname, params.get('discards'), unit='1/s', infoname=name)
-def check_k8s_stats_fs(item, params, metrics):
+def check_k8s_stats_fs(item, params, parsed):
+ metrics, _ = parsed
+
disk = sum([
collections.Counter(device)
for device in metrics['filesystem']
@@ -118,6 +136,7 @@ def check_k8s_stats_fs(item, params, metrics):
check_info['k8s_stats'] = {
'parse_function': parse_k8s,
+ 'extra_sections': ['lnx_if'],
}
check_info['k8s_stats.network'] = {
Module: check_mk
Branch: master
Commit: 8125728c4609bcc02fadeea80b861a36068826bd
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8125728c4609bc…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Mar 20 08:54:59 2019 +0100
msexch_database: Fixed disappearance of services caused by dynamically generated IDs
Change-Id: I94151916061a699ce97552730e2a800d748a6d5a
---
.werks/7127 | 14 ++++++++++++++
checks/msexch_database | 6 ++++++
2 files changed, 20 insertions(+)
diff --git a/.werks/7127 b/.werks/7127
new file mode 100644
index 0000000..baee31b
--- /dev/null
+++ b/.werks/7127
@@ -0,0 +1,14 @@
+Title: msexch_database: Fixed disappearance of services caused by dynamically generated IDs
+Level: 1
+Component: checks
+Class: fix
+Compatible: incomp
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1553063899
+
+After a reboot of the exchange server the databases get dynamically
+generated IDs. These IDs were part of the items which led to vanished services.
+This has been fixed now. You have to perform a re-discovery on the
+affected hosts.
diff --git a/checks/msexch_database b/checks/msexch_database
index 82689a1..570ea9c 100644
--- a/checks/msexch_database
+++ b/checks/msexch_database
@@ -83,6 +83,12 @@ def parse_msexch_database(info):
if delocalize_func is not None:
instance, counter, value = delocalize_func(instance, counter, value)
+ # The entries for log verifier contain an ID as the last part
+ # which changes upon reboot of the exchange server. Therefore,
+ # we just remove them here as a workaround.
+ if '/log verifier' in instance:
+ instance = instance.rsplit(' ', 1)[0]
+
try:
parsed.setdefault(instance, {})[counter] = float(value)
except ValueError:
Module: check_mk
Branch: master
Commit: 2510f60ed531028eb8736a18eda6fdcdbdfb2544
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2510f60ed53102…
Author: Ronny Bruska <rb(a)mathias-kettner.de>
Date: Wed Mar 20 08:29:34 2019 +0100
Fixed two typos
Change-Id: I43dc4b587d732f597b95b42bae2858a70cfccc9b
---
.werks/7201 | 2 +-
cmk/gui/plugins/wato/notifications.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.werks/7201 b/.werks/7201
index 27ff229..15deefb 100644
--- a/.werks/7201
+++ b/.werks/7201
@@ -8,7 +8,7 @@ Date: 1552645826
Class: feature
Check_MK now supports integration with Servicenow.
-You can create, update and close incidents for Host an Service Problems.
+You can create, update and close incidents for Host and Service Problems.
Please see the inline help of the notification method rule within wato for detailed options.
diff --git a/cmk/gui/plugins/wato/notifications.py b/cmk/gui/plugins/wato/notifications.py
index 10e3d5b..84c473d 100644
--- a/cmk/gui/plugins/wato/notifications.py
+++ b/cmk/gui/plugins/wato/notifications.py
@@ -670,7 +670,7 @@ class NotificationParameterServiceNow(NotificationParameter):
("caller",
TextAscii(
title=_("Caller ID"),
- help=_("Caller is the user in behalf of whom the incident is being reported "
+ help=_("Caller is the user on behalf of whom the incident is being reported "
"within servicenow. Please enter the name of the caller here."),
)),
("host_short_desc",
Module: check_mk
Branch: master
Commit: 6864989ff097975daa93d14c1ab9514298708e56
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6864989ff09797…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 20 08:22:14 2019 +0100
7240 FIX Fixed possible exception when filtering views using non ASCII characters
A GUI timeout or UnicodeDecodeError messages could occur when trying to filter
views using non ASCII characters, like e.g. Umlauts. This could e.g. occur for
users when trying to view service detail pages of services that have such
characters in their names.
Change-Id: I6e7e9859bfeab9be1a0254b54fef63aa3306914e
---
.werks/7240 | 14 ++++++++++++++
cmk/gui/plugins/visuals/filters.py | 10 ++--------
cmk/gui/views.py | 2 +-
3 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/.werks/7240 b/.werks/7240
new file mode 100644
index 0000000..2c77be2
--- /dev/null
+++ b/.werks/7240
@@ -0,0 +1,14 @@
+Title: Fixed possible exception when filtering views using non ASCII characters
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1553012514
+
+A GUI timeout or UnicodeDecodeError messages could occur when trying to filter
+views using non ASCII characters, like e.g. Umlauts. This could e.g. occur for
+users when trying to view service detail pages of services that have such
+characters in their names.
diff --git a/cmk/gui/plugins/visuals/filters.py b/cmk/gui/plugins/visuals/filters.py
index c158a18..1716c20 100644
--- a/cmk/gui/plugins/visuals/filters.py
+++ b/cmk/gui/plugins/visuals/filters.py
@@ -87,16 +87,13 @@ class FilterText(Filter):
negate = ""
if current_value:
- if isinstance(current_value, unicode):
- current_value = current_value.encode("utf-8")
return "Filter: %s %s%s %s\n" % (
self.column,
negate,
self.op,
livestatus.lqencode(current_value),
)
- else:
- return ""
+ return ""
def variable_settings(self, row):
return [(self.htmlvars[0], row[self.column])]
@@ -295,15 +292,12 @@ class FilterHostnameOrAlias(FilterUnicode):
negate = ""
if current_value:
- if isinstance(current_value, unicode):
- current_value = current_value.encode("utf-8")
return "Filter: host_name %s%s %s\nFilter: alias %s%s %s\nOr: 2\n" % ((
negate,
self.op,
livestatus.lqencode(current_value),
) * 2)
- else:
- return ""
+ return ""
class FilterIPAddress(Filter):
diff --git a/cmk/gui/views.py b/cmk/gui/views.py
index 0ec3451..fd118ea 100644
--- a/cmk/gui/views.py
+++ b/cmk/gui/views.py
@@ -2302,7 +2302,7 @@ def query_action_data(what, host, site, svcdesc):
def ajax_popup_action_menu():
site = html.request.var('site')
host = html.request.var('host')
- svcdesc = html.request.var('service')
+ svcdesc = html.request.get_unicode_input('service')
what = 'service' if svcdesc else 'host'
display_options.load_from_html()
Module: check_mk
Branch: master
Commit: d326bb4fedeeb5e8aa02af94060b8732c4d91848
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d326bb4fedeeb5…
Author: Florian Kromer <fk(a)mathias-kettner.de>
Date: Wed Mar 6 14:42:09 2019 +0100
7046 cisco_temperature.dom: Make optical sensor levels configurable
This werk adds support for optical sensor power level configuration. Previously
device configuration specific power levels have been used only which lead to an
unexpected check status in case the devices have not been configured properly.
CMK-1616
Change-Id: Iebd21ebd24f4aaacf35f9d3a6bf4e0b6962666a6
---
.werks/7046 | 12 +
checkman/cisco_temperature.dom | 19 +-
checks/cisco_temperature | 273 ++++++++++++++++-----
cmk/gui/plugins/metrics/check_mk.py | 6 +
cmk/gui/plugins/wato/check_parameters/cisco_dom.py | 115 +++++++++
.../generictests/datasets/cisco_temperature.py | 38 ++-
tests/unit/checks/test_cisco_temperature.py | 33 +++
7 files changed, 419 insertions(+), 77 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=d326bb4fed…
Module: check_mk
Branch: master
Commit: 3e6b5e38ac16b0a48711769f405590f7bc917735
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3e6b5e38ac16b0…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 14 18:29:22 2019 +0100
Further cleanups
* Split watolib.tags and cmk.gui.tags tests up to separate files
* Aligned test order with implementation
* Some minor cleanups in tag classes
Change-Id: I3366ce3415e31bbf53643f1427aa1968e311df8e
---
cmk/gui/tags.py | 65 ++-----
tests/unit/cmk/gui/test_gui_tags.py | 311 ++++++++++++++++++++++++++++++
tests/unit/cmk/gui/watolib/test_tags.py | 329 ++++----------------------------
3 files changed, 363 insertions(+), 342 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=3e6b5e38ac…