Module: check_mk
Branch: master
Commit: 6c4182eb858a05e677ab110c122f6ae51dfc0c23
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6c4182eb858a05…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Wed Jun 20 12:57:54 2018 +0200
Add class for basic sanity check of item state 2-tuple
Change-Id: I0c858bf0b7899c9acbc123bee89e372f6ad6687c
---
tests/unit/checks/checktestlib.py | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/tests/unit/checks/checktestlib.py b/tests/unit/checks/checktestlib.py
index 7370b1e..98bfafc 100644
--- a/tests/unit/checks/checktestlib.py
+++ b/tests/unit/checks/checktestlib.py
@@ -241,3 +241,24 @@ def assertDiscoveryResultsEqual(actual, expected):
assert enta == ente, "%r != %r" % (enta, ente)
+class BasicItemState(object):
+ """Item state as returned by get_item_state
+
+ We assert that we have exactly two values,
+ where the first one is either float or int.
+ """
+ def __init__(self, *args):
+ if len(args) == 1:
+ args = args[0]
+ msg = "BasicItemStates expected 2-tuple (time_diff, value) - not %r"
+ assert isinstance(args, tuple), msg % args
+ assert len(args) == 2, msg % args
+ self.time_diff, self.value = args
+
+ time_diff_type = type(self.time_diff)
+ msg = "time_diff should be of type float/int - not %r"
+ assert time_diff_type in (float, int), msg % time_diff_type
+ # We do allow negative time diffs.
+ # We want to ba able to test time anomalies.
+
+
Module: check_mk
Branch: master
Commit: 13e76f7098c0d1dc5a013c0ab0937f23d12cc6da
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=13e76f7098c0d1…
Author: Andreas Umbreit <au(a)mathias-kettner.de>
Date: Mon Jun 18 15:14:45 2018 +0200
CMK-555: Add Werk 5499
Change-Id: Ic328d7b0a5994bba1c9ff86b884f5ae60f6780ba
---
.werks/5499 | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/.werks/5499 b/.werks/5499
new file mode 100644
index 0000000..10cc50a
--- /dev/null
+++ b/.werks/5499
@@ -0,0 +1,13 @@
+Title: Implicit default values for agent updater config
+Level: 1
+Component: agents
+Class: fix
+Compatible: compat
+Edition: cee
+State: unknown
+Version: 1.6.0i1
+Date: 1529483996
+
+Some fields, namely the update interval and the proxy configuration (new since 1.5) are optional within the agent updater plugin configuration.
+With this werk, a default value of 3600 seconds for the interval and a default behavior of "ignore proxy settings" is assumed in the case that these fields are not set by the user.
+This matches the behavior of previous Check_MK releases.
\ No newline at end of file
Module: check_mk
Branch: master
Commit: 3045c8c1c098a42b7deaba2d8700bb4f1cf6f275
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3045c8c1c098a4…
Author: Andreas <ab(a)mathias-kettner.de>
Date: Thu Jun 21 15:49:08 2018 +0200
6234 FIX SLA computing: added some bugfixes relating to special timeperiods
The computation failed when a configured timeperiod did not have a single match within the queried timerange.
This only happened with specifically set, non recurring, timeperiods, e.g. <tt>'2002-03-30': [('00:00', '24:00')]</tt>.
Change-Id: I3101de291ab007d8187e760148d4234fc626619d
---
.werks/6234 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/.werks/6234 b/.werks/6234
new file mode 100644
index 0000000..6b4fd3e
--- /dev/null
+++ b/.werks/6234
@@ -0,0 +1,12 @@
+Title: SLA computing: added some bugfixes relating to special timeperiods
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1529588289
+
+The computation failed when a configured timeperiod did not have a single match within the queried timerange.
+This only happened with specifically set, non recurring, timeperiods, e.g. <tt>'2002-03-30': [('00:00', '24:00')]</tt>.
Module: check_mk
Branch: master
Commit: 9a315c357b7d377e4691fd812a1e53fc6e58f5c0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9a315c357b7d37…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Tue Jun 5 14:01:45 2018 +0200
6200 Status of Quantum Storage Devices
quantum_storage_status: Create a service to monitor the operating state of
a Quantum Storage Device.
The states can be mapped to the desired monitoring status via the rule
"Quantum Storage Status".
snmp_quantum_storage_info: Add manufacturer, model and serial number to
HW/SW inventory.
Change-Id: I74b18888b10c3b22b9ad176a550883b7393345f0
---
.werks/6200 | 16 +++++++++
checkman/quantum_storage_status | 12 +++++++
checks/quantum_storage_status | 69 ++++++++++++++++++++++++++++++++++++
inventory/snmp_quantum_storage_info | 48 +++++++++++++++++++++++++
web/plugins/wato/check_parameters.py | 32 +++++++++++++++++
5 files changed, 177 insertions(+)
diff --git a/.werks/6200 b/.werks/6200
new file mode 100644
index 0000000..d09e69b
--- /dev/null
+++ b/.werks/6200
@@ -0,0 +1,16 @@
+Title: Status of Quantum Storage Devices
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1528199794
+Class: feature
+
+quantum_storage_status: Create a service to monitor the operating state of
+a Quantum Storage Device.
+The states can be mapped to the desired monitoring status via the rule
+"Quantum Storage Status".
+snmp_quantum_storage_info: Add manufacturer, model and serial number to
+HW/SW inventory.
+
diff --git a/checkman/quantum_storage_status b/checkman/quantum_storage_status
new file mode 100644
index 0000000..bccb275
--- /dev/null
+++ b/checkman/quantum_storage_status
@@ -0,0 +1,12 @@
+title: Status of Quantum Storage Devices
+agents: snmp
+catalog: hw/storagehw/quantum
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the state variables of Quantum Storage Devices.
+ The states can be mapped to the desired monitoring status via the
+ rule "Quantum Storage Status".
+
+inventory:
+ One service is created.
diff --git a/checks/quantum_storage_status b/checks/quantum_storage_status
new file mode 100644
index 0000000..7aa81bd
--- /dev/null
+++ b/checks/quantum_storage_status
@@ -0,0 +1,69 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2018 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# tails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+
+factory_settings["quantum_storage_status"] = {
+ 'map_states': {'unavailable': 2,
+ 'available': 0,
+ 'online': 0,
+ 'offline': 2,
+ 'going online': 1,
+ 'state not available': 3,
+ },
+}
+
+
+quantum_device_state = {'1': 'unavailable',
+ '2': 'available',
+ '3': 'online',
+ '4': 'offline',
+ '5': 'going online',
+ '6': 'state not available',
+ }
+
+
+def inventory_quantum_storage_status(info):
+ return [ (None, None) ]
+
+
+def check_quantum_storage_status(_no_item, params, info):
+ state_txt = quantum_device_state.get(info[0][0])
+ status = params['map_states'].get(state_txt, 3)
+ return status, "Device state: %s" % state_txt
+
+
+check_info['quantum_storage_status'] = {
+ "check_function" : check_quantum_storage_status,
+ "inventory_function" : inventory_quantum_storage_status,
+ "service_description" : "Device status",
+ "group" : "quantum_storage_status",
+ "default_levels_variable" : "quantum_storage_status",
+ "snmp_info" : (".1.3.6.1.4.1.2036.2.1.1", [ # qSystemInfo
+ "7", # qState
+ ]),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.4.1.2036.2.1.1.7.0"),
+}
+
diff --git a/inventory/snmp_quantum_storage_info b/inventory/snmp_quantum_storage_info
new file mode 100644
index 0000000..788b1eb
--- /dev/null
+++ b/inventory/snmp_quantum_storage_info
@@ -0,0 +1,48 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2018 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# tails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+
+def inv_snmp_quantum_storage_info(info, inventory_tree):
+
+ manufacturer, product, revision, serial = info[0]
+
+ node = inventory_tree.get_dict("hardware.system.")
+ node["manufacturer"] = manufacturer
+ node["product"] = product
+ node["revision"] = revision
+ node["serial"] = serial
+
+
+inv_info['snmp_quantum_storage_info'] = {
+ 'inv_function' : inv_snmp_quantum_storage_info,
+ 'snmp_info' : ('.1.3.6.1.4.1.2036.2.1.1', [ # qSystemInfo
+ "4", # 0 1 qVendorID
+ "5", # 0 2 qProdId
+ "6", # 0 3 qProdRev
+ "12", # 0 4 qSerialNumber
+ ]),
+ 'snmp_scan_function' : lambda oid: oid('.1.3.6.1.4.1.2036.2.1.1.4.0'),
+}
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 923e331..581f854 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -5948,6 +5948,38 @@ register_check_parameters(
"dict",
)
+
+register_check_parameters(
+ subgroup_storage,
+ "quantum_storage_status",
+ _("Quantum Storage Status"),
+ Dictionary(
+ elements = [
+ ("map_states", Dictionary(
+ elements = [
+ ("unavailable", MonitoringState(title=_("Device unavailable"),
+ default_value=2)),
+ ("available", MonitoringState(title=_("Device available"),
+ default_value=0)),
+ ("online", MonitoringState(title=_("Device online"),
+ default_value=0)),
+ ("offline", MonitoringState(title=_("Device offline"),
+ default_value=2)),
+ ("going online", MonitoringState(title=_("Device going online"),
+ default_value=1)),
+ ("state not available", MonitoringState(title=_("Device state not available"),
+ default_value=3)),
+ ],
+ title = _('Map Device States'),
+ optional_keys = [],
+ )),
+ ]
+ ),
+ None,
+ "dict",
+)
+
+
register_check_parameters(
subgroup_environment,
"apc_system_events",
Module: check_mk
Branch: master
Commit: 27b6db206a7d95cc874c97a8ff7f929b3602644a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=27b6db206a7d95…
Author: Andreas Umbreit <au(a)mathias-kettner.de>
Date: Wed Jun 20 16:14:37 2018 +0200
CMK-551: Add Werk 5501
5501 FIX cmk-update-agent: Fix mistaken server response for Windows Agent Updater
Due to a bug in the handling of the Check_MK server response, a valid downloaded MSI-packaged agent updater can be mistaken as a "login failed" response.
Instead of updating the Windows Agent, the agent updater would display the error message "ERROR: Cannot authenticate, invalid user/passwort/secret." and abort.
In order to restore funtionality to the Agent Updater, please uninstall the Windows Agent on the affected hosts and reinstall with a newly baked MSI-package.
Change-Id: Ie734265f21edf8190b0115effb61a40449095892
---
.werks/5501 | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/.werks/5501 b/.werks/5501
new file mode 100644
index 0000000..b049cf8
--- /dev/null
+++ b/.werks/5501
@@ -0,0 +1,15 @@
+Title: cmk-update-agent: Fix mistaken server response for Windows Agent Updater
+Level: 1
+Component: agents
+Class: fix
+Compatible: compat
+Edition: cee
+State: unknown
+Version: 1.6.0i1
+Date: 1528895946
+
+Due to a bug in the handling of the Check_MK server response, a valid downloaded MSI-packaged agent updater can be mistaken as a "login failed" response.
+
+Instead of updating the Windows Agent, the agent updater would display the error message "ERROR: Cannot authenticate, invalid user/passwort/secret." and abort.
+
+In order to restore funtionality to the Agent Updater, please uninstall the Windows Agent on the affected hosts and reinstall with a newly baked MSI-package.