Refactoring: Moved check parameters from unsorted.py to dedicated modules (CMK-1393)
[check_mk.git] / cmk / gui / plugins / wato / check_parameters / juniper_cpu_util.py
blob1c21ecf4de6d691d8b12eb081d3be123d57dde9e
1 #!/usr/bin/python
2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
9 # | |
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 (
29 Dictionary,
30 Percentage,
31 TextAscii,
32 Transform,
33 Tuple,
35 from cmk.gui.plugins.wato import (
36 RulespecGroupCheckParametersOperatingSystem,
37 register_check_parameters,
40 register_check_parameters(
41 RulespecGroupCheckParametersOperatingSystem,
42 "juniper_cpu_util",
43 _("Juniper Processor Utilization of Routing Engine"),
44 Transform(
45 Dictionary(
46 help=_("CPU utilization of routing engine."),
47 optional_keys=[],
48 elements=[
50 "levels",
51 Tuple(
52 title=_("Specify levels in percentage of processor routing engine usage"),
53 elements=[
54 Percentage(title=_("Warning at"), default_value=80.0),
55 Percentage(title=_("Critical at"), default_value=90.0),
59 ]),
60 forth=lambda old: not old and {'levels': (80.0, 90.0)} or old,
62 TextAscii(title=_("Routing Engine"),),
63 "dict",