Module: check_mk
Branch: master
Commit: 101d5cc203df4fb9f91b3b9b40d85e956530bb8b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=101d5cc203df4f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 1 09:17:42 2019 +0100
7080 FIX Management board: Continue when firmware information can not be fetched
The management board monitoring currently tries to fetch two types of information
from the boards: Sensor states and information about the firmware version. In
case the later could not be fetched the processing of the management board data
was terminated. This has now been changed to continue with the data that could
be fetched.
Change-Id: I26e268e695f87fa867c98aa89659f9f481c433eb
---
.werks/7080 | 15 +++++++++++++++
cmk_base/data_sources/ipmi.py | 8 +++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/.werks/7080 b/.werks/7080
new file mode 100644
index 0000000..b5731ef
--- /dev/null
+++ b/.werks/7080
@@ -0,0 +1,15 @@
+Title: Management board: Continue when firmware information can not be fetched
+Level: 1
+Component: core
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1549008780
+
+The management board monitoring currently tries to fetch two types of information
+from the boards: Sensor states and information about the firmware version. In
+case the later could not be fetched the processing of the management board data
+was terminated. This has now been changed to continue with the data that could
+be fetched.
diff --git a/cmk_base/data_sources/ipmi.py b/cmk_base/data_sources/ipmi.py
index 12cd5f7..f060c30 100644
--- a/cmk_base/data_sources/ipmi.py
+++ b/cmk_base/data_sources/ipmi.py
@@ -177,9 +177,15 @@ class IPMIManagementBoardDataSource(ManagementBoardDataSource, CheckMKAgentDataS
def _fetch_ipmi_firmware_section(self, connection):
self._logger.debug("Fetching firmware information via UDP from %s:623" % (self._ipaddress))
+ try:
+ firmware_entries = connection.get_firmware()
+ except Exception as e:
+ self._logger.verbose("Failed to fetch firmware information: %r" % e)
+ self._logger.debug("Exception", exc_info=True)
+ return ""
output = "<<<mgmt_ipmi_firmware:sep(124)>>>\n"
- for entity_name, attributes in connection.get_firmware():
+ for entity_name, attributes in firmware_entries:
for attribute_name, value in attributes.items():
output += "%s|%s|%s\n" % (entity_name, attribute_name, value)
Module: check_mk
Branch: master
Commit: d64433fafba9473facd0cc37d93951adcb0dcb53
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d64433fafba947…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Thu Jan 31 11:05:14 2019 +0100
k8s_nodes: add WATO rule, move node names to inventory
Adapt the k8s_nodes check to only show the total number
of nodes. Upper and lower levels for the number of nodes
can now be defined via WATO. The names of the nodes that
were shown previously in the check are now listed in the
HW/SW Inventory.
Change-Id: Iba367fcab511ca416ba3d2e82ec3c4196b5466a0
---
checkman/k8s_nodes | 2 +-
checks/k8s_nodes | 16 ++++--
cmk/gui/plugins/views/inventory.py | 9 +++-
cmk/gui/plugins/wato/check_parameters/k8s_nodes.py | 62 ++++++++++++++++++++++
inventory/k8s_nodes | 39 ++++++++++++++
tests/unit/cmk/gui/test_views.py | 8 +++
tests/unit/cmk/gui/watolib/test_rulespecs.py | 32 +++++++++++
7 files changed, 162 insertions(+), 6 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=d64433fafb…
Module: check_mk
Branch: master
Commit: a8bf7362eea66531eb4d1cd6232041de4f7fd54a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a8bf7362eea665…
Author: Andreas Umbreit <au(a)mathias-kettner.de>
Date: Thu Jan 31 11:52:32 2019 +0100
6940 FIX Fix OnlyFrom entry in check_mk agent section
Previously, the OnlyFrom entry, that represents the list of
only-from IP entries within the xinetd-configuration,
rendered empty for baked agents.
The cause for this was that the agent was looking for
the service name "check_mk", that only is used by the
raw agent.
The agent is now looking for the right service name set
from the agent bakery, i.e. "check-mk-agent" or a user-specified
name coming from the "name of agent packages" rule.
(Jira: CMK-1540)
Change-Id: I590c7d9f8914923c6e5b3bb12bcab82ed80599f8
---
.werks/6940 | 20 ++++++++++++++++++++
agents/check_mk_agent.linux | 6 +++++-
agents/check_mk_agent.openwrt | 6 +++++-
doc/treasures/agents/check_mk_agent.busybox | 6 +++++-
4 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/.werks/6940 b/.werks/6940
new file mode 100644
index 0000000..dedbd08
--- /dev/null
+++ b/.werks/6940
@@ -0,0 +1,20 @@
+Title: Fix OnlyFrom entry in check_mk agent section
+Level: 1
+Component: agents
+Compatible: compat
+Edition: cee
+Version: 1.6.0i1
+Date: 1548937503
+Class: fix
+
+Previously, the OnlyFrom entry, that represents the list of
+only-from IP entries within the xinetd-configuration,
+rendered empty for baked agents.
+
+The cause for this was that the agent was looking for
+the service name "check_mk", that only is used by the
+raw agent.
+
+The agent is now looking for the right service name set
+from the agent bakery, i.e. "check-mk-agent" or a user-specified
+name coming from the "name of agent packages" rule.
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index cb8ce67..f0fc7f4 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -43,6 +43,10 @@ elif [ "$SSH_CLIENT" ] ; then
export REMOTE=${SSH_CLIENT%% *}
fi
+# The package name gets patched for baked agents to either
+# "check-mk-agent" or the name set by the "name of agent packages" rule
+XINETD_SERVICE_NAME=check_mk
+
# Make sure, locally installed binaries are found
PATH=$PATH:/usr/local/bin
@@ -369,7 +373,7 @@ echo "LocalDirectory: $LOCALDIR"
if [ -n "$REMOTE_HOST" ]
then
echo -n 'OnlyFrom: '
- sed -n '/^service[[:space:]]*check_mk/,/}/s/^[[:space:]]*only_from[[:space:]]*=[[:space:]]*\(.*\)/\1/p' /etc/xinetd.d/* | head -n1; echo
+ sed -n '/^service[[:space:]]*'$XINETD_SERVICE_NAME'/,/}/s/^[[:space:]]*only_from[[:space:]]*=[[:space:]]*\(.*\)/\1/p' /etc/xinetd.d/* | head -n1; echo
fi
section_df
diff --git a/agents/check_mk_agent.openwrt b/agents/check_mk_agent.openwrt
index 71d6381..6661bf5 100755
--- a/agents/check_mk_agent.openwrt
+++ b/agents/check_mk_agent.openwrt
@@ -35,6 +35,10 @@ export MK_VARDIR="/var/lib/check_mk_agent"
# Optionally set a tempdir for all subsequent calls
#export TMPDIR=
+# The package name gets patched for baked agents to either
+# "check-mk-agent" or the name set by the "name of agent packages" rule
+XINETD_SERVICE_NAME=check_mk
+
# Provide information about the remote host. That helps when data
# is being sent only once to each remote host.
if [ "$REMOTE_HOST" ] ; then
@@ -237,7 +241,7 @@ echo "LocalDirectory: $LOCALDIR"
if [ -n "$REMOTE_HOST" ]
then
echo -n 'OnlyFrom: '
- echo $(sed -n '/^service[[:space:]]*check_mk/,/}/s/^[[:space:]]*only_from[[:space:]]*=[[:space:]]*\(.*\)/\1/p' /etc/xinetd.d/* | head -n1)
+ echo $(sed -n '/^service[[:space:]]*'$XINETD_SERVICE_NAME'/,/}/s/^[[:space:]]*only_from[[:space:]]*=[[:space:]]*\(.*\)/\1/p' /etc/xinetd.d/* | head -n1)
fi
# Print out Partitions / Filesystems. (-P gives non-wrapped POSIXed output)
diff --git a/doc/treasures/agents/check_mk_agent.busybox b/doc/treasures/agents/check_mk_agent.busybox
index 5980faf..596f6c2 100644
--- a/doc/treasures/agents/check_mk_agent.busybox
+++ b/doc/treasures/agents/check_mk_agent.busybox
@@ -34,6 +34,10 @@ export MK_LIBDIR="/usr/lib/check_mk_agent"
export MK_CONFDIR="/etc/check_mk"
export MK_VARDIR="/var/lib/check_mk_agent"
+# The package name gets patched for baked agents to either
+# "check-mk-agent" or the name set by the "name of agent packages" rule
+XINETD_SERVICE_NAME=check_mk
+
# Provide information about the remote host. That helps when data
# is being sent only once to each remote host.
if [ "$REMOTE_HOST" ] ; then
@@ -98,7 +102,7 @@ echo LocalDirectory: $LOCALDIR
if [ -n "$REMOTE_HOST" ]
then
echo -n 'OnlyFrom: '
- echo $(sed -n '/^service[[:space:]]*check_mk/,/}/s/^[[:space:]]*only_from[[:space:]]*=[[:space:]]*\(.*\)/\1/p' /etc/xinetd.d/* | head -n1)
+ echo $(sed -n '/^service[[:space:]]*'$XINETD_SERVICE_NAME'/,/}/s/^[[:space:]]*only_from[[:space:]]*=[[:space:]]*\(.*\)/\1/p' /etc/xinetd.d/* | head -n1)
fi
# Print out Partitions / Filesystems. (-P gives non-wrapped POSIXed output)