Refactoring: Moved check parameters from unsorted.py to dedicated modules (CMK-1393)
[check_mk.git] / cmk / gui / plugins / wato / check_parameters / plesk_backups.py
blobdd3b8d5d11129661c89864941a1ce3c397660570
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 Age,
30 Dictionary,
31 Filesize,
32 MonitoringState,
33 TextAscii,
34 Tuple,
36 from cmk.gui.plugins.wato import (
37 RulespecGroupCheckParametersApplications,
38 register_check_parameters,
41 register_check_parameters(
42 RulespecGroupCheckParametersApplications,
43 "plesk_backups",
44 _("Plesk Backups"),
45 Dictionary(
46 help=_("This check monitors backups configured for domains in plesk."),
47 elements=[
48 ("no_backup_configured_state",
49 MonitoringState(title=_("State when no backup is configured"), default_value=1)),
50 ("no_backup_found_state",
51 MonitoringState(title=_("State when no backup can be found"), default_value=1)),
53 "backup_age",
54 Tuple(
55 title=_("Maximum age of backups"),
56 help=_("The maximum age of the last backup."),
57 elements=[
58 Age(title=_("Warning at")),
59 Age(title=_("Critical at")),
64 "total_size",
65 Tuple(
66 title=_("Maximum size of all files on backup space"),
67 help=_("The maximum size of all files on the backup space. "
68 "This might be set to the allowed quotas on the configured "
69 "FTP server to be notified if the space limit is reached."),
70 elements=[
71 Filesize(title=_("Warning at")),
72 Filesize(title=_("Critical at")),
77 optional_keys=['backup_age', 'total_size']),
78 TextAscii(title=_("Service descriptions"), allow_empty=False),
79 match_type="dict",