Module: check_mk
Branch: master
Commit: 385dd2ad304c8a03dfeeb38bdd3958b970ebba62
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=385dd2ad304c8a…
Author: Andreas Umbreit <au(a)mathias-kettner.de>
Date: Tue Jan 16 08:06:12 2018 +0100
5270 Improved Agent Updater Check behaviour
Formerly, the Agent Updater Check did not update immediately after a manual action on the host. This could lead to some confusion.
Notably, you had to wait for the next update cycle to have a successful Agent registration displayed within the Check.
In order to mitigate this situation, the Agent Updater now:
- Invalidates the cache file age after registration in order to have an Update executed with next Check_MK Agent execution
- Updates the cachefile information after a successful manual update.
The latter action is not performed in --debug option mode.
Information about the cachefile updates will be displayed in -vv mode
Change-Id: I0ab67a938faebcf5abb06c6c336880b1b4710de1
---
.werks/5270 | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/.werks/5270 b/.werks/5270
new file mode 100644
index 0000000..92f52ec
--- /dev/null
+++ b/.werks/5270
@@ -0,0 +1,23 @@
+Title: Improved Agent Updater Check behaviour
+Level: 1
+Component: agents
+Compatible: compat
+Edition: cee
+Version: 1.5.0i3
+Date: 1516085347
+Class: feature
+
+Formerly, the Agent Updater Check did not update immediately after a manual action on the host. This could lead to some confusion.
+Notably, you had to wait for the next update cycle to have a successful Agent registration displayed within the Check.
+
+
+In order to mitigate this situation, the Agent Updater now:
+
+- Invalidates the cache file age after registration in order to have an Update executed with next Check_MK Agent execution
+
+- Updates the cachefile information after a successful manual update.
+
+The latter action is not performed in --debug option mode.
+
+
+Information about the cachefile updates will be displayed in -vv mode
\ No newline at end of file
Module: check_mk
Branch: master
Commit: a286003cd6c88f031ce4abeef3fb666e170fcb2e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a286003cd6c88f…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Wed Jan 17 17:38:20 2018 +0100
checktestlib: Extend docstring
Change-Id: Ie7259737305bd6e0f1cbb28bc047569a12183af8
---
tests/checks/checktestlib.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/checks/checktestlib.py b/tests/checks/checktestlib.py
index ab1aa68..3a30989 100644
--- a/tests/checks/checktestlib.py
+++ b/tests/checks/checktestlib.py
@@ -73,6 +73,14 @@ class CheckResult(object):
"""
A check result potentially consisting of multiple subresults,
as returned by yield-style checks
+
+ Initializing test results using this has the following advantages:
+ -Some basic consistency checks are being performed, making sure the
+ check's result conforms to the API
+ -A common interface to test assertions is provided, regardless of whether
+ or not the check uses subresults via the yield-API
+ -The check's code is being run, and doesn't disappear in the yield-APIs
+ generator-induced laziness.
"""
def __init__(self, result):
Module: check_mk
Branch: master
Commit: dd048d6b8a83ea3f984d90e905d931d8146b7bc8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dd048d6b8a83ea…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 17 11:57:06 2018 +0100
5651 FIX Fixed agent TCP connect timeout being used for whole communication (1.5.0i2 regression)
The configurable "Agent TCP connect timeout" was used not only for the connect phase of
the TCP connection. This lead to many timeout messages like "agent:myhost:12.16.11.42: timed out".
Change-Id: Iff28663cbc8542181844d90b05387fb701321958
---
.werks/5651 | 11 +++++++++++
cmk_base/data_sources/tcp.py | 8 ++++++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/.werks/5651 b/.werks/5651
new file mode 100644
index 0000000..9f552c2
--- /dev/null
+++ b/.werks/5651
@@ -0,0 +1,11 @@
+Title: Fixed agent TCP connect timeout being used for whole communication (1.5.0i2 regression)
+Level: 1
+Component: core
+Compatible: compat
+Edition: cre
+Version: 1.5.0i3
+Date: 1516186453
+Class: fix
+
+The configurable "Agent TCP connect timeout" was used not only for the connect phase of
+the TCP connection. This lead to many timeout messages like "agent:myhost:12.16.11.42: timed out".
diff --git a/cmk_base/data_sources/tcp.py b/cmk_base/data_sources/tcp.py
index f827855..215d58b 100644
--- a/cmk_base/data_sources/tcp.py
+++ b/cmk_base/data_sources/tcp.py
@@ -96,12 +96,16 @@ class TCPDataSource(CheckMKAgentDataSource):
s = socket.socket(socktype, socket.SOCK_STREAM)
timeout = self._get_timeout(hostname)
- s.settimeout(timeout)
output = []
- self._logger.debug("[%s] Connecting via TCP to %s:%d (%ss timeout)" % (self.id(), ipaddress, port, s.gettimeout()))
+ self._logger.debug("[%s] Connecting via TCP to %s:%d (%ss timeout)" % (self.id(), ipaddress, port, timeout))
try:
+ s.settimeout(timeout)
s.connect((ipaddress, port))
+ s.settimeout(None)
+
+ self._logger.debug("[%s] Reading data from agent" % (self.id()))
+
while True:
data = s.recv(4096, socket.MSG_WAITALL)
Module: check_mk
Branch: master
Commit: d841e8d7be97bac4693b30db6140d93f1be77d25
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d841e8d7be97ba…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Nov 23 18:41:49 2017 +0100
5447 fjdarye500_ca_ports: New checks monitor IOps and throughput of Fujitsu storage CA ports
Change-Id: Ibba38c6ffc81070dae490ddba82b1d80eb0a3944
---
.werks/5447 | 14 +++++
checkman/fjdarye500_ca_ports | 18 ++++++
checks/fjdarye500_ca_ports | 112 +++++++++++++++++++++++++++++++++++
web/plugins/wato/check_parameters.py | 23 +++++++
4 files changed, 167 insertions(+)
diff --git a/.werks/5447 b/.werks/5447
new file mode 100644
index 0000000..e850e17
--- /dev/null
+++ b/.werks/5447
@@ -0,0 +1,14 @@
+Title: fjdarye500_ca_ports: New checks monitor IO and throughput of Fujitsu storage CA ports
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i2
+Date: 1511458802
+Class: feature
+
+By default CA ports in mode 'CA' and 'CARA' are discovered.
+Moreover port indices can be configured in the related
+discovery rule 'Discovery of Fujtsu storage CA ports'.
+There are no hints in the SNMP data which ports are active
+thus the above rule may be useful.
diff --git a/checkman/fjdarye500_ca_ports b/checkman/fjdarye500_ca_ports
new file mode 100644
index 0000000..eec18ea
--- /dev/null
+++ b/checkman/fjdarye500_ca_ports
@@ -0,0 +1,18 @@
+title: Fujitsu storage systems: CA ports
+agents: snmp
+catalog: hw/storagehw/fujitsu
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the CA ports of Fujitsu storage systems
+ which support the FJDARY-E150-SNMPV2.MIB like the ETERNUS DX500 S3.
+
+ In the discovery rule 'Discovery of Fujtsu storage CA ports'
+ port indices and port modes are configurable.
+ By default CA ports in mode 'CA' and 'CARA' are discovered.
+
+item:
+ The CA port index.
+
+inventory:
+ One service per port is created.
diff --git a/checks/fjdarye500_ca_ports b/checks/fjdarye500_ca_ports
new file mode 100644
index 0000000..b1edaef
--- /dev/null
+++ b/checks/fjdarye500_ca_ports
@@ -0,0 +1,112 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2017 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.
+
+
+inventory_fujitsu_ca_ports = []
+
+
+def parse_fjdarye500_ca_ports(info):
+ map_modes = {
+ "11": "CA",
+ "12": "RA",
+ "13": "CARA",
+ "20": "Initiator",
+ }
+
+ parsed = {}
+ for index, mode, read_iops, write_iops, read_mb, write_mb in info:
+ mode_readable = map_modes[mode]
+ port = parsed.setdefault(index, {
+ "mode": mode_readable,
+ "read_ios": int(read_iops),
+ "read_throughput": int(read_mb) * 1024**2,
+ })
+ if mode_readable != "Initiator":
+ port.update({
+ "write_ios": int(write_iops),
+ "write_throughput": int(write_mb) * 1024**2,
+ })
+ return parsed
+
+
+def inventory_fjdarye500_ca_ports(parsed):
+ settings = host_extra_conf_merged(host_name(), inventory_fujitsu_ca_ports)
+ indices = settings.get('indices')
+ modes = settings.get('modes', ['CA', 'CARA'])
+ for index, attrs in parsed.iteritems():
+ if indices and index not in indices:
+ continue
+ if modes and attrs['mode'] not in modes:
+ continue
+ yield index, {}
+
+
+def check_fjdarye500_ca_ports(item, params, parsed):
+ if item in parsed:
+ mode = parsed[item]["mode"]
+ yield 0, "Mode: %s" % mode
+ for state, infotext, perfdata in check_diskstat_dict(item, params, parsed):
+ if infotext and "Read: " in infotext and mode in ["CARA", "Initiator"]:
+ infotext.replace("Read: ", "Initiator: ")
+ if infotext and "Write: " in infotext and mode == "CARA":
+ infotext.replace("Write: ", "Target: ")
+ yield state, infotext, perfdata
+
+
+check_info['fjdarye500_ca_ports'] = {
+ 'parse_function' : parse_fjdarye500_ca_ports,
+ 'inventory_function' : inventory_fjdarye500_ca_ports,
+ 'check_function' : check_fjdarye500_ca_ports,
+ 'service_description' : 'CA Port IO %s',
+ 'snmp_info' : ('.1.3.6.1.4.1.211.1.21.1.150.5.5.2.1', [
+ # fjdaryPfCaPortRdIOPS
+ # "This shows the READ IOPS for the CA,CARA mode.
+ # The Initiator IOPS is shown for RA,Initiator mode."
+ # fjdaryPfCaPortWtIOPS
+ # "This shows the WRITE IOPS for the CA,CARA mode.
+ # The Target IOPS is shown for the RA mode.
+ # This information is an invalid value for the Initiator mode."
+ # fjdaryPfCaPortRdTp
+ # "This shows the amount of the READ Throughput for the CA,CARA mode.
+ # The Initiator Throughput is shown for RA,Initiator mode.
+ # The unit is MB/sec."
+ # fjdaryPfCaPortWtTp
+ # "This shows the amount of the WRITE Throughput for the CA,CARA mode.
+ # The Target Throughput is shown for the RA mode.
+ # The unit is MB/sec.
+ # This information is an invalid value for the Initiator mode."
+ '1', # FJDARY-E150::fjdaryPfCaPortIndex
+ '2', # FJDARY-E150::fjdaryPfCaPortMode
+ '3', # FJDARY-E150::fjdaryPfCaPortRdIOPS
+ '4', # FJDARY-E150::fjdaryPfCaPortWtIOPS
+ '5', # FJDARY-E150::fjdaryPfCaPortRdTp
+ '6', # FJDARY-E150::fjdaryPfCaPortWtTp
+ ]),
+ 'snmp_scan_function' : lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.211.1.21.1.150",
+ 'has_perfdata' : True,
+ 'group' : 'diskstat',
+ 'includes' : ['diskstat.include']
+}
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index d9557a8..df192cf 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -1588,6 +1588,29 @@ register_rule(group + '/' + subgroup_inventory,
match = "dict",
)
+register_rule(
+ "%s/%s" % (group, subgroup_inventory),
+ varname="inventory_fujitsu_ca_ports",
+ title=_("Discovery of Fujtsu storage CA ports"),
+ valuespec=Dictionary(
+ elements=[
+ ("indices", ListOfStrings(title=_("CA port indices"))),
+ ("modes", DualListChoice(
+ title=_("CA port modes"),
+ choices=[
+ ("CA", _("CA")),
+ ("RA", _("RA")),
+ ("CARA", _("CARA")),
+ ("Initiator", _("Initiator")),
+ ],
+ row=4,
+ size=30,
+ )),
+ ],
+ ),
+ match="dict",
+)
+
#.
# .--Applications--------------------------------------------------------.
# | _ _ _ _ _ |