Module: check_mk
Branch: master
Commit: fc854bbaaafcc8fee7f99ddca6545766c67c769a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fc854bbaaafcc8…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Feb 28 16:10:00 2014 +0100
werk 562: beautified text
---
.werks/562 | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/.werks/562 b/.werks/562
index 34ed20e..90eec45 100644
--- a/.werks/562
+++ b/.werks/562
@@ -5,15 +5,15 @@ Version: 1.2.5i1
Date: 1393598628
Class: feature
-This check allows to monitor if the guestTools version of the VM is up-to-date.<br>
+This check allows to monitor if the guest gools version of the VM is up-to-date.<br>
Possible values and states:
<ul>
-<li>"VMware Tools is installed, and the version is current" - State OK)</li>
-<li>"VMware Tools is installed, but the version is not current" - State WARN)</li>
-<li>"VMware Tools has never been installed" - State CRIT)</li>
-<li>"VMware Tools is installed, but it is not managed by VMWare" - State WARN)</li>
+<li>"VMware Tools is installed, and the version is current" - State OK</li>
+<li>"VMware Tools is installed, but the version is not current" - State WARN</li>
+<li>"VMware Tools has never been installed" - State CRIT</li>
+<li>"VMware Tools is installed, but it is not managed by VMWare" - State WARN</li>
</ul>
-The resulting state of each value can also be modified by the WATO rule
+The resulting state of each value can also be modified by the WATO rule<br>
<tt>Virtual machine guest tools status</tt>
Module: check_mk
Branch: master
Commit: 12868fd6bf6959a6ea42f0545e30eda1554cbbaf
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=12868fd6bf6959…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Feb 28 16:08:23 2014 +0100
esx_vsphere_vm.guest_tools: add missing manpage
---
checkman/esx_vsphere_vm.guest_tools | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/checkman/esx_vsphere_vm.guest_tools b/checkman/esx_vsphere_vm.guest_tools
new file mode 100644
index 0000000..ddebdde
--- /dev/null
+++ b/checkman/esx_vsphere_vm.guest_tools
@@ -0,0 +1,29 @@
+title: Virtual Machine under ESX: Guest Tools version status
+agents: vsphere
+catalog: os/ps
+license: GPL
+distribution: check_mk
+description:
+ For a virtual machine running on ESX this check reports the guest tools
+ version status (queried from vsphere agent)
+
+ This check returns:
+
+ {OK} if the guest tools version is up-to-date
+
+ {WARN} if the guest tools need an upgrade or are not managed by VMware
+
+ {CRIT} if there is no heartbeat. Guest operating system may have stopped responding.
+
+ The actual state of this check can be modified by parameters
+
+inventory:
+ On each VM one check is generated.
+
+[parameters]
+parameters (dict): A dictionary with the following keys
+{"guestToolsUnmanaged"}: 1 # default WARN
+{"guestToolsNeedUpgrade"} 1 # default WARN
+{"guestToolsCurrent"}: 0 # default OK
+{"guestToolsNotInstalled"}: 2 # default CRIT
+
Module: check_mk
Branch: master
Commit: 60cca46867973591b38812ccc914c6fa417059dd
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=60cca468679735…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Feb 28 15:49:34 2014 +0100
esx_vsphere_vm.guest_tools: new check to monitor guest tools status
This check allows to monitor if the guestTools version of the VM is up-to-date.<br>
Possible values and states:
<ul>
<li>"VMware Tools is installed, and the version is current" - State OK)</li>
<li>"VMware Tools is installed, but the version is not current" - State WARN)</li>
<li>"VMware Tools has never been installed" - State CRIT)</li>
<li>"VMware Tools is installed, but it is not managed by VMWare" - State WARN)</li>
</ul>
The resulting state of each value can also be modified by the WATO rule
<tt>Virtual machine guest tools status</tt>
---
.werks/562 | 19 +++++++++++++++
ChangeLog | 1 +
checks/esx_vsphere_vm | 43 ++++++++++++++++++++++++++++++++++
web/plugins/wato/check_parameters.py | 36 ++++++++++++++++++++++++++++
4 files changed, 99 insertions(+)
diff --git a/.werks/562 b/.werks/562
new file mode 100644
index 0000000..34ed20e
--- /dev/null
+++ b/.werks/562
@@ -0,0 +1,19 @@
+Title: esx_vsphere_vm.guest_tools: new check to monitor guest tools status
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1393598628
+Class: feature
+
+This check allows to monitor if the guestTools version of the VM is up-to-date.<br>
+Possible values and states:
+<ul>
+<li>"VMware Tools is installed, and the version is current" - State OK)</li>
+<li>"VMware Tools is installed, but the version is not current" - State WARN)</li>
+<li>"VMware Tools has never been installed" - State CRIT)</li>
+<li>"VMware Tools is installed, but it is not managed by VMWare" - State WARN)</li>
+</ul>
+
+The resulting state of each value can also be modified by the WATO rule
+<tt>Virtual machine guest tools status</tt>
+
diff --git a/ChangeLog b/ChangeLog
index e00ed5b..b273ac7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -96,6 +96,7 @@
* 0702 Rule for checking agents for wanted version...
* 0586 rmon_stats: new snmp check to gather network traffic statistics on RMON enabled network interfaces
* 0704 windows_os_bonding: new check for bonding interfaces on windows...
+ * 0562 esx_vsphere_vm.guest_tools: new check to monitor guest tools status...
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
diff --git a/checks/esx_vsphere_vm b/checks/esx_vsphere_vm
index c0a723f..6d1b7fa 100644
--- a/checks/esx_vsphere_vm
+++ b/checks/esx_vsphere_vm
@@ -117,6 +117,49 @@ check_info['esx_vsphere_vm.name'] = {
"service_description" : "ESX Name",
}
+
+#.
+# .--GuestTools----------------------------------------------------------.
+# | ____ _ _____ _ |
+# | / ___|_ _ ___ ___| ||_ _|__ ___ | |___ |
+# | | | _| | | |/ _ \/ __| __|| |/ _ \ / _ \| / __| |
+# | | |_| | |_| | __/\__ \ |_ | | (_) | (_) | \__ \ |
+# | \____|\__,_|\___||___/\__||_|\___/ \___/|_|___/ |
+# | |
+# +----------------------------------------------------------------------+
+# | |
+# '----------------------------------------------------------------------'
+
+def inventory_esx_vsphere_vm_guest_tools(info):
+ data = esx_vsphere_vm_convert(info)
+ if 'guest.toolsVersionStatus' in data:
+ return [(None, None)]
+
+def check_esx_vsphere_vm_guest_tools(_no_item, params, info):
+ data = esx_vsphere_vm_convert(info)
+
+ vm_status = data['guest.toolsVersionStatus'][0]
+
+ guest_tools_map = {
+ "guestToolsCurrent": (0, "VMware Tools is installed, and the version is current"),
+ "guestToolsNeedUpgrade": (1, "VMware Tools is installed, but the version is not current"),
+ "guestToolsNotInstalled": (2, "VMware Tools has never been installed"),
+ "guestToolsUnmanaged": (1, "VMware Tools is installed, but it is not managed by VMWare")
+ }
+ state, info = guest_tools_map.get(vm_status, (3, "Unknown status for VMware Tools"))
+
+ if params:
+ state = params.get(vm_status, state)
+
+ return state, info
+
+check_info['esx_vsphere_vm.guestTools'] = {
+ "inventory_function" : inventory_esx_vsphere_vm_guest_tools,
+ "check_function" : check_esx_vsphere_vm_guest_tools,
+ "service_description" : "ESX Guest Tools",
+ "group" : "vm_guest_tools"
+}
+
#.
# .--Heartbeat-----------------------------------------------------------.
# | _ _ _ _ _ |
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 01f766a..718cee8 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -2107,6 +2107,42 @@ register_check_parameters(
register_check_parameters(
subgroup_os,
+ "vm_guest_tools",
+ _("Virtual machine guest tools status"),
+ Dictionary(
+ optional_keys = False,
+ elements = [
+ ( "guestToolsCurrent",
+ MonitoringState(
+ title = _("VMware Tools is installed, and the version is current"),
+ default_value = 0,
+ )
+ ),
+ ( "guestToolsNeedUpgrade",
+ MonitoringState(
+ title = _("VMware Tools is installed, but the version is not current"),
+ default_value = 1,
+ )
+ ),
+ ( "guestToolsNotInstalled",
+ MonitoringState(
+ title = _("VMware Tools has never been installed"),
+ default_value = 2,
+ )
+ ),
+ ( "guestToolsUnmanaged",
+ MonitoringState(
+ title = _("VMware Tools is installed, but it is not managed by VMWare"),
+ default_value = 1,
+ )
+ ),
+ ]
+ ),
+ None,
+ "dict",
+)
+register_check_parameters(
+ subgroup_os,
"vm_heartbeat",
_("Virtual machine heartbeat status"),
Dictionary(