Refactoring: Moved check parameters from unsorted.py to dedicated modules (CMK-1393)
[check_mk.git] / cmk / gui / plugins / wato / check_parameters / mssql_tablespaces.py
blob6b6062fba227d2374a2f91f860445e6b59d4ae5e
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 Alternative,
30 Dictionary,
31 Filesize,
32 Percentage,
33 TextAscii,
34 Tuple,
36 from cmk.gui.plugins.wato import (
37 RulespecGroupCheckParametersApplications,
38 register_check_parameters,
41 register_check_parameters(
42 RulespecGroupCheckParametersApplications,
43 "mssql_tablespaces",
44 _("MSSQL Size of Tablespace"),
45 Dictionary(
46 elements=[
47 ("size",
48 Tuple(
49 title=_("Upper levels for size"),
50 elements=[Filesize(title=_("Warning at")),
51 Filesize(title=_("Critical at"))])),
52 ("reserved",
53 Alternative(
54 title=_("Upper levels for reserved space"),
55 elements=[
56 Tuple(
57 title=_("Absolute levels"),
58 elements=[
59 Filesize(title=_("Warning at")),
60 Filesize(title=_("Critical at"))
61 ]),
62 Tuple(
63 title=_("Percentage levels"),
64 elements=[
65 Percentage(title=_("Warning at")),
66 Percentage(title=_("Critical at"))
67 ]),
68 ])),
69 ("data",
70 Alternative(
71 title=_("Upper levels for data"),
72 elements=[
73 Tuple(
74 title=_("Absolute levels"),
75 elements=[
76 Filesize(title=_("Warning at")),
77 Filesize(title=_("Critical at"))
78 ]),
79 Tuple(
80 title=_("Percentage levels"),
81 elements=[
82 Percentage(title=_("Warning at")),
83 Percentage(title=_("Critical at"))
84 ]),
85 ])),
86 ("indexes",
87 Alternative(
88 title=_("Upper levels for indexes"),
89 elements=[
90 Tuple(
91 title=_("Absolute levels"),
92 elements=[
93 Filesize(title=_("Warning at")),
94 Filesize(title=_("Critical at"))
95 ]),
96 Tuple(
97 title=_("Percentage levels"),
98 elements=[
99 Percentage(title=_("Warning at")),
100 Percentage(title=_("Critical at"))
102 ])),
103 ("unused",
104 Alternative(
105 title=_("Upper levels for unused space"),
106 elements=[
107 Tuple(
108 title=_("Absolute levels"),
109 elements=[
110 Filesize(title=_("Warning at")),
111 Filesize(title=_("Critical at"))
113 Tuple(
114 title=_("Percentage levels"),
115 elements=[
116 Percentage(title=_("Warning at")),
117 Percentage(title=_("Critical at"))
119 ])),
120 ("unallocated",
121 Alternative(
122 title=_("Lower levels for unallocated space"),
123 elements=[
124 Tuple(
125 title=_("Absolute levels"),
126 elements=[
127 Filesize(title=_("Warning below")),
128 Filesize(title=_("Critical below"))
130 Tuple(
131 title=_("Percentage levels"),
132 elements=[
133 Percentage(title=_("Warning below")),
134 Percentage(title=_("Critical below"))
136 ])),
137 ],),
138 TextAscii(title=_("Tablespace name"), allow_empty=False),
139 match_type="dict",