Module: check_mk
Branch: master
Commit: 63233fbb03e00895aff04eda711c33d12a04b043
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=63233fbb03e008…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 26 12:47:39 2016 +0100
#2958 FIX domino_tasks: Fixed broken discovery and check
---
.werks/2958 | 9 +++++++++
ChangeLog | 1 +
checks/domino_tasks | 23 +++++++++++++++++++----
checks/ps | 1 -
4 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/.werks/2958 b/.werks/2958
new file mode 100644
index 0000000..c2e7838
--- /dev/null
+++ b/.werks/2958
@@ -0,0 +1,9 @@
+Title: domino_tasks: Fixed broken discovery and check
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1453808840
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 536191c..941fe1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -217,6 +217,7 @@
* 2955 FIX: cpu.loads: Fixed monitoring on some AIX systems
* 2939 FIX: winperf_phydisk: fixed permanent stall state if windows reports several
disks with the same drive letter...
* 2957 FIX: Renamed Lotus Domino Task Inventory rule to Lotus Domino Task Discovery
+ * 2958 FIX: domino_tasks: Fixed broken discovery and check
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/domino_tasks b/checks/domino_tasks
index 42f5788..d5c4cc0 100644
--- a/checks/domino_tasks
+++ b/checks/domino_tasks
@@ -42,13 +42,28 @@
inv_domino_tasks_rules = []
inv_domino_tasks = []
-def inventory_domino_tasks(info):
- return inventory_ps_common(inv_domino_tasks, inv_domino_tasks_rules, info)
+# Bring the SNMP data in the format expected by the common ps functions.
+# e.g.:
+# [None, (u'root', u'185292', u'5804',
u'00:00:02/03:33:13', u'1'), u'/sbin/init', u'splash']
+def parse_domino_tasks(info):
+ parsed = []
+ for line in info:
+ node, task_name = line
+ # node, process_info, command_line
+ parsed.append((node, (None,), task_name))
+ return parsed
+
+
+def inventory_domino_tasks(parsed):
+ return inventory_ps_common(inv_domino_tasks, inv_domino_tasks_rules, parsed)
+
+
+def check_domino_tasks(item, params, parsed):
+ return check_ps_common(item, params, parsed, info_name = "Tasks")
-def check_domino_tasks(item, params, info):
- return check_ps_common( item, params, info, info_name = "Tasks" )
check_info['domino_tasks'] = {
+ "parse_function" : parse_domino_tasks,
"check_function" : check_domino_tasks,
"inventory_function" : inventory_domino_tasks,
"has_perfdata" : True,
diff --git a/checks/ps b/checks/ps
index 897ac92..2da3069 100644
--- a/checks/ps
+++ b/checks/ps
@@ -271,7 +271,6 @@ def inventory_ps(info):
def check_ps(item, params, info):
(cpu_cores, parsed), mem_info, solaris_mem_info, statgrab_mem_info = info
- # ps_info, mem_info, solaris_mem_info, statgrab_mem_info = info
if mem_info:
total_ram = parse_proc_meminfo_bytes(mem_info).get("MemTotal")
elif solaris_mem_info: