Module: check_mk
Branch: master
Commit: 60681f06f33495548fd64a6efcb7bbb032b16bfc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=60681f06f33495…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Apr 6 14:48:22 2018 +0200
5953 lnx_thermal: Disabled in docker container contexts
These checks do not make sense in the context of a docker container.
The agent is now skipping this section when executed in a container.
Change-Id: Iec55097fb4b4a762e56d1ee8108655f68f13c634
---
.werks/5953 | 11 +++++++++++
agents/check_mk_agent.linux | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/5953 b/.werks/5953
new file mode 100644
index 0000000..feafebf
--- /dev/null
+++ b/.werks/5953
@@ -0,0 +1,11 @@
+Title: lnx_thermal: Disabled in docker container contexts
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i4
+Date: 1523018887
+Class: feature
+
+These checks do not make sense in the context of a docker container.
+The agent is now skipping this section when executed in a container.
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 15d3f6e..d99c53e 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -922,7 +922,7 @@ fi
# Gather thermal information provided e.g. by acpi
# At the moment only supporting thermal sensors
-if ls /sys/class/thermal/thermal_zone* >/dev/null 2>&1; then
+if [ -z "$MK_IN_CONTAINER" ] && ls /sys/class/thermal/thermal_zone*
>/dev/null 2>&1; then
echo '<<<lnx_thermal>>>'
for F in /sys/class/thermal/thermal_zone*; do
echo -n "${F##*/} "