Module: check_mk
Branch: master
Commit: 528626db7dda0b1d5888461716109297d9cb84b3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=528626db7dda0b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Aug 1 15:31:33 2016 +0200
3732 esx_vsphere_hostsystem.mem_usage esx_vsphere_hostsystem.mem_usage_cluster: Providing
mem_total as dedicated metric
---
.werks/3732 | 9 +++++++++
ChangeLog | 1 +
checks/esx_vsphere_hostsystem | 6 ++++--
web/plugins/metrics/check_mk.py | 8 +++++++-
4 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/.werks/3732 b/.werks/3732
new file mode 100644
index 0000000..503884f
--- /dev/null
+++ b/.werks/3732
@@ -0,0 +1,9 @@
+Title: esx_vsphere_hostsystem.mem_usage esx_vsphere_hostsystem.mem_usage_cluster:
Providing mem_total as dedicated metric
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i1
+Date: 1470058271
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index ee7cfd3..01d517a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -121,6 +121,7 @@
* 2241 check_mk_agent.openwrt: Added section for local scripts and plugins...
* 3697 sym_brightmail_queues: added support for newer symantec brightmail version
* 3725 mssql_instance: Changed MSSQL monitoring to report connection issues with only
one service...
+ * 3732 esx_vsphere_hostsystem.mem_usage esx_vsphere_hostsystem.mem_usage_cluster:
Providing mem_total as dedicated metric
* 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/esx_vsphere_hostsystem b/checks/esx_vsphere_hostsystem
index 3e88dd5..2b1688d 100644
--- a/checks/esx_vsphere_hostsystem
+++ b/checks/esx_vsphere_hostsystem
@@ -137,7 +137,8 @@ def check_esx_vsphere_hostsystem_mem_cluster(item, params, info):
label = " (Levels at %d%%/%d%%)" % (warn, crit)
break
- perf = [("usage", total_memory_usage, warn_perf, crit_perf, 0,
total_memory_size)]
+ perf = [("usage", total_memory_usage, warn_perf, crit_perf, 0,
total_memory_size),
+ ("mem_total", total_memory_size)]
yield state, "%d%%%s used - %s/%s" % \
(level, label, get_bytes_human_readable(total_memory_usage),
get_bytes_human_readable(total_memory_size)), perf
@@ -264,7 +265,8 @@ def check_esx_vsphere_hostsystem_mem(item, params, info):
message = "%d%%%s used - %s/%s" % \
(level, label, get_bytes_human_readable(memory_usage),
get_bytes_human_readable(memory_size))
- perf = [("usage", memory_usage, warn * memory_size / 100, crit *
memory_size / 100, 0, memory_size)]
+ perf = [("usage", memory_usage, warn * memory_size / 100, crit *
memory_size / 100, 0, memory_size),
+ ("mem_total", memory_size)]
return(state, message, perf)
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index 887740f..89f19f8 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -4129,7 +4129,13 @@ check_metrics["check_mk-ibm_svc_systemstats.cache"] = {
}
check_metrics["check_mk-esx_vsphere_hostsystem.mem_usage"] = {
- "usage" : { "name" : "mem_used" }
+ "usage" : { "name" : "mem_used" },
+ "mem_total" : { "auto_graph" : False },
+}
+
+check_metrics["check_mk-esx_vsphere_hostsystem.mem_usage_cluster"] = {
+ "usage" : { "name" : "mem_used" },
+ "mem_total" : { "auto_graph" : False },
}
check_metrics["check_mk-ibm_svc_host"] = {