Module: check_mk
Branch: master
Commit: a286a8e9a2204db914f54ba2525d4eaeb17fa9ae
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a286a8e9a2204d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 8 17:09:00 2018 +0100
Active check now also get their check context
Change-Id: I6b4bf3e08d0854818f621e51bc5d4581ff5a0b81
---
cmk_base/checks.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/cmk_base/checks.py b/cmk_base/checks.py
index c83494b..f99fa80 100644
--- a/cmk_base/checks.py
+++ b/cmk_base/checks.py
@@ -145,6 +145,7 @@ def load_checks(filelist):
known_vars = check_context.keys()
known_checks = check_info.keys()
+ known_active_checks = active_check_info.keys()
load_check_includes(f, check_context)
@@ -159,11 +160,15 @@ def load_checks(filelist):
continue
new_checks = set(check_info.keys()).difference(known_checks)
+ new_active_checks = set(active_check_info.keys()).difference(known_active_checks)
# Now store the check context for all checks found in this file
for check_plugin_name in new_checks:
_check_contexts[check_plugin_name] = check_context
+ for check_plugin_name in new_active_checks:
+ _check_contexts[check_plugin_name] = check_context
+
# Collect all variables that the check file did introduce compared to the
# default check context
new_check_vars = {}
@@ -199,6 +204,7 @@ def load_checks(filelist):
# Keep track of which variable needs to be set to which context
context_ident_list = _check_variables.setdefault(varname, [])
context_ident_list += new_checks
+ context_ident_list += new_active_checks
# Now convert check_info to new format.
convert_check_info()
Module: check_mk
Branch: master
Commit: 38aaaef9a456cbed629abf75540cb9b66b52b218
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=38aaaef9a456cb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 8 13:09:53 2018 +0100
5894 FIX Fixed possible exception on service discovery page for SNMP hosts
When inline SNMP is used it might happen that the service discovery page
shows an error "Exception TypeError: "'NoneType' object is not callable" instead
of the table of services.
Change-Id: Idf81187b333a89bc75fe49d43c89f3192cda512c
---
.werks/5894 | 12 ++++++++++++
.../0013-fix-possible-TypeError-in-__del__.dif | 21 +++++++++++++++++++++
2 files changed, 33 insertions(+)
diff --git a/.werks/5894 b/.werks/5894
new file mode 100644
index 0000000..8d62749
--- /dev/null
+++ b/.werks/5894
@@ -0,0 +1,12 @@
+Title: Fixed possible exception on service discovery page for SNMP hosts
+Level: 1
+Component: inline-snmp
+Compatible: compat
+Edition: cee
+Version: 1.5.0i4
+Date: 1520510916
+Class: fix
+
+When inline SNMP is used it might happen that the service discovery page
+shows an error "Exception TypeError: "'NoneType' object is not callable" instead
+of the table of services.
diff --git a/omd/packages/net-snmp/patches/0013-fix-possible-TypeError-in-__del__.dif b/omd/packages/net-snmp/patches/0013-fix-possible-TypeError-in-__del__.dif
new file mode 100644
index 0000000..0d9b03b
--- /dev/null
+++ b/omd/packages/net-snmp/patches/0013-fix-possible-TypeError-in-__del__.dif
@@ -0,0 +1,21 @@
+diff -Nur net-snmp-734f855.orig/python/netsnmp/client.py net-snmp-734f855/python/netsnmp/client.py
+--- net-snmp-734f855.orig/python/netsnmp/client.py 2018-03-08 13:05:07.718970500 +0100
++++ net-snmp-734f855/python/netsnmp/client.py 2018-03-08 13:07:23.259098808 +0100
+@@ -202,8 +202,15 @@
+ return res
+
+ def __del__(self):
+- res = client_intf.delete_session(self)
+- return res
++ try:
++ res = client_intf.delete_session(self)
++ return res
++ except TypeError:
++ # Saw this exception:
++ # Exception TypeError: "'NoneType' object is not callable" in <bound method Session.__del__ of <netsnmp.client.Session object at 0x7f173765f890>> ignored
++ # Add the exception handler here to catch this problem.
++ pass
++
+
+ import netsnmp
+
Module: check_mk
Branch: master
Commit: 12c010a97c5006a08a5ab2d1e10e15b109489b0d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=12c010a97c5006…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 8 13:37:43 2018 +0100
5895 mgmt_ipmi_firmware: New inventory plugin to gather the IPMI board firmware version
This inventory plugin adds the path "Hardware/Management Interface" to the HW-/SW inventory
tree when using IPMI management board monitoring.
Change-Id: Ic14fd06bbebcf288f39b084aa6ec3fac297b3120
---
.werks/5895 | 11 +++++++++
inventory/mgmt_ipmi_firmware | 53 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+)
diff --git a/.werks/5895 b/.werks/5895
new file mode 100644
index 0000000..45110c5
--- /dev/null
+++ b/.werks/5895
@@ -0,0 +1,11 @@
+Title: mgmt_ipmi_firmware: New inventory plugin to gather the IPMI board firmware version
+Level: 1
+Component: inv
+Compatible: compat
+Edition: cre
+Version: 1.5.0i4
+Date: 1520512605
+Class: feature
+
+This inventory plugin adds the path "Hardware/Management Interface" to the HW-/SW inventory
+tree when using IPMI management board monitoring.
diff --git a/inventory/mgmt_ipmi_firmware b/inventory/mgmt_ipmi_firmware
new file mode 100644
index 0000000..751193d
--- /dev/null
+++ b/inventory/mgmt_ipmi_firmware
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2014 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 parse_mgmt_ipmi_firmware(info):
+ parsed = {}
+
+ if not info:
+ return parsed
+
+ for line in info:
+ if line[0] == "BMC Version" and line[1] == "version":
+ parsed["version"] = line[2]
+
+ parsed["type"] = "IPMI"
+
+ return parsed
+
+
+def inv_mgmt_ipmi_firmware(info, inventory_tree):
+ parsed = parse_mgmt_ipmi_firmware(info)
+ if not parsed:
+ return
+
+ node = inventory_tree.get_dict("hardware.management_interface.")
+ node.update(parsed)
+
+
+inv_info["mgmt_ipmi_firmware"] = {
+ "inv_function" : inv_mgmt_ipmi_firmware,
+}
Module: check_mk
Branch: master
Commit: 1ba16c69bcc647f3280771807c33919bbf9bb6f6
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1ba16c69bcc647…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Thu Mar 8 10:29:06 2018 +0100
Win-agent: add comment about different statefiles
---
agents/windows/sections/SectionEventlog.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/agents/windows/sections/SectionEventlog.cc b/agents/windows/sections/SectionEventlog.cc
index c1f88c5..04a646c 100644
--- a/agents/windows/sections/SectionEventlog.cc
+++ b/agents/windows/sections/SectionEventlog.cc
@@ -485,7 +485,10 @@ bool SectionEventlog::produceOutputInner(
handleExistingLog(out, state);
}
}
- // The offsets are persisted in a state file.
+ // The offsets are persisted in a statefile.
+ // Always use the first available statefile name. In case of a TCP/IP
+ // connection, this is the host-IP-specific statefile, and in case of
+ // non-TCP (test / debug run etc.) the general eventstate.txt.
const auto &statefile = statefiles.front();
saveEventlogOffsets(statefile, states);
}