Module: check_mk
Branch: master
Commit: a2de544a2a5c553ef7db9bdae9dee4a7c54bebf9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a2de544a2a5c55…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Aug 29 15:49:39 2016 +0200
3796 agent_vsphere: new option allows monitoring of ESX hostsystem and windows agent
---
.werks/3796 | 9 +++++++++
ChangeLog | 1 +
checks/agent_vsphere | 8 +++++++-
web/plugins/wato/datasource_programs.py | 7 ++++---
4 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/.werks/3796 b/.werks/3796
new file mode 100644
index 0000000..3258211
--- /dev/null
+++ b/.werks/3796
@@ -0,0 +1,9 @@
+Title: agent_vsphere: new option allows monitoring of ESX hostsystem and windows agent
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i1
+Date: 1472478527
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 912a8fa..36eccc7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -146,6 +146,7 @@
* 3794 f5_bigip_snat: now able to configure levels
* 3795 cisco_cpu_multiitem: monitors the cpu utilization of each cpu
* 3834 hitachi_hus_dku, hitachi_hus_dkc: now recognises Hitachi G800/HM800 devices
+ * 3796 agent_vsphere: new option allows monitoring of ESX hostsystem and windows
agent
* 3073 FIX: windows agent: relative paths to mrpe scripts are now treated as relative
to the agent installation directory...
* 3061 FIX: mk_jolokia: Fixed debugging of the agent plugin
* 3074 FIX: windows agent: fixed incorrect values for 32-bit performance counters
diff --git a/checks/agent_vsphere b/checks/agent_vsphere
index 8ac5141..094de2d 100644
--- a/checks/agent_vsphere
+++ b/checks/agent_vsphere
@@ -40,10 +40,16 @@ def agent_vsphere_arguments(params, hostname, ipaddress):
args += " -s " + quote_shell_string(params["secret"])
args += " -i " + ",".join(params["infos"])
+ # Available options. Don't ask...
+ # True, _("Queried host is a host system" ) ),
+ # "hostsystem_agent", _("Queried host is a host system with Check_MK
Agent installed") ),
+ # False, _("Queried host is the vCenter") ),
+ # "agent", _("Queried host is the vCenter with Check_MK
Agent installed") ),
direct = params.get("direct", False)
-
if direct == "agent":
args += ' --agent'
+ elif direct == "hostsystem_agent":
+ args += ' --agent --direct --hostname ' + quote_shell_string(hostname)
elif direct:
args += ' --direct --hostname ' + quote_shell_string(hostname)
diff --git a/web/plugins/wato/datasource_programs.py
b/web/plugins/wato/datasource_programs.py
index cd6c249..3aa4932 100644
--- a/web/plugins/wato/datasource_programs.py
+++ b/web/plugins/wato/datasource_programs.py
@@ -156,9 +156,10 @@ register_rule(group,
DropdownChoice(
title = _("Type of query"),
choices = [
- ( True, _("Queried host is a host system" ) ),
- ( False, _("Queried host is the vCenter") ),
- ( "agent", _("Queried host is the vCenter with
Check_MK Agent installed") ),
+ ( True, _("Queried host is a host
system" ) ),
+ ( "hostsystem_agent", _("Queried host is a host
system with Check_MK Agent installed") ),
+ ( False, _("Queried host is the
vCenter") ),
+ ( "agent", _("Queried host is the
vCenter with Check_MK Agent installed") ),
],
default = True,
)