Module: check_mk
Branch: master
Commit: 8e43ff99b18a69c18d7865f201ad77ad05ddd405
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8e43ff99b18a69…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 7 15:46:08 2016 +0100
3979 FIX vbox_guest: Only try to fetch VBox state in case the vboxguest module is loaded
---
.werks/3979 | 10 ++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/3979 b/.werks/3979
new file mode 100644
index 0000000..66eb8f4
--- /dev/null
+++ b/.werks/3979
@@ -0,0 +1,10 @@
+Title: vbox_guest: Only try to fetch VBox state in case the vboxguest module is loaded
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i2
+Date: 1478529917
+
+
diff --git a/ChangeLog b/ChangeLog
index 928b21d..0cf96ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -52,6 +52,7 @@
* 3987 FIX: Check_MK Agent Access: Windows agent reported incorrect only from value
* 3952 FIX: diskstat: fixed bug if multipath devices having an alias...
* 3939 FIX: f5_bigip_conns: readded performance data and graphs...
+ * 3979 FIX: vbox_guest: Only try to fetch VBox state in case the vboxguest module is
loaded
Multisite:
* 3959 Two new filters for the comment view: author and comment text field
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 0e8fcbb..1caba17 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -518,7 +518,7 @@ fi
# check would not be executed in case no guest additions are installed.
# And that is something the check wants to detect
echo '<<<vbox_guest>>>'
-if type VBoxControl >/dev/null 2>&1 ; then
+if type VBoxControl >/dev/null 2>&1 && lsmod | grep vboxguest
>/dev/null 2>&1; then
VBoxControl -nologo guestproperty enumerate | cut -d, -f1,2
[ ${PIPESTATUS[0]} = 0 ] || echo "ERROR"
fi