2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
10 # | Copyright Mathias Kettner 2014 mk@mathias-kettner.de |
11 # +------------------------------------------------------------------+
13 # This file is part of Check_MK.
14 # The official homepage is at http://mathias-kettner.de/check_mk.
16 # check_mk is free software; you can redistribute it and/or modify it
17 # under the terms of the GNU General Public License as published by
18 # the Free Software Foundation in version 2. check_mk is distributed
19 # in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
20 # out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
21 # PARTICULAR PURPOSE. See the GNU General Public License for more de-
22 # tails. You should have received a copy of the GNU General Public
23 # License along with GNU Make; see the file COPYING. If not, write
24 # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
25 # Boston, MA 02110-1301 USA.
29 # InTaskName: The actual name of the task as it appears in the SERVER.TASK statistic on the server.
30 # .1.3.6.1.4.1.334.72.1.1.6.1.2.1.4.0 Router
31 # .1.3.6.1.4.1.334.72.1.1.6.1.2.1.4.1 tm_grab Subsystems
32 # .1.3.6.1.4.1.334.72.1.1.6.1.2.1.4.2 tm_grab M01
33 # .1.3.6.1.4.1.334.72.1.1.6.1.2.1.4.3 tm_grab M02
34 # .1.3.6.1.4.1.334.72.1.1.6.1.2.1.4.4 tm_grab M03
35 # .1.3.6.1.4.1.334.72.1.1.6.1.2.1.4.5 tm_grab M04
36 # .1.3.6.1.4.1.334.72.1.1.6.1.2.1.4.6 tm_grab M05
37 # .1.3.6.1.4.1.334.72.1.1.6.1.2.1.4.7 tm_grab
38 # .1.3.6.1.4.1.334.72.1.1.6.1.2.1.4.8 Router
40 inv_domino_tasks_rules
= []
42 # Deprecated option since 1.6. cmk_base creates a config warning when finding rules
43 # for this ruleset. Can be dropped with 1.7.
47 # Bring the SNMP data in the format expected by the common ps functions.
49 # [None, (u'root', u'185292', u'5804', u'00:00:02/03:33:13', u'1'), u'/sbin/init', u'splash']
50 def parse_domino_tasks(info
):
53 node
, task_name
= line
54 # node, process_info, command_line
55 parsed
.append((node
, (None,), task_name
))
59 def inventory_domino_tasks(parsed
):
60 return inventory_ps_common(inv_domino_tasks_rules
, parsed
)
63 def check_domino_tasks(item
, params
, parsed
):
64 return check_ps_common(item
, params
, parsed
, info_name
="Tasks")
67 check_info
['domino_tasks'] = {
68 "parse_function": parse_domino_tasks
,
69 "check_function": check_domino_tasks
,
70 "inventory_function": inventory_domino_tasks
,
72 "group": "domino_tasks",
73 "service_description": "Domino Task %s",
74 "includes": ["ps.include"],
75 "node_info": True, # add first column with actual host name
76 "snmp_scan_function": lambda oid
: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.311.1.1.3.1.2",
78 ".1.3.6.1.4.1.334.72.1.1.6.1.2.1",