Module: check_mk
Branch: master
Commit: 32d9fa1f98978a52ba09661bc4d63962fe32320b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=32d9fa1f98978a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Sep 21 18:58:31 2018 +0200
Locking livestatus port opening during tests
The integration tests failed from time to time when two
integration test jobs (of different branches) were trying
to allocate one port at the same time.
The new lock should prevent this issue.
Change-Id: Ib7fe14aa6da0270bab3c35c703e9344c879444ad
---
tests/testlib/__init__.py | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/tests/testlib/__init__.py b/tests/testlib/__init__.py
index 2220d1f..8c4f081 100644
--- a/tests/testlib/__init__.py
+++ b/tests/testlib/__init__.py
@@ -905,12 +905,15 @@ class Site(object):
start_again = True
self.stop()
- self.set_config("LIVESTATUS_TCP", "on")
- self._gather_livestatus_port()
- self.set_config("LIVESTATUS_TCP_PORT", str(self._livestatus_port))
-
- if start_again:
- self.start()
+ sys.stdout.write("Getting livestatus port lock (/tmp/cmk-test-open-livestatus-port)...\n")
+ with lockfile.FileLock("/tmp/cmk-test-livestatus-port"):
+ sys.stdout.write("Have livestatus port lock\n")
+ self.set_config("LIVESTATUS_TCP", "on")
+ self._gather_livestatus_port()
+ self.set_config("LIVESTATUS_TCP_PORT", str(self._livestatus_port))
+
+ if start_again:
+ self.start()
def _gather_livestatus_port(self):
Module: check_mk
Branch: master
Commit: e10fa5e0d3bc8e0def0fa07d833f1d35b6741a54
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e10fa5e0d3bc8e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Sep 21 18:52:16 2018 +0200
Fixed broken links in werk text
Change-Id: I8ac56f7446ca742be41fd0ce8ab0f9292e3d3c47
---
.werks/6639 | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/.werks/6639 b/.werks/6639
index 0227c3e..d5d3101 100644
--- a/.werks/6639
+++ b/.werks/6639
@@ -11,11 +11,10 @@ It is now possible to for Check_MK to send notifications about state
changes of hosts and services into a Slack channel.
Slack needs to be first configured to recieve messages from Check_MK. This
-can be done by setting up a Webhook <a
-href=\"https://my.slack.com/services/new/incoming-webhook/\"
-target=\"_blank\"> here </a>, where you specify which channel wil recieve
-the notifications. In Check_MK, under WATO->Notifications, create a new
-notification rule. And select under Notification Method Slack. Copy the URL
-that Slack gives you after completing the configuration into the Slack
-Webhook-URL field. Optionally if you want sent messages to include
-hyperlinks to Check_MK, enable the field URL prefix for links to Check_MK.
+can be done by setting up a Webhook <a href="https://my.slack.com/services/new/incoming-webhook/" target="_blank">here</a>,
+where you specify which channel will recieve the notifications. In Check_MK,
+under "WATO - Notifications", create a new notification rule. And select under
+Notification Method Slack. Copy the URL that Slack gives you after completing
+the configuration into the Slack Webhook-URL field. Optionally if you want sent
+messages to include hyperlinks to Check_MK, enable the field URL prefix for
+links to Check_MK.
Module: check_mk
Branch: master
Commit: 4ff6f9412e173ff190b362fd3cf211e476039221
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4ff6f9412e173f…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Sep 21 09:56:52 2018 +0200
Deobfuscate SNMPCredentials a little bit.
Change-Id: I684a54da95c8495f51edea83523a2404513a53ff
---
cmk/gui/plugins/wato/utils/__init__.py | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/cmk/gui/plugins/wato/utils/__init__.py b/cmk/gui/plugins/wato/utils/__init__.py
index c5fbb79..cf7dc69 100644
--- a/cmk/gui/plugins/wato/utils/__init__.py
+++ b/cmk/gui/plugins/wato/utils/__init__.py
@@ -265,11 +265,23 @@ class SNMPCredentials(Alternative):
def __init__(self, allow_none=False, **kwargs):
def alternative_match(x):
if kwargs.get("only_v3"):
- return x and (len(x) == 6 and 2 or len(x) == 4 and 1) or 0
+ # NOTE: Indices are shifted by 1 due to a only_v3 hack below!!
+ if x is None or len(x) == 2:
+ return 0 # noAuthNoPriv
+ if len(x) == 4:
+ return 1 # authNoPriv
+ if len(x) == 6:
+ return 2 # authPriv
else:
- return type(x) == tuple and ( \
- len(x) in [1, 2] and 1 or \
- len(x) == 4 and 2 or 3) or 0
+ if x is None or isinstance(x, basestring):
+ return 0 # community only
+ if len(x) == 1 or len(x) == 2:
+ return 1 # noAuthNoPriv
+ if len(x) == 4:
+ return 2 # authNoPriv
+ if len(x) == 6:
+ return 3 # authPriv
+ raise MKGeneralException("invalid SNMP credential format %s" % x)
if allow_none:
none_elements = [
@@ -306,7 +318,7 @@ class SNMPCredentials(Alternative):
),
]
),
- forth = lambda x: (x and len(x) == 2) and x or ("noAuthNoPriv", "")
+ forth = lambda x: x if (x and len(x) == 2) else ("noAuthNoPriv", "")
),
Tuple(
title = _("Credentials for SNMPv3 with authentication but without privacy (authNoPriv)"),
@@ -346,6 +358,8 @@ class SNMPCredentials(Alternative):
kwargs["default_value"] = "public"
if kwargs.get("only_v3"):
+ # HACK: This shifts the indices in alternative_match above!!
+ # Furthermore, it doesn't work in conjunction with allow_none.
kwargs["elements"].pop(0)
kwargs.setdefault("title", _("SNMPv3 credentials"))
else:
Module: check_mk
Branch: master
Commit: 6d5f9f682e3bb74134bee965ceb9e7dc363f42b7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6d5f9f682e3bb7…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Wed Sep 12 15:17:54 2018 +0200
agent_azure: General makeover
According to CMK-513 several changes were made.
The commandline args have been changed to allow
for a more complex configuration.
Change-Id: I603cf6ee181b47c25d365afb676406e1348f16be
---
agents/special/agent_azure | 1044 ++++++++++++++++++--------------------------
1 file changed, 415 insertions(+), 629 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=6d5f9f682e…
Module: check_mk
Branch: master
Commit: ce8f2f05e76c5487d5416d8a934cd6aab4abb09c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ce8f2f05e76c54…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Thu Sep 13 09:13:42 2018 +0200
6570 azure_sites: New Check to monitor Azure web servers
This check reports the state of monitored azure sites (i.e. web server).
You can configure levels for CPU time, average response time, and the
total count and rate of server errors (HTTP 5xx responses).
CMK-897
Change-Id: Ie41f289f809129eac4b4a144031abe32f394be8d
---
.werks/6570 | 11 ++
checkman/azure_sites | 16 ++
checks/azure.include | 183 +++++++++++++++++++++
checks/azure_sites | 68 ++++++++
cmk/gui/plugins/metrics/check_mk.py | 12 ++
cmk/gui/plugins/wato/check_parameters.py | 33 ++++
.../checks/generictests/datasets/azure_sites.py | 98 +++++++++++
7 files changed, 421 insertions(+)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=ce8f2f05e7…