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.
27 from cmk
.gui
.i18n
import _
28 from cmk
.gui
.valuespec
import (
36 from cmk
.gui
.plugins
.wato
import (
37 RulespecGroupCheckParametersApplications
,
38 RulespecGroupCheckParametersDiscovery
,
39 register_check_parameters
,
44 def transform_msx_queues(params
):
45 if isinstance(params
, tuple):
46 return {"levels": (params
[0], params
[1])}
51 RulespecGroupCheckParametersDiscovery
,
52 varname
="winperf_msx_queues_inventory",
53 title
=_('MS Exchange Message Queues Discovery'),
55 'Per default the offsets of all Windows performance counters are preconfigured in the check. '
56 'If the format of your counters object is not compatible then you can adapt the counter '
60 orientation
="horizontal",
63 title
=_("Name of Counter"),
64 help=_("Name of the Counter to be monitored."),
70 help=_("The offset of the information relative to counter base"),
75 add_label
=_("Add Counter")),
79 register_check_parameters(
80 RulespecGroupCheckParametersApplications
, "msx_queues", _("MS Exchange Message Queues"),
83 title
=_("Set Levels"),
87 title
=_("Maximum Number of E-Mails in Queue"),
89 Integer(title
=_("Warning at"), unit
=_("E-Mails")),
90 Integer(title
=_("Critical at"), unit
=_("E-Mails"))
96 _("Use this only if you want to overwrite the postion of the information in the agent "
97 "output. Also refer to the rule <i>Microsoft Exchange Queues Discovery</i> "
100 optional_keys
=["offset"],
102 forth
=transform_msx_queues
,
105 title
=_("Explicit Queue Names"),
106 help=_("Specify queue names that the rule should apply to"),