Module: check_mk
Branch: master
Commit: 36519864874251eb05ec80617f092461aa1fb1c8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=36519864874251…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Aug 28 16:53:32 2018 +0200
6500 FIX Fixed config generation for shadow hosts/services
The Check_MK Micro Core configuration generated by "cmk -U", "cmk -O", or
"cmk -R" was broken for shadow hosts/services, leading to CMC crashes later
when the core tried to use such a configuration. This was a regression
since 1.5.0i1 and has been fixed now.
Change-Id: I2f8d468da2f17021b6151e3f1a725befb03f108b
---
.werks/6500 | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/.werks/6500 b/.werks/6500
new file mode 100644
index 0000000..07adbb4
--- /dev/null
+++ b/.werks/6500
@@ -0,0 +1,14 @@
+Title: Fixed config generation for shadow hosts/services
+Level: 2
+Component: config
+Class: fix
+Compatible: compat
+Edition: cee
+State: unknown
+Version: 1.6.0i1
+Date: 1535467796
+
+The Check_MK Micro Core configuration generated by "cmk -U", "cmk -O", or
+"cmk -R" was broken for shadow hosts/services, leading to CMC crashes later
+when the core tried to use such a configuration. This was a regression
+since 1.5.0i1 and has been fixed now.
Module: check_mk
Branch: master
Commit: 7c9884423203b74aeb37294a94eba4974ea9f5d3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7c9884423203b7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Aug 28 17:58:29 2018 +0200
6458 FIX IPMI Management board: Use USER privilege level for monitoring
Previous versions used the ADMIN privilege level for monitoring via IPMI which
is way too much for this read-only access which is needed by Check_MK for
monitoring.
When you tried to use a non ADMIN privileged user before, an error like this occured:
ERROR: Requested privilege level is not allowed over this channel while
requesting privelege level 3 for [user]
You can now use less privileged users for monitoring.
FEED-931
Change-Id: I90e5edc5baee579ba287ab9bea51799e3658c305
---
.werks/6458 | 20 +++++
Pipfile | 5 +-
Pipfile.lock | 85 +++++++++++----------
cmk_base/data_sources/ipmi.py | 3 +-
omd/packages/python-modules/Makefile | 2 +-
.../python-modules/src/pyghmi-1.1.0.tar.gz | Bin 146145 -> 0 bytes
.../python-modules/src/pyghmi-1.2.14.tar.gz | Bin 0 -> 150078 bytes
7 files changed, 71 insertions(+), 44 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=7c98844232…
Module: check_mk
Branch: master
Commit: daede5c8f149bde65051d9633abab664b4c5fe41
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=daede5c8f149bd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Aug 28 16:02:03 2018 +0200
6457 FIX IPMI Management board: Improved error handling when sensors can not be read
When the IPMI sensors can not be read because of an incompatible device, the
error is now handled more gracefully. The other IPMI data, like firmware information,
is fetched even when the sensors can not be read and the exceptions are visible on
the command line when executing e.g. cmk -vd [hostname] or cmk -vvd [hostname].
FEED-931
Change-Id: Id67ab4e70749a6ce8d9f6b71877b0238eaaaf472
---
.werks/6457 | 14 ++++++++++++++
cmk_base/data_sources/ipmi.py | 13 +++++++++++--
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/.werks/6457 b/.werks/6457
new file mode 100644
index 0000000..d40d4ff
--- /dev/null
+++ b/.werks/6457
@@ -0,0 +1,14 @@
+Title: IPMI Management board: Improved error handling when sensors can not be read
+Level: 1
+Component: core
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1535464665
+
+When the IPMI sensors can not be read because of an incompatible device, the
+error is now handled more gracefully. The other IPMI data, like firmware information,
+is fetched even when the sensors can not be read and the exceptions are visible on
+the command line when executing e.g. cmk -vd [hostname] or cmk -vvd [hostname].
diff --git a/cmk_base/data_sources/ipmi.py b/cmk_base/data_sources/ipmi.py
index 2ebfee3..c3a1b29 100644
--- a/cmk_base/data_sources/ipmi.py
+++ b/cmk_base/data_sources/ipmi.py
@@ -78,7 +78,7 @@ class IPMIManagementBoardDataSource(ManagementBoardDataSource, CheckMKAgentDataS
# Improve bad exceptions thrown by pyghmi e.g. in case of connection issues
if type(e) == IpmiException and "%s" % e == "None":
- raise MKAgentError("IPMI communication failed")
+ raise MKAgentError("IPMI communication failed: %r" % e)
else:
raise
@@ -88,6 +88,8 @@ class IPMIManagementBoardDataSource(ManagementBoardDataSource, CheckMKAgentDataS
# address instead
credentials = self._credentials
+ self._logger.debug("Connecting to %s:623 (User: %s, Privlevel: 2)" %
+ (self._ipaddress, credentials["username"]))
return ipmi_cmd.Command(bmc=self._ipaddress,
userid=credentials["username"],
password=credentials["password"])
@@ -95,7 +97,14 @@ class IPMIManagementBoardDataSource(ManagementBoardDataSource, CheckMKAgentDataS
def _fetch_ipmi_sensors_section(self, connection):
self._logger.debug("Fetching sensor data via UDP from %s:623" % (self._ipaddress))
- sdr = ipmi_sdr.SDR(connection)
+
+ try:
+ sdr = ipmi_sdr.SDR(connection)
+ except NotImplementedError, e:
+ self._logger.verbose("Failed to fetch sensor data: %r" % e)
+ self._logger.debug("Exception", exc_info=e)
+ return ""
+
sensors = []
for number in sdr.get_sensor_numbers():
rsp = connection.raw_command(command=0x2d, netfn=4, data=(number,))