Module: check_mk
Branch: master
Commit: dc364dba8497490222c080173088944cc7834f5c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dc364dba849749…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Thu Feb 4 10:36:27 2016 +0100
#3068 FIX ps: added performance graphs for process handle count (windows only)
---
.werks/3068 | 9 +++++++++
ChangeLog | 1 +
checks/ps.include | 9 +++++++--
web/plugins/metrics/check_mk.py | 6 ++++++
4 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/.werks/3068 b/.werks/3068
new file mode 100644
index 0000000..3de3c9c
--- /dev/null
+++ b/.werks/3068
@@ -0,0 +1,9 @@
+Title: ps: added performance graphs for process handle count (windows only)
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1454578461
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index db44d7d..c1a1ec0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -246,6 +246,7 @@
* 3043 FIX: agent_emcvnx: Fixed error handling in case of missing naviseccli command
* 3045 FIX: veeam_backup_status: Fixed wrong date format reported by agent...
* 3066 FIX: windows agent: 32-bit performance counters were not returned correctly
+ * 3068 FIX: ps: added performance graphs for process handle count (windows only)
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/ps.include b/checks/ps.include
index f21bbf0..ffe0f5f 100644
--- a/checks/ps.include
+++ b/checks/ps.include
@@ -458,8 +458,10 @@ def check_ps_common(item, params, parsed, cpu_cores = 1, info_name =
"processes"
extended_perfdata = ps_has_extended_perfdata(parsed[0][1])
if extended_perfdata:
- perfdata += [ ("vsz", virtual_size),
- ("rss", resident_size)]
+ warn_vsz, crit_vsz = params.get("virtual_levels", (None, None))
+ warn_rss, crit_rss = params.get("resident_levels", (None, None))
+ perfdata += [ ("vsz", virtual_size, warn_rss, crit_rss),
+ ("rss", resident_size, warn_rss, crit_rss)]
perfdata.append(("pcpu", percent_cpu, warn_cpu, crit_cpu))
infotext = "%d %s" % (count, info_name)
@@ -538,6 +540,9 @@ def check_ps_common(item, params, parsed, cpu_cores = 1, info_name =
"processes"
elif handle_count >= warn_handle:
state = max(state, 1)
infotext += "(!)"
+ else:
+ warn_handle, crit_handle = None, None
+ perfdata.append(("process_handles", handle_count, warn_handle,
crit_handle))
# Check how long the process is running
if min_elapsed != None:
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index e7a4694..ba17875 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -764,6 +764,12 @@ metric_info["process_mapped_size"] = {
"color" : "12/a",
}
+metric_info["process_handles"] = {
+ "title" : _("Process handles"),
+ "unit" : "count",
+ "color" : "32/a",
+}
+
metric_info["mem_heap"] = {
"title" : _("Heap memory usage"),
"unit" : "bytes",