Module: check_mk
Branch: master
Commit: be06290af8c3292aafa17972588bb6cf682a4660
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=be06290af8c329…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Thu Oct 12 11:37:22 2017 +0200
5341 agent_vsphere: change of the option "Display VM power state on"
The option "Display VM power state on" of the WATO rule now displays
the power state of VMs <i>additionally</i> on either the ESX host or
the VM. The option is therefore renamed to "Display power state
additionally on". This will result in services for <i>both</i> the
queried system and the ESX host / VM. By disabling the unwanted
services it is then possible to configure where the corresponding
services are displayed. Because the data is now still available on
the queried system the service "Object count" will now display the
correct count when the option is used.
Change-Id: I89172eaa9384a7ef0436a1084ce812ae9cdd2d07
---
.werks/5341 | 18 ++++++++++++++++++
agents/special/agent_vsphere | 6 ++----
web/plugins/wato/datasource_programs.py | 8 +++++++-
3 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/.werks/5341 b/.werks/5341
new file mode 100644
index 0000000..d4e6821
--- /dev/null
+++ b/.werks/5341
@@ -0,0 +1,18 @@
+Title: agent_vsphere: change of the option "Display VM power state on"
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1507799865
+Class: feature
+
+The option "Display VM power state on" of the WATO rule now displays
+the power state of VMs <i>additionally</i> on either the ESX host or
+the VM. The option is therefore renamed to "Display power state
+additionally on". This will result in services for <i>both</i> the
+queried system and the ESX host / VM. By disabling the unwanted
+services it is then possible to configure where the corresponding
+services are displayed. Because the data is now still available on
+the queried system the service "Object count" will now display the
+correct count when the option is used.
diff --git a/agents/special/agent_vsphere b/agents/special/agent_vsphere
index cebc547..e272957 100755
--- a/agents/special/agent_vsphere
+++ b/agents/special/agent_vsphere
@@ -1662,8 +1662,7 @@ if not error:
host_info = "hostsystem\t%s\t\t%s" %
(converted_hostname, hostsystems_properties[hostname]["runtime.powerState"][0])
if opt_host_pwr_display == "esxhost" and not
opt_direct:
host_piggy_data.setdefault(converted_hostname,
[]).append(host_info)
- else:
- output(host_info)
+ output(host_info)
if "virtualmachine" in query_objects:
for key in vms.keys():
@@ -1676,8 +1675,7 @@ if not error:
vm_piggy_data.setdefault(vm_name, []).append(vm_info)
elif opt_vm_pwr_display == "esxhost" and not opt_direct:
host_piggy_data.setdefault(running_on, []).append(vm_info)
- else:
- output(vm_info)
+ output(vm_info)
if "virtualmachine" in query_objects and "hostsystem" in
query_objects and opt_host_pwr_display == "vm":
def find_host(hostname):
diff --git a/web/plugins/wato/datasource_programs.py
b/web/plugins/wato/datasource_programs.py
index 7dbdbda..da9539c 100644
--- a/web/plugins/wato/datasource_programs.py
+++ b/web/plugins/wato/datasource_programs.py
@@ -158,7 +158,13 @@ register_rule(group,
),
( "vm_pwr_display",
DropdownChoice(
- title = _("Display VM power state on"),
+ title = _("Display VM power state
<i>additionally</i> on"),
+ help = _("The power state can be displayed additionally
either "
+ "on the ESX host or the VM. This will result in
services "
+ "for <i>both</i> the queried system and
the ESX host / VM. "
+ "By disabling the unwanted services it is then
possible "
+ "to configure where the services are
displayed."
+ ),
choices = [
( None, _("The queried ESX system (vCenter /
Host)") ),
( "esxhost", _("The ESX Host") ),