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.
28 import cmk
.utils
.defines
as defines
30 from cmk
.gui
.plugins
.wato
.active_checks
import check_icmp_params
32 import cmk
.gui
.mkeventd
as mkeventd
33 from cmk
.gui
.exceptions
import MKUserError
34 from cmk
.gui
.i18n
import _
35 from cmk
.gui
.valuespec
import (
61 OptionalDropdownChoice
,
64 from cmk
.gui
.plugins
.wato
import (
65 RulespecGroupCheckParametersApplications
,
66 RulespecGroupCheckParametersDiscovery
,
67 RulespecGroupCheckParametersEnvironment
,
68 RulespecGroupCheckParametersHardware
,
69 RulespecGroupCheckParametersNetworking
,
70 RulespecGroupCheckParametersOperatingSystem
,
71 RulespecGroupCheckParametersPrinters
,
72 RulespecGroupCheckParametersStorage
,
73 RulespecGroupCheckParametersVirtualization
,
75 register_check_parameters
,
80 from cmk
.gui
.plugins
.wato
.check_parameters
.ps
import process_level_elements
82 # TODO: Sort all rules and check parameters into the figlet header sections.
83 # Beware: there are dependencies, so sometimes the order matters. All rules
84 # that are not yet handles are in the last section: in "Unsorted". Move rules
85 # from there into their appropriate sections until "Unsorted" is empty.
86 # Create new rules directly in the correct secions.
88 # .--Networking----------------------------------------------------------.
90 # | | \ | | ___| |___ _____ _ __| | _(_)_ __ __ _ |
91 # | | \| |/ _ \ __\ \ /\ / / _ \| '__| |/ / | '_ \ / _` | |
92 # | | |\ | __/ |_ \ V V / (_) | | | <| | | | | (_| | |
93 # | |_| \_|\___|\__| \_/\_/ \___/|_| |_|\_\_|_| |_|\__, | |
95 # '----------------------------------------------------------------------'
98 RulespecGroupCheckParametersNetworking
,
101 title
=_("PING and host check parameters"),
102 help=_("This rule sets the parameters for the host checks (via <tt>check_icmp</tt>) "
103 "and also for PING checks on ping-only-hosts. For the host checks only the "
104 "critical state is relevant, the warning levels are ignored."),
105 elements
=check_icmp_params
,
110 # .--Inventory-----------------------------------------------------------.
112 # | |_ _|_ ____ _____ _ __ | |_ ___ _ __ _ _ |
113 # | | || '_ \ \ / / _ \ '_ \| __/ _ \| '__| | | | |
114 # | | || | | \ V / __/ | | | || (_) | | | |_| | |
115 # | |___|_| |_|\_/ \___|_| |_|\__\___/|_| \__, | |
117 # '----------------------------------------------------------------------'
120 def transform_ipmi_inventory_rules(p
):
121 if not isinstance(p
, dict):
123 if p
.get("summarize", True):
125 if p
.get('ignored_sensors', []):
126 return ('single', {'ignored_sensors': p
["ignored_sensors"]})
127 return ('single', {})
131 RulespecGroupCheckParametersDiscovery
,
132 varname
="inventory_ipmi_rules",
133 title
=_("Discovery of IPMI sensors"),
136 orientation
="vertical",
138 [("summarize", _("Summary")),
139 ("single", _("Single"),
145 title
=_("Ignore the following IPMI sensors"),
146 help=_("Names of IPMI sensors that should be ignored during inventory "
147 "and when summarizing."
148 "The pattern specified here must match exactly the beginning of "
149 "the actual sensor name (case sensitive)."),
150 orientation
="horizontal")),
151 ("ignored_sensorstates",
153 title
=_("Ignore the following IPMI sensor states"),
155 "IPMI sensors with these states that should be ignored during inventory "
156 "and when summarizing."
157 "The pattern specified here must match exactly the beginning of "
158 "the actual sensor name (case sensitive)."),
159 orientation
="horizontal",
162 forth
=transform_ipmi_inventory_rules
),
166 RulespecGroupCheckParametersDiscovery
,
167 varname
="ewon_discovery_rules",
168 title
=_("eWON Discovery"),
169 help=_("The ewon vpn routers can rely data from a secondary device via snmp. "
170 "It doesn't however allow discovery of the device type relayed this way. "
171 "To allow interpretation of the data you need to pick the device manually."),
172 valuespec
=DropdownChoice(
173 title
=_("Device Type"),
174 label
=_("Select device type"),
176 (None, _("None selected")),
177 ("oxyreduct", _("Wagner OxyReduct")),
184 RulespecGroupCheckParametersDiscovery
,
185 varname
="mssql_transactionlogs_discovery",
186 title
=_("MSSQL Datafile and Transactionlog Discovery"),
187 valuespec
=Dictionary(
189 ("summarize_datafiles",
191 title
=_("Display only a summary of all Datafiles"),
192 label
=_("Summarize Datafiles"),
194 ("summarize_transactionlogs",
196 title
=_("Display only a summary of all Transactionlogs"),
197 label
=_("Summarize Transactionlogs"),
204 RulespecGroupCheckParametersDiscovery
,
205 varname
="inventory_services_rules",
206 title
=_("Windows Service Discovery"),
207 valuespec
=Dictionary(
211 title
=_("Services (Regular Expressions)"),
212 help=_('Regular expressions matching the begining of the internal name '
213 'or the description of the service. '
214 'If no name is given then this rule will match all services. The '
215 'match is done on the <i>beginning</i> of the service name. It '
216 'is done <i>case sensitive</i>. You can do a case insensitive match '
217 'by prefixing the regular expression with <tt>(?i)</tt>. Example: '
218 '<tt>(?i).*mssql</tt> matches all services which contain <tt>MSSQL</tt> '
219 'or <tt>MsSQL</tt> or <tt>mssql</tt> or...'),
220 orientation
="horizontal",
225 ('running', _('Running')),
226 ('stopped', _('Stopped')),
228 title
=_("Create check if service is in state"),
233 ('auto', _('Automatic')),
234 ('demand', _('Manual')),
235 ('disabled', _('Disabled')),
237 title
=_("Create check if service is in start mode"),
241 'This rule can be used to configure the inventory of the windows services check. '
242 'You can configure specific windows services to be monitored by the windows check by '
243 'selecting them by name, current state during the inventory, or start mode.'),
249 RulespecGroupCheckParametersDiscovery
,
250 varname
="inventory_solaris_services_rules",
251 title
=_("Solaris Service Discovery"),
252 valuespec
=Dictionary(
254 ('descriptions', ListOfStrings(title
=_("Descriptions"))),
255 ('categories', ListOfStrings(title
=_("Categories"))),
256 ('names', ListOfStrings(title
=_("Names"))),
257 ('instances', ListOfStrings(title
=_("Instances"))),
262 ("online", _("online")),
263 ("disabled", _("disabled")),
264 ("maintenance", _("maintenance")),
265 ("legacy_run", _("legacy run")),
271 title
=_("Service name"),
274 FixedValue("full_descr", title
=_("Full Description"), totext
=""),
276 "descr_without_prefix",
277 title
=_("Description without type prefix"),
283 'This rule can be used to configure the discovery of the Solaris services check. '
284 'You can configure specific Solaris services to be monitored by the Solaris check by '
285 'selecting them by description, category, name, or current state during the discovery.'
292 RulespecGroupCheckParametersDiscovery
,
293 varname
="discovery_systemd_units_services_rules",
294 title
=_("Systemd Service Discovery"),
295 valuespec
=Dictionary(
297 ('descriptions', ListOfStrings(title
=_("Descriptions"))),
298 ('names', ListOfStrings(title
=_("Service unit names"))),
303 ("active", "active"),
304 ("inactive", "inactive"),
305 ("failed", "failed"),
310 help=_('This rule can be used to configure the discovery of the Linux services check. '
311 'You can configure specific Linux services to be monitored by the Linux check by '
312 'selecting them by description, unit name, or current state during the discovery.'),
318 RulespecGroupCheckParametersDiscovery
,
319 varname
="discovery_win_dhcp_pools",
320 title
=_("Discovery of Windows DHCP Pools"),
321 valuespec
=Dictionary(elements
=[
324 title
=_("Discovery of empty DHCP pools"),
325 label
=_("Include empty pools into the monitoring"),
326 help=_("You can activate the creation of services for "
327 "DHCP pools, which contain no IP addresses."),
334 RulespecGroupCheckParametersDiscovery
,
335 varname
="inventory_if_rules",
336 title
=_("Network Interface and Switch Port Discovery"),
337 valuespec
=Dictionary(
342 (True, _('Use description')),
343 (False, _('Do not use description')),
345 title
=_("Description as service name for network interface checks"),
347 "This option lets Check_MK use the interface description as item instead "
348 "of the port number. If no description is available then the port number is "
353 (True, _('Use alias')),
354 (False, _('Do not use alias')),
356 title
=_("Alias as service name for network interface checks"),
358 "This option lets Check_MK use the alias of the port (ifAlias) as item instead "
359 "of the port number. If no alias is available then the port number is used "
364 (True, _('Pad port numbers with zeros')),
365 (False, _('Do not pad')),
367 title
=_("Port numbers"),
368 help=_("If this option is activated then Check_MK will pad port numbers of "
369 "network interfaces with zeroes so that all port descriptions from "
370 "all ports of a host or switch have the same length and thus sort "
371 "currectly in the GUI. In versions prior to 1.1.13i3 there was no "
372 "padding. You can switch back to the old behaviour by disabling this "
373 "option. This will retain the old service descriptions and the old "
374 "performance data."),
378 title
=_("Match interface alias (regex)"),
379 help=_("Only discover interfaces whose alias matches one of the configured "
380 "regular expressions. The match is done on the beginning of the alias. "
381 "This allows you to select interfaces based on the alias without having "
382 "the alias be part of the service description."),
383 orientation
="horizontal",
391 title
=_("Match interface description (regex)"),
393 "Only discover interfaces whose the description matches one of the configured "
394 "regular expressions. The match is done on the beginning of the description. "
395 "This allows you to select interfaces based on the description without having "
396 "the alias be part of the service description."),
397 orientation
="horizontal",
405 title
=_("Network interface port states to discover"),
407 _("When doing discovery on switches or other devices with network interfaces "
408 "then only ports found in one of the configured port states will be added to the monitoring. "
409 "Note: the state <i>admin down</i> is in fact not an <tt>ifOperStatus</tt> but represents the "
410 "<tt>ifAdminStatus</tt> of <tt>down</tt> - a port administratively switched off. If you check this option "
411 "then an alternate version of the check is being used that fetches the <tt>ifAdminState</tt> in addition. "
412 "This will add about 5% of additional SNMP traffic."),
413 choices
=defines
.interface_oper_states(),
419 title
=_("Network interface port types to discover"),
420 help=_("When doing discovery on switches or other devices with network interfaces "
421 "then only ports of the specified types will be created services for."),
422 choices
=defines
.interface_port_types(),
427 '6', '32', '62', '117', '127', '128', '129', '180', '181', '182', '205', '229'
434 _("Create extra service with RMON statistics data (if available for the device)"
436 (False, _('Do not create extra services')),
438 title
=_("Collect RMON statistics data"),
440 _("If you enable this option, for every RMON capable switch port an additional service will "
441 "be created which is always OK and collects RMON data. This will give you detailed information "
442 "about the distribution of packet sizes transferred over the port. Note: currently "
443 "this extra RMON check does not honor the inventory settings for switch ports. In a future "
444 "version of Check_MK RMON data may be added to the normal interface service and not add "
445 "an additional service."),
448 help=_('This rule can be used to control the inventory for network ports. '
449 'You can configure the port types and port states for inventory'
450 'and the use of alias or description as service name.'),
455 _brocade_fcport_adm_choices
= [
462 _brocade_fcport_op_choices
= [
470 _brocade_fcport_phy_choices
= [
472 (2, 'noTransceiver(2)'),
473 (3, 'laserFault(3)'),
480 (10, 'validating(10)'),
481 (11, 'invalidModule(11)'),
482 (14, 'noSigDet(14)'),
483 (255, 'unkown(255)'),
487 RulespecGroupCheckParametersDiscovery
,
488 varname
="brocade_fcport_inventory",
489 title
=_("Brocade Port Discovery"),
490 valuespec
=Dictionary(
494 title
=_("Use port name as service name"),
495 label
=_("use port name"),
497 help=_("This option lets Check_MK use the port name as item instead of the "
498 "port number. If no description is available then the port number is "
502 title
=_("add \"ISL\" to service description for interswitch links"),
505 help=_("This option lets Check_MK add the string \"ISL\" to the service "
506 "description for interswitch links."))),
509 title
=_("Administrative port states to discover"),
511 "When doing service discovery on brocade switches only ports with the given administrative "
512 "states will be added to the monitoring system."),
513 choices
=_brocade_fcport_adm_choices
,
516 default_value
=['1', '3', '4'],
520 title
=_("Physical port states to discover"),
522 "When doing service discovery on brocade switches only ports with the given physical "
523 "states will be added to the monitoring system."),
524 choices
=_brocade_fcport_phy_choices
,
527 default_value
=[3, 4, 5, 6, 7, 8, 9, 10])),
530 title
=_("Operational port states to discover"),
532 "When doing service discovery on brocade switches only ports with the given operational "
533 "states will be added to the monitoring system."),
534 choices
=_brocade_fcport_op_choices
,
537 default_value
=[1, 2, 3, 4])),
539 help=_('This rule can be used to control the service discovery for brocade ports. '
540 'You can configure the port states for inventory '
541 'and the use of the description as service name.'),
547 # In version 1.2.4 the check parameters for the resulting ps check
548 # where defined in the dicovery rule. We moved that to an own rule
549 # in the classical check parameter style. In order to support old
550 # configuration we allow reading old discovery rules and ship these
551 # settings in an optional sub-dictionary.
552 def convert_inventory_processes(old_dict
):
553 new_dict
= {"default_params": {}}
554 for key
, value
in old_dict
.items():
563 new_dict
["default_params"][key
] = value
564 elif key
!= "perfdata":
565 new_dict
[key
] = value
567 # New cpu rescaling load rule
568 if old_dict
.get('cpu_rescale_max') is None:
569 new_dict
['cpu_rescale_max'] = True
574 def forbid_re_delimiters_inside_groups(pattern
, varprefix
):
575 # Used as input validation in PS check wato config
576 group_re
= r
'\(.*?\)'
577 for match
in re
.findall(group_re
, pattern
):
578 for char
in ['\\b', '$', '^']:
582 _('"%s" is not allowed inside the regular expression group %s. '
583 'Bounding characters inside groups will vanish after discovery, '
584 'because processes are instanced for every matching group. '
585 'Thus enforce delimiters outside the group.') % (char
, match
))
589 RulespecGroupCheckParametersDiscovery
,
590 varname
="inventory_processes_rules",
591 title
=_('Process Discovery'),
593 "This ruleset defines criteria for automatically creating checks for running processes "
594 "based upon what is running when the service discovery is done. These services will be "
595 "created with default parameters. They will get critical when no process is running and "
596 "OK otherwise. You can parameterize the check with the ruleset <i>State and count of processes</i>."
603 title
=_('Process Name'),
607 _('<p>The process name may contain one or more occurances of <tt>%s</tt>. If you do this, then the pattern must be a regular '
608 'expression and be prefixed with ~. For each <tt>%s</tt> in the description, the expression has to contain one "group". A group '
609 'is a subexpression enclosed in brackets, for example <tt>(.*)</tt> or <tt>([a-zA-Z]+)</tt> or <tt>(...)</tt>. When the inventory finds a process '
610 'matching the pattern, it will substitute all such groups with the actual values when creating the check. That way one '
611 'rule can create several checks on a host.</p>'
612 '<p>If the pattern contains more groups then occurrances of <tt>%s</tt> in the service description then only the first matching '
613 'subexpressions are used for the service descriptions. The matched substrings corresponding to the remaining groups '
614 'are copied into the regular expression, nevertheless.</p>'
615 '<p>As an alternative to <tt>%s</tt> you may also use <tt>%1</tt>, <tt>%2</tt>, etc. '
616 'These will be replaced by the first, second, ... matching group. This allows you to reorder things.</p>'
622 title
=_("Process Matching"),
626 title
=_("Exact name of the process without argments"),
627 label
=_("Executable:"),
634 validate
=forbid_re_delimiters_inside_groups
,
636 title
=_("Regular expression matching command line"),
637 label
=_("Command line:"),
639 _("This regex must match the <i>beginning</i> of the complete "
640 "command line of the process including arguments.<br>"
641 "When using groups, matches will be instantiated "
642 "during process discovery. e.g. (py.*) will match python, python_dev "
643 "and python_test and discover 3 services. At check time, because "
644 "python is a substring of python_test and python_dev it will aggregate"
645 "all process that start with python. If that is not the intended behavior "
646 "please use a delimiter like '$' or '\\b' around the group, e.g. (py.*)$"
648 forth
=lambda x
: x
[1:], # remove ~
649 back
=lambda x
: "~" + x
, # prefix ~
654 title
=_("Match all processes"),
657 match
=lambda x
: (not x
and 2) or (x
[0] == '~' and 1 or 0),
658 default_value
='/usr/sbin/foo')),
661 title
=_('Name of the User'),
667 title
=_("Match all users"),
670 title
=_('Exact name of the user'),
675 title
=_('Grab user from found processess'),
680 _('<p>The user specification can either be a user name (string). The inventory will then trigger only if that user matches '
681 'the user the process is running as and the resulting check will require that user. Alternatively you can specify '
682 '"grab user". If user is not selected the created check will not check for a specific user.</p>'
683 '<p>Specifying "grab user" makes the created check expect the process to run as the same user as during inventory: the user '
684 'name will be hardcoded into the check. In that case if you put %u into the service description, that will be replaced '
685 'by the actual user name during inventory. You need that if your rule might match for more than one user - your would '
686 'create duplicate services with the same description otherwise.</p><p>Windows users are specified by the namespace followed by '
687 'the actual user name. For example "\\\\NT AUTHORITY\\NETWORK SERVICE" or "\\\\CHKMKTEST\\Administrator".</p>'
692 title
=_("Add custom icon or action"),
694 "You can assign icons or actions to the found services in the status GUI."
699 title
=_("CPU rescale maximum load"),
700 help=_("CPU utilization is delivered by the Operating "
701 "System as a per CPU core basis. Thus each core contributes "
702 "with a 100% at full utilization, producing a maximum load "
703 "of N*100% (N=number of cores). For simplicity this maximum "
704 "can be rescaled down, making 100% the maximum and thinking "
705 "in terms of total CPU utilization."),
707 orientation
="vertical",
709 (True, _("100% is all cores at full load")),
711 _("<b>N</b> * 100% as each core contributes with 100% at full load")),
715 title
=_("Default parameters for detected services"),
717 _("Here you can select default parameters that are being set "
718 "for detected services. Note: the preferred way for setting parameters is to use "
719 "the rule set <a href='wato.py?varname=checkgroup_parameters%3Apsmode=edit_ruleset'> "
720 "State and Count of Processes</a> instead. "
721 "A change there will immediately be active, while a change in this rule "
722 "requires a re-discovery of the services."),
723 elements
=process_level_elements
,
726 required_keys
=["descr", "cpu_rescale_max"],
728 forth
=convert_inventory_processes
,
734 RulespecGroupCheckParametersDiscovery
,
735 varname
="inv_domino_tasks_rules",
736 title
=_('Lotus Domino Task Discovery'),
737 help=_("This rule controls the discovery of tasks on Lotus Domino systems. "
738 "Any changes later on require a host re-discovery"),
739 valuespec
=Dictionary(
743 title
=_('Service Description'),
746 _('<p>The service description may contain one or more occurances of <tt>%s</tt>. In this '
747 'case, the pattern must be a regular expression prefixed with ~. For each '
748 '<tt>%s</tt> in the description, the expression has to contain one "group". A group '
749 'is a subexpression enclosed in brackets, for example <tt>(.*)</tt> or '
750 '<tt>([a-zA-Z]+)</tt> or <tt>(...)</tt>. When the inventory finds a task '
751 'matching the pattern, it will substitute all such groups with the actual values when '
752 'creating the check. In this way one rule can create several checks on a host.</p>'
753 '<p>If the pattern contains more groups than occurrences of <tt>%s</tt> in the service '
754 'description, only the first matching subexpressions are used for the service '
755 'descriptions. The matched substrings corresponding to the remaining groups '
756 'are nevertheless copied into the regular expression.</p>'
757 '<p>As an alternative to <tt>%s</tt> you may also use <tt>%1</tt>, <tt>%2</tt>, etc. '
758 'These expressions will be replaced by the first, second, ... matching group, allowing '
759 'you to reorder things.</p>'),
764 title
=_("Task Matching"),
767 title
=_("Exact name of the task"),
775 title
=_("Regular expression matching command line"),
776 help=_("This regex must match the <i>beginning</i> of the task"),
777 forth
=lambda x
: x
[1:], # remove ~
778 back
=lambda x
: "~" + x
, # prefix ~
783 title
=_("Match all tasks"),
786 match
=lambda x
: (not x
and 2) or (x
[0] == '~' and 1 or 0),
787 default_value
='foo')),
792 _("Please note that if you specify and also if you modify levels here, the change is "
793 "activated only during an inventory. Saving this rule is not enough. This is due to "
794 "the nature of inventory rules."),
797 title
=_("Critical below"),
802 title
=_("Warning below"),
807 title
=_("Warning above"),
812 title
=_("Critical above"),
819 required_keys
=['match', 'levels', 'descr'],
825 RulespecGroupCheckParametersDiscovery
,
826 varname
="inventory_sap_values",
827 title
=_('SAP R/3 Single Value Inventory'),
828 valuespec
=Dictionary(
833 title
=_("Node Path Matching"),
836 title
=_("Exact path of the node"),
844 title
=_("Regular expression matching the path"),
845 help=_("This regex must match the <i>beginning</i> of the complete "
846 "path of the node as reported by the agent"),
847 forth
=lambda x
: x
[1:], # remove ~
848 back
=lambda x
: "~" + x
, # prefix ~
853 title
=_("Match all nodes"),
856 match
=lambda x
: (not x
and 2) or (x
[0] == '~' and 1 or 0),
858 'SAP CCMS Monitor Templates/Dialog Overview/Dialog Response Time/ResponseTime')
860 ('limit_item_levels',
862 title
=_("Limit Path Levels for Service Names"),
863 unit
=_('path levels'),
866 _("The service descriptions of the inventorized services are named like the paths "
867 "in SAP. You can use this option to let the inventory function only use the last "
868 "x path levels for naming."),
871 optional_keys
=['limit_item_levels'],
877 RulespecGroupCheckParametersDiscovery
,
878 varname
="sap_value_groups",
879 title
=_('SAP Value Grouping Patterns'),
880 help=_('The check <tt>sap.value</tt> normally creates one service for each SAP value. '
881 'By defining grouping patterns, you can switch to the check <tt>sap.value-groups</tt>. '
882 'That check monitors a list of SAP values at once.'),
885 help=_("This defines one value grouping pattern"),
887 orientation
="horizontal",
889 TextAscii(title
=_("Name of group"),),
892 orientation
="vertical",
895 title
=_("Include Pattern"),
899 title
=_("Exclude Pattern"),
906 add_label
=_("Add pattern group"),
912 RulespecGroupCheckParametersDiscovery
,
913 varname
="inventory_heartbeat_crm_rules",
914 title
=_("Heartbeat CRM Discovery"),
915 valuespec
=Dictionary(
919 title
=_("Naildown the DC"),
920 label
=_("Mark the currently distinguished controller as preferred one"),
922 "Nails down the DC to the node which is the DC during discovery. The check "
923 "will report CRITICAL when another node becomes the DC during later checks."))
925 ("naildown_resources",
927 title
=_("Naildown the resources"),
928 label
=_("Mark the nodes of the resources as preferred one"),
930 "Nails down the resources to the node which is holding them during discovery. "
931 "The check will report CRITICAL when another holds the resource during later checks."
934 help=_('This rule can be used to control the discovery for Heartbeat CRM checks.'),
941 RulespecGroupCheckParametersDiscovery
,
942 varname
="inventory_df_rules",
943 title
=_("Discovery parameters for filesystem checks"),
944 valuespec
=Dictionary(
946 ("include_volume_name", Checkbox(title
=_("Include Volume name in item"))),
949 title
=_("Filesystem types to ignore"),
955 ("iso9660", "iso9660"),
957 default_value
=["tmpfs", "nfs", "smbfs", "cifs", "iso9660"])),
958 ("never_ignore_mountpoints",
961 title
=_(u
"Mountpoints to never ignore"),
963 u
"Regardless of filesystem type, these mountpoints will always be discovered."
964 u
"Globbing or regular expressions are currently not supported."),
971 RulespecGroupCheckParametersDiscovery
,
972 varname
="inventory_mssql_counters_rules",
973 title
=_("Include MSSQL Counters services"),
974 valuespec
=Dictionary(
976 ("add_zero_based_services", Checkbox(title
=_("Include service with zero base."))),
983 RulespecGroupCheckParametersDiscovery
,
984 varname
="inventory_fujitsu_ca_ports",
985 title
=_("Discovery of Fujtsu storage CA ports"),
986 valuespec
=Dictionary(
988 ("indices", ListOfStrings(title
=_("CA port indices"))),
991 title
=_("CA port modes"),
996 ("Initiator", _("Initiator")),
1006 RulespecGroupCheckParametersDiscovery
,
1007 varname
="discovery_mssql_backup",
1008 title
=_("Discovery of MSSQL backup"),
1009 valuespec
=Dictionary(
1013 title
=_("Backup modes"),
1015 ("summary", _("Create a service for each instance")),
1016 ("per_type", _("Create a service for each instance and backup type")),
1023 # .--Applications--------------------------------------------------------.
1025 # | / \ _ __ _ __ | (_) ___ __ _| |_(_) ___ _ __ ___ |
1026 # | / _ \ | '_ \| '_ \| | |/ __/ _` | __| |/ _ \| '_ \/ __| |
1027 # | / ___ \| |_) | |_) | | | (_| (_| | |_| | (_) | | | \__ \ |
1028 # | /_/ \_\ .__/| .__/|_|_|\___\__,_|\__|_|\___/|_| |_|___/ |
1030 # '----------------------------------------------------------------------'
1033 RulespecGroupCheckParametersApplications
,
1034 varname
="logwatch_rules",
1035 title
=_('Logwatch Patterns'),
1036 valuespec
=Transform(
1039 ("reclassify_patterns",
1042 help=_("This defines one logfile pattern rule"),
1044 orientation
="horizontal",
1049 ('C', _('CRITICAL')),
1050 ('W', _('WARNING')),
1056 title
=_("Pattern (Regex)"),
1065 title
=_("Reclassify state matching regex pattern"),
1067 _('<p>You can define one or several patterns (regular expressions) in each logfile pattern rule. '
1068 'These patterns are applied to the selected logfiles to reclassify the '
1069 'matching log messages. The first pattern which matches a line will '
1070 'be used for reclassifying a message. You can use the '
1071 '<a href="wato.py?mode=pattern_editor">Logfile Pattern Analyzer</a> '
1072 'to test the rules you defined here.</p>'
1073 '<p>Select "Ignore" as state to get the matching logs deleted. Other states will keep the '
1074 'log entries but reclassify the state of them.</p>'),
1075 add_label
=_("Add pattern"),
1077 ("reclassify_states",
1079 title
=_("Reclassify complete state"),
1081 "This setting allows you to convert all incoming states to another state. "
1082 "The option is applied before the state conversion via regexes. So the regex values can "
1083 "modify the state even further."),
1087 title
=_("Change CRITICAL State to"),
1089 ('C', _('CRITICAL')),
1090 ('W', _('WARNING')),
1093 ('.', _('Context Info')),
1099 title
=_("Change WARNING State to"),
1101 ('C', _('CRITICAL')),
1102 ('W', _('WARNING')),
1105 ('.', _('Context Info')),
1111 title
=_("Change OK State to"),
1113 ('C', _('CRITICAL')),
1114 ('W', _('WARNING')),
1117 ('.', _('Context Info')),
1123 title
=_("Change Context Info to"),
1125 ('C', _('CRITICAL')),
1126 ('W', _('WARNING')),
1129 ('.', _('Context Info')),
1134 optional_keys
=False,
1137 optional_keys
=["reclassify_states"],
1139 forth
=lambda x
: isinstance(x
, dict) and x
or {"reclassify_patterns": x
}),
1142 itemhelp
=_("Put the item names of the logfiles here. For example \"System$\" "
1143 "to select the service \"LOG System\". You can use regular "
1144 "expressions which must match the beginning of the logfile name."),
1149 # .--Environment---------------------------------------------------------.
1151 # | | ____|_ ____ _(_)_ __ ___ _ __ _ __ ___ ___ _ __ | |_ |
1152 # | | _| | '_ \ \ / / | '__/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| |
1153 # | | |___| | | \ V /| | | | (_) | | | | | | | | | __/ | | | |_ |
1154 # | |_____|_| |_|\_/ |_|_| \___/|_| |_|_| |_| |_|\___|_| |_|\__| |
1156 # '----------------------------------------------------------------------'
1158 register_check_parameters(
1159 RulespecGroupCheckParametersEnvironment
,
1161 _("Voltage Sensor"),
1163 title
=_("Voltage Sensor"),
1168 title
=_("Upper Levels for Voltage"),
1170 Float(title
=_("Warning at"), default_value
=15.00, unit
="V"),
1171 Float(title
=_("Critical at"), default_value
=16.00, unit
="V"),
1175 title
=_("Lower Levels for Voltage"),
1177 Float(title
=_("Warning below"), default_value
=10.00, unit
="V"),
1178 Float(title
=_("Critical below"), default_value
=9.00, unit
="V"),
1181 TextAscii(title
=_("Sensor Description and Index"),),
1185 register_check_parameters(
1186 RulespecGroupCheckParametersEnvironment
,
1188 _("Number of fan failures"),
1190 title
=_("Number of fan failures"),
1192 Integer(title
="Warning at", default_value
=1),
1193 Integer(title
="Critical at", default_value
=2),
1199 register_check_parameters(
1200 RulespecGroupCheckParametersEnvironment
,
1202 _("Lock Voltage for PLLs"),
1204 help=_("PLL lock voltages by freqency"),
1210 Float(title
=_("Frequencies up to"), unit
=u
"MHz"),
1211 Float(title
=_("Warning below"), unit
=u
"V"),
1212 Float(title
=_("Critical below"), unit
=u
"V"),
1213 Float(title
=_("Warning at or above"), unit
=u
"V"),
1214 Float(title
=_("Critical at or above"), unit
=u
"V"),
1216 title
=_("Lock voltages for RX PLL"),
1217 help=_("Specify frequency ranges by the upper boundary of the range "
1218 "to which the voltage levels are to apply. The list is sorted "
1219 "automatically when saving."),
1225 Float(title
=_("Frequencies up to"), unit
=u
"MHz"),
1226 Float(title
=_("Warning below"), unit
=u
"V"),
1227 Float(title
=_("Critical below"), unit
=u
"V"),
1228 Float(title
=_("Warning at or above"), unit
=u
"V"),
1229 Float(title
=_("Critical at or above"), unit
=u
"V"),
1231 title
=_("Lock voltages for TX PLL"),
1232 help=_("Specify frequency ranges by the upper boundary of the range "
1233 "to which the voltage levels are to apply. The list is sorted "
1234 "automatically when saving."),
1237 optional_keys
=["rx", "tx"],
1239 DropdownChoice(title
=_("RX/TX"), choices
=[("RX", _("RX")), ("TX", _("TX"))]),
1243 register_check_parameters(
1244 RulespecGroupCheckParametersEnvironment
,
1251 Tuple(elements
=[TextAscii(), MonitoringState()]),
1252 title
=_("Set states of IPMI sensor status texts"),
1253 help=_("The pattern specified here must match exactly the beginning of "
1254 "the sensor state (case sensitive)."),
1255 orientation
="horizontal",
1259 title
=_("Ignore the following IPMI sensors"),
1260 help=_("Names of IPMI sensors that should be ignored during discovery "
1261 "and when summarizing."
1262 "The pattern specified here must match exactly the beginning of "
1263 "the actual sensor name (case sensitive)."),
1264 orientation
="horizontal")),
1265 ("ignored_sensorstates",
1267 title
=_("Ignore the following IPMI sensor states"),
1268 help=_("IPMI sensors with these states that should be ignored during discovery "
1269 "and when summarizing."
1270 "The pattern specified here must match exactly the beginning of "
1271 "the actual sensor name (case sensitive)."),
1272 orientation
="horizontal",
1273 default_value
=["nr", "ns"])),
1274 ("numerical_sensor_levels",
1279 title
=_("Sensor name (only summary)"),
1281 "In summary mode you have to state the sensor name. "
1282 "In single mode the sensor name comes from service description.")),
1283 Dictionary(elements
=[
1285 Tuple(title
=_("Lower levels"), elements
=[Float(), Float()])),
1287 Tuple(title
=_("Upper levels"), elements
=[Float(), Float()])),
1290 title
=_("Set lower and upper levels for numerical sensors"))),
1292 ignored_keys
=["ignored_sensors", "ignored_sensor_states"],
1294 TextAscii(title
=_("The sensor name")),
1298 register_check_parameters(
1299 RulespecGroupCheckParametersEnvironment
,
1301 _("Output Voltage of Power Supplies"),
1304 Float(title
=_("Warning below"), unit
=u
"V"),
1305 Float(title
=_("Critical below"), unit
=u
"V"),
1306 Float(title
=_("Warning at or above"), unit
=u
"V"),
1307 Float(title
=_("Critical at or above"), unit
=u
"V"),
1313 bvip_link_states
= [
1315 (1, "10 MBit - HalfDuplex"),
1316 (2, "10 MBit - FullDuplex"),
1317 (3, "100 Mbit - HalfDuplex"),
1318 (4, "100 Mbit - FullDuplex"),
1319 (5, "1 Gbit - FullDuplex"),
1323 register_check_parameters(
1324 RulespecGroupCheckParametersEnvironment
,
1326 _("Allowed Network states on Bosch IP Cameras"),
1328 title
=_("Update State"),
1332 title
=_("States which result in OK"),
1333 choices
=bvip_link_states
,
1334 default_value
=[0, 4, 5])),
1337 title
=_("States which result in Warning"),
1338 choices
=bvip_link_states
,
1339 default_value
=[7])),
1342 title
=_("States which result in Critical"),
1343 choices
=bvip_link_states
,
1344 default_value
=[1, 2, 3])),
1352 register_check_parameters(
1353 RulespecGroupCheckParametersEnvironment
,
1355 _("Electrical Current of Overcurrent Protectors"),
1358 Float(title
=_("Warning at"), unit
=u
"A", default_value
=14.0),
1359 Float(title
=_("Critical at"), unit
=u
"A", default_value
=15.0),
1361 TextAscii(title
=_("The Index of the Overcurrent Protector")),
1365 register_check_parameters(
1366 RulespecGroupCheckParametersEnvironment
,
1368 _("Brightness Levels"),
1370 title
=_("Brightness"),
1373 default_difference
=(2.0, 4.0),
1374 default_levels
=(50.0, 100.0),
1377 title
=_("Sensor name"),
1378 help=_("The identifier of the sensor."),
1383 register_check_parameters(
1384 RulespecGroupCheckParametersEnvironment
,
1386 _("Motion Detectors"),
1387 Dictionary(elements
=[
1390 title
=_("Time periods"),
1391 help=_("Specifiy time ranges during which no motion is expected. "
1392 "Outside these times, the motion detector will always be in "
1394 elements
=[(day_id
, ListOfTimeRanges(title
=day_str
))
1395 for day_id
, day_str
in defines
.weekdays_by_name()],
1399 title
=_("Sensor name"),
1400 help=_("The identifier of the sensor."),
1404 register_check_parameters(
1405 RulespecGroupCheckParametersEnvironment
,
1407 _("eWON SNMP Proxy"),
1409 title
=_("Device Type"),
1410 help=_("The eWON router can act as a proxy to metrics from a secondary non-snmp device."
1411 "Here you can make settings to the monitoring of the proxied device."),
1412 elements
=[("oxyreduct",
1414 title
=_("Wagner OxyReduct"),
1415 elements
=[("o2_levels",
1417 title
=_("O2 levels"),
1419 Percentage(title
=_("Warning at"), default_value
=16.0),
1420 Percentage(title
=_("Critical at"), default_value
=17.0),
1421 Percentage(title
=_("Warning below"), default_value
=14.0),
1422 Percentage(title
=_("Critical below"), default_value
=13.0),
1425 title
=_("Item name"),
1426 help=_("The item name. The meaning of this depends on the proxied device: "
1427 "- Wagner OxyReduct: Name of the room/protection zone")),
1430 register_check_parameters(
1431 RulespecGroupCheckParametersEnvironment
,
1432 "lamp_operation_time",
1433 _("Beamer lamp operation time"),
1435 Age(title
=_("Warning at"), default_value
=1000 * 3600, display
=["hours"]),
1436 Age(title
=_("Critical at"), default_value
=1500 * 3600, display
=["hours"]),
1443 def transform_apc_symmetra(params
):
1444 if isinstance(params
, (list, tuple)):
1445 params
= {"levels": params
}
1447 if "levels" in params
and len(params
["levels"]) > 2:
1448 cap
= float(params
["levels"][0])
1449 params
["capacity"] = (cap
, cap
)
1450 del params
["levels"]
1452 if "output_load" in params
:
1453 del params
["output_load"]
1458 register_check_parameters(
1459 RulespecGroupCheckParametersEnvironment
, "apc_symentra", _("APC Symmetra Checks"),
1465 title
=_("Levels of battery capacity"),
1468 title
=_("Warning below"),
1472 title
=_("Critical below"),
1476 ("calibration_state",
1478 title
=_("State if calibration is invalid"),
1481 ("post_calibration_levels",
1483 title
=_("Levels of battery parameters after calibration"),
1485 "After a battery calibration the battery capacity is reduced until the "
1486 "battery is fully charged again. Here you can specify an alternative "
1487 "lower level in this post-calibration phase. "
1488 "Since apc devices remember the time of the last calibration only "
1489 "as a date, the alternative lower level will be applied on the whole "
1490 "day of the calibration until midnight. You can extend this time period "
1491 "with an additional time span to make sure calibrations occuring just "
1492 "before midnight do not trigger false alarms."),
1496 title
=_("Alternative critical battery capacity after calibration"),
1499 ("additional_time_span",
1501 title
=("Extend post-calibration phase by additional time span"),
1506 optional_keys
=False,
1510 title
=_("Time left on battery"),
1512 Age(title
=_("Warning at"),
1514 _("Time left on Battery at and below which a warning state is triggered"
1517 display
=["hours", "minutes"]),
1518 Age(title
=_("Critical at"),
1520 _("Time Left on Battery at and below which a critical state is triggered"
1523 display
=["hours", "minutes"]),
1526 ("battery_replace_state",
1528 title
=_("State if battery needs replacement"),
1532 optional_keys
=['post_calibration_levels', 'output_load', 'battime'],
1534 forth
=transform_apc_symmetra
,
1537 register_check_parameters(
1538 RulespecGroupCheckParametersEnvironment
,
1540 _("Power Supply Unit"),
1545 title
=_("PSU Capacity Levels"),
1547 Percentage(title
=_("Warning at"), default_value
=80.0),
1548 Percentage(title
=_("Critical at"), default_value
=90.0),
1552 TextAscii(title
=_("PSU (Chassis/Bay)")),
1556 # .--Storage-------------------------------------------------------------.
1558 # | / ___|| |_ ___ _ __ __ _ __ _ ___ |
1559 # | \___ \| __/ _ \| '__/ _` |/ _` |/ _ \ |
1560 # | ___) | || (_) | | | (_| | (_| | __/ |
1561 # | |____/ \__\___/|_| \__,_|\__, |\___| |
1563 # '----------------------------------------------------------------------'
1565 register_check_parameters(
1566 RulespecGroupCheckParametersStorage
,
1568 _("Number of disk failures"),
1570 title
=_("Number of disk failures"),
1572 Integer(title
="Warning at", default_value
=1),
1573 Integer(title
="Critical at", default_value
=2),
1579 register_check_parameters(
1580 RulespecGroupCheckParametersStorage
, "ddn_s2a_port_errors", _("Port errors of DDN S2A devices"),
1583 ("link_failure_errs",
1585 title
=_(u
"Link failure errors"),
1587 Integer(title
=_(u
"Warning at")),
1588 Integer(title
=_(u
"Critical at")),
1592 title
=_(u
"Lost synchronization errors"),
1594 Integer(title
=_(u
"Warning at")),
1595 Integer(title
=_(u
"Critical at")),
1597 ("loss_of_signal_errs",
1599 title
=_(u
"Loss of signal errors"),
1601 Integer(title
=_(u
"Warning at")),
1602 Integer(title
=_(u
"Critical at")),
1606 title
=_(u
"PrimSeq erros"),
1608 Integer(title
=_(u
"Warning at")),
1609 Integer(title
=_(u
"Critical at")),
1613 title
=_(u
"CRC errors"),
1615 Integer(title
=_(u
"Warning at")),
1616 Integer(title
=_(u
"Critical at")),
1620 title
=_(u
"Receive errors"),
1622 Integer(title
=_(u
"Warning at")),
1623 Integer(title
=_(u
"Critical at")),
1627 title
=_(u
"CTIO timeouts"),
1629 Integer(title
=_(u
"Warning at")),
1630 Integer(title
=_(u
"Critical at")),
1634 title
=_(u
"CTIO transmission errors"),
1636 Integer(title
=_(u
"Warning at")),
1637 Integer(title
=_(u
"Critical at")),
1641 title
=_(u
"other CTIO errors"),
1643 Integer(title
=_(u
"Warning at")),
1644 Integer(title
=_(u
"Critical at")),
1646 ],), TextAscii(title
="Port index"), "dict")
1648 register_check_parameters(
1649 RulespecGroupCheckParametersStorage
, "read_hits", _(u
"Read prefetch hits for DDN S2A devices"),
1651 title
=_(u
"Prefetch hits"),
1653 Float(title
=_(u
"Warning below"), default_value
=95.0),
1654 Float(title
=_(u
"Critical below"), default_value
=90.0),
1655 ]), TextAscii(title
=_(u
"Port index or 'Total'")), "first")
1657 register_check_parameters(
1658 RulespecGroupCheckParametersStorage
, "storage_iops", _(u
"I/O operations for DDN S2A devices"),
1659 Dictionary(elements
=[
1662 title
=_(u
"Read IO operations per second"),
1664 Float(title
=_(u
"Warning at"), unit
="1/s"),
1665 Float(title
=_(u
"Critical at"), unit
="1/s"),
1669 title
=_(u
"Write IO operations per second"),
1671 Float(title
=_(u
"Warning at"), unit
="1/s"),
1672 Float(title
=_(u
"Critical at"), unit
="1/s"),
1676 title
=_(u
"Total IO operations per second"),
1678 Float(title
=_(u
"Warning at"), unit
="1/s"),
1679 Float(title
=_(u
"Critical at"), unit
="1/s"),
1681 ]), TextAscii(title
=_(u
"Port index or 'Total'")), "dict")
1683 register_check_parameters(
1684 RulespecGroupCheckParametersStorage
, "storage_throughput", _(u
"Throughput for DDN S2A devices"),
1685 Dictionary(elements
=[
1688 title
=_(u
"Read throughput per second"),
1690 Filesize(title
=_(u
"Warning at")),
1691 Filesize(title
=_(u
"Critical at")),
1695 title
=_(u
"Write throughput per second"),
1697 Filesize(title
=_(u
"Warning at")),
1698 Filesize(title
=_(u
"Critical at")),
1702 title
=_(u
"Total throughput per second"),
1704 Filesize(title
=_(u
"Warning at")),
1705 Filesize(title
=_(u
"Critical at")),
1707 ]), TextAscii(title
=_(u
"Port index or 'Total'")), "dict")
1709 register_check_parameters(
1710 RulespecGroupCheckParametersStorage
, "ddn_s2a_wait", _(u
"Read/write wait for DDN S2A devices"),
1711 Dictionary(elements
=[
1714 title
=_(u
"Read wait average"),
1716 Float(title
=_(u
"Warning at"), unit
="s"),
1717 Float(title
=_(u
"Critical at"), unit
="s"),
1721 title
=_(u
"Read wait minimum"),
1723 Float(title
=_(u
"Warning at"), unit
="s"),
1724 Float(title
=_(u
"Critical at"), unit
="s"),
1728 title
=_(u
"Read wait maximum"),
1730 Float(title
=_(u
"Warning at"), unit
="s"),
1731 Float(title
=_(u
"Critical at"), unit
="s"),
1735 title
=_(u
"Write wait average"),
1737 Float(title
=_(u
"Warning at"), unit
="s"),
1738 Float(title
=_(u
"Critical at"), unit
="s"),
1742 title
=_(u
"Write wait minimum"),
1744 Float(title
=_(u
"Warning at"), unit
="s"),
1745 Float(title
=_(u
"Critical at"), unit
="s"),
1749 title
=_(u
"Write wait maximum"),
1751 Float(title
=_(u
"Warning at"), unit
="s"),
1752 Float(title
=_(u
"Critical at"), unit
="s"),
1755 DropdownChoice(title
=_(u
"Host or Disk"), choices
=[
1756 ("Disk", _(u
"Disk")),
1757 ("Host", _(u
"Host")),
1760 register_check_parameters(
1761 RulespecGroupCheckParametersStorage
,
1763 _("Remaining blank tapes in DIVA CSM Devices"),
1766 Integer(title
=_("Warning below"), default_value
=5),
1767 Integer(title
=_("Critical below"), default_value
=1),
1773 register_check_parameters(
1774 RulespecGroupCheckParametersStorage
,
1776 _("MongoDB Flushes"),
1777 Dictionary(elements
=[
1781 title
=_("Average flush time"),
1783 Integer(title
=_("Warning at"), unit
="ms", default_value
=50),
1784 Integer(title
=_("Critical at"), unit
="ms", default_value
=100),
1785 Integer(title
=_("Time interval"), unit
="minutes", default_value
=10),
1791 title
=_("Last flush time"),
1793 Integer(title
=_("Warning at"), unit
="ms", default_value
=50),
1794 Integer(title
=_("Critical at"), unit
="ms", default_value
=100),
1801 register_check_parameters(
1802 RulespecGroupCheckParametersStorage
,
1804 _("MongoDB Assert Rates"),
1806 elements
=[("%s_assert_rate" % what
,
1808 title
=_("%s rate") % what
.title(),
1810 Float(title
=_("Warning at"), unit
=_("Asserts / s"), default_value
=1.0),
1811 Float(title
=_("Critical at"), unit
=_("Asserts / s"), default_value
=2.0),
1812 ])) for what
in ["msg", "rollovers", "regular", "warning", "user"]],),
1816 register_check_parameters(
1817 RulespecGroupCheckParametersStorage
,
1819 _("MongoDB Memory"),
1821 title
=_("MongoDB Memory"),
1825 title
=_("Resident memory usage"),
1827 _("The value of resident is roughly equivalent to the amount of RAM, "
1828 "currently used by the database process. In normal use this value tends to grow. "
1829 "In dedicated database servers this number tends to approach the total amount of system memory."
1832 Filesize(title
=_("Warning at"), default_value
=1 * 1024**3),
1833 Filesize(title
=_("Critical at"), default_value
=2 * 1024**3),
1838 title
=_("Mapped memory usage"),
1840 "The value of mapped shows the amount of mapped memory by the database. "
1841 "Because MongoDB uses memory-mapped files, this value is likely to be to be "
1842 "roughly equivalent to the total size of your database or databases."),
1844 Filesize(title
=_("Warning at"), default_value
=1 * 1024**3),
1845 Filesize(title
=_("Critical at"), default_value
=2 * 1024**3),
1850 title
=_("Virtual memory usage"),
1852 "Virtual displays the quantity of virtual memory used by the mongod process. "
1855 Filesize(title
=_("Warning at"), default_value
=2 * 1024**3),
1856 Filesize(title
=_("Critical at"), default_value
=4 * 1024**3),
1863 register_check_parameters(
1864 RulespecGroupCheckParametersStorage
,
1865 "openhardwaremonitor_smart",
1866 _("OpenHardwareMonitor S.M.A.R.T."),
1867 Dictionary(elements
=[
1870 title
=_("Remaining Life"),
1871 help=_("Estimated remaining health of the disk based on other readings."),
1873 Percentage(title
=_("Warning below"), default_value
=30),
1874 Percentage(title
=_("Critical below"), default_value
=10),
1879 title
=_("Device Name"),
1880 help=_("Name of the Hard Disk as reported by OHM: hdd0, hdd1, ..."),
1884 register_check_parameters(
1885 RulespecGroupCheckParametersStorage
,
1889 elements
=[("%s_locks" % what
,
1891 title
=_("%s Locks") % what
.title().replace("_", " "),
1893 Integer(title
=_("Warning at"), minvalue
=0),
1894 Integer(title
=_("Critical at"), minvalue
=0),
1896 "clients_readers", "clients_writers", "clients_total", "queue_readers",
1897 "queue_writers", "queue_total"
1902 register_check_parameters(
1903 RulespecGroupCheckParametersStorage
,
1907 elements
=[("levels",
1909 title
=_("Usage levels"),
1910 default_value
=(80.0, 90.0),
1913 title
=_("Specify levels in percentage of total space"),
1915 Percentage(title
=_("Warning at"), unit
=_("%")),
1916 Percentage(title
=_("Critical at"), unit
=_("%"))
1919 title
=_("Specify levels in absolute usage"),
1922 title
=_("Warning at"), default_value
=1000 * 1024 * 1024),
1924 title
=_("Critical at"), default_value
=5000 * 1024 * 1024)
1929 title
=_("Container Name"),
1930 help=_("Name of the container"),
1934 register_check_parameters(
1935 RulespecGroupCheckParametersStorage
,
1937 _("INotify Levels"),
1939 help=_("This rule allows you to set levels for specific Inotify changes. "
1940 "Keep in mind that you can only monitor operations which are actually "
1941 "enabled in the Inotify plugin. So it might be a good idea to cross check "
1942 "these levels here with the configuration rule in the agent bakery. "),
1944 ('age_last_operation',
1949 title
=_("INotify Operation"),
1951 ("create", _("Create")),
1952 ("delete", _("Delete")),
1953 ("open", _("Open")),
1954 ("modify", _("Modify")),
1955 ("access", _("Access")),
1956 ("movedfrom", _("Moved from")),
1957 ("movedto", _("Moved to")),
1958 ("moveself", _("Move self")),
1960 Age(title
=_("Warning at")),
1961 Age(title
=_("Critical at")),
1963 title
=_("Age of last operation"),
1968 TextAscii(title
=_("The filesystem path, prefixed with <i>File </i> or <i>Folder </i>"),),
1971 register_check_parameters(
1972 RulespecGroupCheckParametersStorage
,
1974 _("EMC VNX Enclosures"),
1975 Dictionary(elements
=[
1976 ("state_read_error",
1978 title
=_("State on hard read error"),
1985 title
=_("Minimum error count"),
1989 ("state_write_error",
1991 title
=_("State on hard write error"),
1998 title
=_("Minimum error count"),
2002 ("state_rebuilding",
2003 MonitoringState(default_value
=1, title
=_("State when rebuildung enclosure"))),
2005 TextAscii(title
=_("Enclosure ID"), allow_empty
=True),
2009 register_check_parameters(
2010 RulespecGroupCheckParametersStorage
,
2012 _("Logical Volume Pools (LVM)"),
2013 Dictionary(elements
=[
2017 title
=_("Levels for Meta"),
2018 default_value
=(80.0, 90.0),
2020 Percentage(title
=_("Warning at"), unit
=_("%")),
2021 Percentage(title
=_("Critical at"), unit
=_("%"))
2027 title
=_("Levels for Data"),
2028 default_value
=(80.0, 90.0),
2030 Percentage(title
=_("Warning at"), unit
=_("%")),
2031 Percentage(title
=_("Critical at"), unit
=_("%"))
2036 title
=_("Logical Volume Pool"),
2041 register_check_parameters(
2042 RulespecGroupCheckParametersStorage
,
2043 "emcvnx_storage_pools",
2044 _("EMC VNX storage pools"),
2045 Dictionary(elements
=[
2048 title
=_("Upper levels for physical capacity in percent"),
2050 Percentage(title
=_("Warning at"), default_value
=70.0),
2051 Percentage(title
=_("Critical at"), default_value
=90.0),
2054 TextAscii(title
=_("Pool name")),
2058 register_check_parameters(
2059 RulespecGroupCheckParametersStorage
,
2060 "emcvnx_storage_pools_tiering",
2061 _("EMC VNX storage pools tiering"),
2062 Dictionary(elements
=[
2063 ("time_to_complete",
2065 title
=_("Upper levels for estimated time to complete"),
2067 Age(title
=_("Warning at"), default_value
=300 * 60 * 60),
2068 Age(title
=_("Critical at"), default_value
=350 * 60 * 60),
2071 TextAscii(title
=_("Pool name")),
2075 register_check_parameters(
2076 RulespecGroupCheckParametersStorage
,
2079 Dictionary(elements
=[
2084 default_value
=(80.0, 90.0),
2086 Percentage(title
=_("Warning at"), unit
=_("%")),
2087 Percentage(title
=_("Critical at"), unit
=_("%"))
2094 register_check_parameters(
2095 RulespecGroupCheckParametersStorage
,
2097 _("Brocade FibreChannel ports"),
2102 title
=_("Throughput levels"),
2103 help=_("Please note: in a few cases the automatic detection of the link speed "
2104 "does not work. In these cases you have to set the link speed manually "
2105 "below if you want to monitor percentage values"),
2108 title
=_("Used bandwidth of port relative to the link speed"),
2110 Percentage(title
=_("Warning at"), unit
=_("percent")),
2111 Percentage(title
=_("Critical at"), unit
=_("percent")),
2114 title
=_("Used Bandwidth of port in megabyte/s"),
2116 Integer(title
=_("Warning at"), unit
=_("MByte/s")),
2117 Integer(title
=_("Critical at"), unit
=_("MByte/s")),
2122 title
=_("Assumed link speed"),
2123 help=_("If the automatic detection of the link speed does "
2124 "not work you can set the link speed here."),
2125 unit
=_("GByte/s"))),
2128 title
=_("CRC errors rate"),
2130 Percentage(title
=_("Warning at"), unit
=_("percent")),
2131 Percentage(title
=_("Critical at"), unit
=_("percent")),
2135 title
=_("Enc-Out frames rate"),
2137 Percentage(title
=_("Warning at"), unit
=_("percent")),
2138 Percentage(title
=_("Critical at"), unit
=_("percent")),
2142 title
=_("Enc-In frames rate"),
2144 Percentage(title
=_("Warning at"), unit
=_("percent")),
2145 Percentage(title
=_("Critical at"), unit
=_("percent")),
2149 title
=_("No-TxCredits errors"),
2151 Percentage(title
=_("Warning at"), unit
=_("percent")),
2152 Percentage(title
=_("Critical at"), unit
=_("percent")),
2156 title
=_("C3 discards"),
2158 Percentage(title
=_("Warning at"), unit
=_("percent")),
2159 Percentage(title
=_("Critical at"), unit
=_("percent")),
2163 title
=_("Averaging"),
2165 "If this parameter is set, all throughputs will be averaged "
2166 "over the specified time interval before levels are being applied. Per "
2167 "default, averaging is turned off. "),
2175 title
=_("Allowed states (otherwise check will be critical)"),
2178 (2, _("noTransceiver")),
2179 (3, _("laserFault")),
2183 (7, _("portFault")),
2184 (8, _("diagFault")),
2187 title
=_("Physical state of port"),
2189 label
=_("ignore physical state"),
2194 title
=_("Allowed states (otherwise check will be critical)"),
2202 title
=_("Operational state"),
2204 label
=_("ignore operational state"),
2209 title
=_("Allowed states (otherwise check will be critical)"),
2216 title
=_("Administrative state"),
2218 label
=_("ignore administrative state"),
2221 title
=_("port name"),
2222 help=_("The name of the switch port"),
2227 register_check_parameters(
2228 RulespecGroupCheckParametersStorage
, "brocade_sfp", _("Brocade SFPs"),
2229 Dictionary(elements
=[
2232 title
=_("Rx power level"),
2234 Float(title
=_("Critical below"), unit
=_("dBm")),
2235 Float(title
=_("Warning below"), unit
=_("dBm")),
2236 Float(title
=_("Warning at"), unit
=_("dBm")),
2237 Float(title
=_("Critical at"), unit
=_("dBm"))
2241 title
=_("Tx power level"),
2243 Float(title
=_("Critical below"), unit
=_("dBm")),
2244 Float(title
=_("Warning below"), unit
=_("dBm")),
2245 Float(title
=_("Warning at"), unit
=_("dBm")),
2246 Float(title
=_("Critical at"), unit
=_("dBm"))
2248 ]), TextAscii(title
=_("Port index")), "dict")
2250 register_check_parameters(
2251 RulespecGroupCheckParametersStorage
, "fcport_words", _("Atto Fibrebridge FC port"),
2253 title
=_("Levels for transmitted and received words"),
2255 ("fc_tx_words", Levels(title
=_("Tx"), unit
=_("words/s"))),
2256 ("fc_rx_words", Levels(title
=_("Rx"), unit
=_("words/s"))),
2258 ), TextAscii(title
=_("Port index"),), "dict")
2260 register_check_parameters(
2261 RulespecGroupCheckParametersStorage
, "fs_mount_options",
2262 _("Filesystem mount options (Linux/UNIX)"),
2264 title
=_("Expected mount options"),
2265 help=_("Specify all expected mount options here. If the list of "
2266 "actually found options differs from this list, the check will go "
2267 "warning or critical. Just the option <tt>commit</tt> is being "
2268 "ignored since it is modified by the power saving algorithms."),
2269 valuespec
=TextUnicode(),
2270 ), TextAscii(title
=_("Mount point"), allow_empty
=False), "first")
2272 register_check_parameters(
2273 RulespecGroupCheckParametersStorage
, "storcli_vdrives", _("LSI RAID VDrives (StorCLI)"),
2275 title
=_("Evaluation of VDrive States"),
2277 ("Optimal", MonitoringState(
2278 title
=_("State for <i>Optimal</i>"),
2281 ("Partially Degraded",
2283 title
=_("State for <i>Partially Degraded</i>"),
2286 ("Degraded", MonitoringState(
2287 title
=_("State for <i>Degraded</i>"),
2290 ("Offline", MonitoringState(
2291 title
=_("State for <i>Offline</i>"),
2294 ("Recovery", MonitoringState(
2295 title
=_("State for <i>Recovery</i>"),
2299 title
=_("Virtual Drive"),
2303 register_check_parameters(
2304 RulespecGroupCheckParametersStorage
, "storcli_pdisks", _("LSI RAID physical disks (StorCLI)"),
2306 title
=_("Evaluation of PDisk States"),
2308 ("Dedicated Hot Spare",
2310 title
=_("State for <i>Dedicated Hot Spare</i>"),
2313 ("Global Hot Spare",
2315 title
=_("State for <i>Global Hot Spare</i>"),
2318 ("Unconfigured Good",
2320 title
=_("State for <i>Unconfigured Good</i>"),
2323 ("Unconfigured Bad",
2325 title
=_("State for <i>Unconfigured Bad</i>"),
2328 ("Online", MonitoringState(
2329 title
=_("State for <i>Online</i>"),
2332 ("Offline", MonitoringState(
2333 title
=_("State for <i>Offline</i>"),
2337 title
=_("PDisk EID:Slot-Device"),
2341 register_check_parameters(
2342 RulespecGroupCheckParametersStorage
,
2344 _("VEEAM tape backup jobs"),
2346 title
=_("Levels for duration of backup job"),
2348 Age(title
="Warning at"),
2349 Age(title
="Critical at"),
2352 TextAscii(title
=_("Name of the tape job"),),
2357 def ceph_epoch_element(title
):
2362 Float(title
=_("Warning at")),
2363 Float(title
=_("Critical at")),
2364 Integer(title
=_("Average interval"), unit
=_("minutes")),
2368 register_check_parameters(
2369 RulespecGroupCheckParametersStorage
,
2372 Dictionary(elements
=ceph_epoch_element(_("Status epoch levels and average")),),
2377 register_check_parameters(
2378 RulespecGroupCheckParametersStorage
,
2385 title
=_("Upper levels for number of OSDs which are out"),
2387 Percentage(title
=_("Warning at")),
2388 Percentage(title
=_("Critical at")),
2392 title
=_("Upper levels for number of OSDs which are down"),
2394 Percentage(title
=_("Warning at")),
2395 Percentage(title
=_("Critical at")),
2397 ] + ceph_epoch_element(_("OSDs epoch levels and average")),),
2402 register_check_parameters(
2403 RulespecGroupCheckParametersStorage
,
2406 Dictionary(elements
=ceph_epoch_element(_("MGRs epoch levels and average")),),
2411 register_check_parameters(
2412 RulespecGroupCheckParametersStorage
,
2413 "quantum_storage_status",
2414 _("Quantum Storage Status"),
2415 Dictionary(elements
=[
2419 ("unavailable", MonitoringState(title
=_("Device unavailable"), default_value
=2)),
2420 ("available", MonitoringState(title
=_("Device available"), default_value
=0)),
2421 ("online", MonitoringState(title
=_("Device online"), default_value
=0)),
2422 ("offline", MonitoringState(title
=_("Device offline"), default_value
=2)),
2423 ("going online", MonitoringState(title
=_("Device going online"), default_value
=1)),
2424 ("state not available",
2425 MonitoringState(title
=_("Device state not available"), default_value
=3)),
2427 title
=_('Map Device States'),
2435 register_check_parameters(
2436 RulespecGroupCheckParametersEnvironment
, "apc_system_events", _("APC Inrow System Events"),
2438 title
=_("System Events on APX Inrow Devices"),
2440 ("state", MonitoringState(
2441 title
=_("State during active system events"),
2446 # Note: This hack is only required on very old filesystem checks (prior August 2013)
2447 fs_levels_elements_hack
= [
2448 # Beware: this is a nasty hack that helps us to detect new-style parameters.
2449 # Something hat has todo with float/int conversion and has not been documented
2450 # by the one who implemented this.
2451 ("flex_levels", FixedValue(
2459 # Match and transform functions for level configurations like
2460 # -- used absolute, positive int (2, 4)
2461 # -- used percentage, positive float (2.0, 4.0)
2462 # -- available absolute, negative int (-2, -4)
2463 # -- available percentage, negative float (-2.0, -4.0)
2465 def match_dual_level_type(value
):
2466 if isinstance(value
, list):
2468 if entry
[1][0] < 0 or entry
[1][1] < 0:
2471 if value
[0] < 0 or value
[1] < 0:
2476 def get_free_used_dynamic_valuespec(what
, name
, default_value
=(80.0, 90.0)):
2478 title
= _("used space")
2481 title
= _("free space")
2486 title
=_("Percentage %s") % title
,
2488 Percentage(title
=_("Warning if %s") % course
, unit
="%", minvalue
=0.0),
2489 Percentage(title
=_("Critical if %s") % course
, unit
="%", minvalue
=0.0),
2492 title
=_("Absolute %s") % title
,
2494 Integer(title
=_("Warning if %s") % course
, unit
=_("MB"), minvalue
=0),
2495 Integer(title
=_("Critical if %s") % course
, unit
=_("MB"), minvalue
=0),
2499 def validate_dynamic_levels(value
, varprefix
):
2500 if [v
for v
in value
if v
[0] < 0]:
2501 raise MKUserError(varprefix
, _("You need to specify levels " "of at least 0 bytes."))
2504 title
=_("Levels for %s %s") % (name
, title
),
2506 show_alternative_title
=True,
2507 default_value
=default_value
,
2508 elements
=vs_subgroup
+ [
2511 orientation
="horizontal",
2513 Filesize(title
=_("%s larger than") % name
.title()),
2514 Alternative(elements
=vs_subgroup
)
2516 title
=_('Dynamic levels'),
2518 validate
=validate_dynamic_levels
,
2524 def transform_filesystem_free(value
):
2525 tuple_convert
= lambda val
: tuple(-x
for x
in val
)
2527 if isinstance(value
, tuple):
2528 return tuple_convert(value
)
2532 result
.append((item
[0], tuple_convert(item
[1])))
2536 fs_levels_elements
= [("levels",
2538 title
=_("Levels for filesystem"),
2539 show_alternative_title
=True,
2540 default_value
=(80.0, 90.0),
2541 match
=match_dual_level_type
,
2543 get_free_used_dynamic_valuespec("used", "filesystem"),
2545 get_free_used_dynamic_valuespec(
2546 "free", "filesystem", default_value
=(20.0, 10.0)),
2547 title
=_("Levels for filesystem free space"),
2549 forth
=transform_filesystem_free
,
2550 back
=transform_filesystem_free
)
2554 title
=_("Display warn/crit levels in check output..."),
2556 ("onproblem", _("Only if the status is non-OK")),
2557 ("onmagic", _("If the status is non-OK or a magic factor is set")),
2558 ("always", _("Always")),
2560 default_value
="onmagic",
2563 fs_reserved_elements
= [
2566 title
=_("Show space reserved for the <tt>root</tt> user"),
2568 _("Check_MK treats space that is reserved for the <tt>root</tt> user on Linux and Unix as "
2569 "used space. Usually, 5% are being reserved for root when a new filesystem is being created. "
2570 "With this option you can have Check_MK display the current amount of reserved but yet unused "
2573 (True, _("Show reserved space")),
2574 (False, _("Do now show reserved space")),
2576 ("subtract_reserved",
2579 "Exclude space reserved for the <tt>root</tt> user from calculation of used space"),
2581 _("By default Check_MK treats space that is reserved for the <tt>root</tt> user on Linux and Unix as "
2582 "used space. Usually, 5% are being reserved for root when a new filesystem is being created. "
2583 "With this option you can have Check_MK exclude the current amount of reserved but yet unused "
2584 "space from the calculations regarding the used space percentage."),
2586 (False, _("Include reserved space")),
2587 (True, _("Exclude reserved space")),
2591 fs_inodes_elements
= [
2594 title
=_("Levels for Inodes"),
2595 help=_("The number of remaining inodes on the filesystem. "
2596 "Please note that this setting has no effect on some filesystem checks."),
2599 title
=_("Percentage free"),
2601 Percentage(title
=_("Warning if less than")),
2602 Percentage(title
=_("Critical if less than")),
2605 title
=_("Absolute free"),
2608 title
=_("Warning if less than"),
2612 default_value
=10000),
2614 title
=_("Critical if less than"),
2618 default_value
=5000),
2621 default_value
=(10.0, 5.0),
2625 title
=_("Display inode usage in check output..."),
2627 ("onproblem", _("Only in case of a problem")),
2628 ("onlow", _("Only in case of a problem or if inodes are below 50%")),
2629 ("always", _("Always")),
2631 default_value
="onlow",
2635 fs_magic_elements
= [
2638 title
=_("Magic factor (automatic level adaptation for large filesystems)"),
2644 title
=_("Reference size for magic factor"), default_value
=20, minvalue
=1, unit
=_("GB"))),
2647 title
=_("Minimum levels if using magic factor"),
2648 help=_("The filesystem levels will never fall below these values, when using "
2649 "the magic factor and the filesystem is very small."),
2651 Percentage(title
=_("Warning at"), unit
=_("% usage"), allow_int
=True, default_value
=50),
2653 title
=_("Critical at"), unit
=_("% usage"), allow_int
=True, default_value
=60)
2657 size_trend_elements
= [
2661 title
=_("Time Range for trend computation"),
2665 title
=_("Trend computation"),
2666 label
=_("Enable trend computation"))),
2669 title
=_("Levels on trends in MB per time range"),
2671 Integer(title
=_("Warning at"), unit
=_("MB / range"), default_value
=100),
2672 Integer(title
=_("Critical at"), unit
=_("MB / range"), default_value
=200)
2676 title
=_("Levels for the percentual growth per time range"),
2679 title
=_("Warning at"),
2680 unit
=_("% / range"),
2684 title
=_("Critical at"),
2685 unit
=_("% / range"),
2691 title
=_("Levels on the time left until full"),
2694 title
=_("Warning if below"),
2699 title
=_("Critical if below"),
2704 ("trend_showtimeleft",
2706 title
=_("Display time left in check output"),
2708 help=_("Normally, the time left until the disk is full is only displayed when "
2709 "the configured levels have been breached. If you set this option "
2710 "the check always reports this information"))),
2713 title
=_("Trend performance data"),
2714 label
=_("Enable generation of performance data from trends"))),
2717 filesystem_elements
= fs_levels_elements
+ fs_levels_elements_hack
+ fs_reserved_elements
+ fs_inodes_elements
+ fs_magic_elements
+ size_trend_elements
2720 def vs_filesystem(extra_elements
=None):
2721 if extra_elements
is None:
2724 help=_("This ruleset allows to set parameters for space and inodes usage"),
2725 elements
=filesystem_elements
+ extra_elements
,
2726 hidden_keys
=["flex_levels"],
2727 ignored_keys
=["patterns"],
2731 register_check_parameters(
2732 RulespecGroupCheckParametersStorage
, "filesystem", _("Filesystems (used space and growth)"),
2735 title
=_("Mount point"),
2736 help=_("For Linux/UNIX systems, specify the mount point, for Windows systems "
2737 "the drive letter uppercase followed by a colon and a slash, e.g. <tt>C:/</tt>"),
2738 allow_empty
=False), "dict")
2740 register_check_parameters(
2741 RulespecGroupCheckParametersStorage
, "threepar_capacity",
2742 _("3Par Capacity (used space and growth)"),
2745 "failed_capacity_levels",
2747 title
=_("Levels for failed capacity in percent"),
2749 Percentage(title
=_("Warning at"), default
=0.0),
2750 Percentage(title
=_("Critical at"), default
=0.0),
2754 ]), TextAscii(title
=_("Device type"), allow_empty
=False), "dict")
2756 register_check_parameters(RulespecGroupCheckParametersStorage
, "threepar_cpgs",
2757 _("3Par CPG (used space and growth)"), vs_filesystem(),
2758 TextAscii(title
=_("CPG member name"), allow_empty
=False), "dict")
2760 register_check_parameters(
2761 RulespecGroupCheckParametersStorage
,
2763 _("NFS IO Statistics"),
2765 title
=_("NFS IO Statistics"),
2770 title
=_("Operations"),
2772 Float(title
=_("Warning at"), default_value
=None, unit
="1/s"),
2773 Float(title
=_("Critical at"), default_value
=None, unit
="1/s"),
2777 title
=_("RPC Backlog"),
2779 Float(title
=_("Warning below"), default_value
=None, unit
="queue"),
2780 Float(title
=_("Critical below"), default_value
=None, unit
="queue"),
2784 title
=_("Read Operations /s"),
2786 Float(title
=_("Warning at"), default_value
=None, unit
="1/s"),
2787 Float(title
=_("Critical at"), default_value
=None, unit
="1/s"),
2791 title
=_("Reads size /s"),
2793 Float(title
=_("Warning at"), default_value
=None, unit
="bytes/s"),
2794 Float(title
=_("Critical at"), default_value
=None, unit
="bytes/s"),
2798 title
=_("Read bytes per operation"),
2800 Float(title
=_("Warning at"), default_value
=None, unit
="bytes/op"),
2801 Float(title
=_("Critical at"), default_value
=None, unit
="bytes/op"),
2805 title
=_("Read Retransmissions"),
2807 Percentage(title
=_("Warning at"), default_value
=None),
2808 Percentage(title
=_("Critical at"), default_value
=None),
2812 title
=_("Read Average RTT (ms)"),
2814 Float(title
=_("Warning at"), default_value
=None, unit
="ms"),
2815 Float(title
=_("Critical at"), default_value
=None, unit
="ms"),
2819 title
=_("Read Average Executions (ms)"),
2821 Float(title
=_("Warning at"), default_value
=None, unit
="ms"),
2822 Float(title
=_("Critical at"), default_value
=None, unit
="ms"),
2826 title
=_("Write Operations/s"),
2828 Float(title
=_("Warning at"), default_value
=None, unit
="1/s"),
2829 Float(title
=_("Critical at"), default_value
=None, unit
="1/s"),
2833 title
=_("Write size /s"),
2835 Float(title
=_("Warning at"), default_value
=None, unit
="bytes/s"),
2836 Float(title
=_("Critical at"), default_value
=None, unit
="bytes/s"),
2840 title
=_("Write bytes per operation"),
2842 Float(title
=_("Warning at"), default_value
=None, unit
="bytes/s"),
2843 Float(title
=_("Critical at"), default_value
=None, unit
="bytes/s"),
2847 title
=_("Write Retransmissions"),
2849 Percentage(title
=_("Warning at"), default_value
=None),
2850 Percentage(title
=_("Critical at"), default_value
=None),
2852 ("write_avg_rtt_ms",
2854 title
=_("Write Avg RTT (ms)"),
2856 Float(title
=_("Warning at"), default_value
=None, unit
="ms"),
2857 Float(title
=_("Critical at"), default_value
=None, unit
="ms"),
2859 ("write_avg_exe_ms",
2861 title
=_("Write Avg exe (ms)"),
2863 Float(title
=_("Warning at"), default_value
=None, unit
="ms"),
2864 Float(title
=_("Critical at"), default_value
=None, unit
="ms"),
2867 TextAscii(title
=_("NFS IO Statistics"),),
2872 # .--Printing------------------------------------------------------------.
2874 # | | _ \ _ __(_)_ __ | |_(_)_ __ __ _ |
2875 # | | |_) | '__| | '_ \| __| | '_ \ / _` | |
2876 # | | __/| | | | | | | |_| | | | | (_| | |
2877 # | |_| |_| |_|_| |_|\__|_|_| |_|\__, | |
2879 # '----------------------------------------------------------------------'
2882 def transform_printer_supply(params
):
2883 if isinstance(params
, tuple):
2884 if len(params
) == 2:
2885 return {"levels": params
}
2886 return {"levels": params
[:2], "upturn_toner": params
[2]}
2890 register_check_parameters(
2891 RulespecGroupCheckParametersPrinters
,
2893 _("Printer cartridge levels"),
2895 Dictionary(elements
=[
2898 title
=_("Levels for remaining supply"),
2901 title
=_("Warning level for remaining"),
2904 help=_("For consumable supplies, this is configured as the percentage of "
2905 "remaining capacity. For supplies that fill up, this is configured "
2906 "as remaining space."),
2909 title
=_("Critical level for remaining"),
2912 help=_("For consumable supplies, this is configured as the percentage of "
2913 "remaining capacity. For supplies that fill up, this is configured "
2914 "as remaining space."),
2919 title
=_("State for <i>some remaining</i>"),
2920 help=_("Some printers do not report a precise percentage but "
2921 "just <i>some remaining</i> at a low fill state. Here you "
2922 "can set the monitoring state for that situation"),
2927 title
=_("Upturn toner levels"),
2928 label
=_("Printer sends <i>used</i> material instead of <i>remaining</i>"),
2929 help=_("Some Printers (eg. Konica for Drum Cartdiges) returning the available"
2930 " fuel instead of what is left. In this case it's possible"
2931 " to upturn the levels to handle this behavior"),
2934 forth
=transform_printer_supply
,
2936 TextAscii(title
=_("cartridge specification"), allow_empty
=True),
2940 register_check_parameters(
2941 RulespecGroupCheckParametersPrinters
,
2943 _("Printer Input Units"),
2948 title
=_('Capacity remaining'),
2950 Percentage(title
=_("Warning at"), default_value
=0.0),
2951 Percentage(title
=_("Critical at"), default_value
=0.0),
2955 default_keys
=['capacity_levels'],
2957 TextAscii(title
=_('Unit Name'), allow_empty
=True),
2961 register_check_parameters(
2962 RulespecGroupCheckParametersPrinters
,
2964 _("Printer Output Units"),
2969 title
=_('Capacity filled'),
2971 Percentage(title
=_("Warning at"), default_value
=0.0),
2972 Percentage(title
=_("Critical at"), default_value
=0.0),
2976 default_keys
=['capacity_levels'],
2978 TextAscii(title
=_('Unit Name'), allow_empty
=True),
2982 register_check_parameters(
2983 RulespecGroupCheckParametersPrinters
,
2990 title
=_("Levels of current jobs"),
2991 default_value
=(5, 10),
2992 elements
=[Integer(title
=_("Warning at")),
2993 Integer(title
=_("Critical at"))])),
2996 title
=_("Levels for age of jobs"),
2997 help=_("A value in seconds"),
2998 default_value
=(360, 720),
2999 elements
=[Integer(title
=_("Warning at")),
3000 Integer(title
=_("Critical at"))])),
3001 ("is_idle", MonitoringState(
3002 title
=_("State for 'is idle'"),
3005 ("now_printing", MonitoringState(
3006 title
=_("State for 'now printing'"),
3011 title
=_("State for 'disabled since'"),
3015 TextAscii(title
=_("CUPS Queue")),
3020 # .--Os------------------------------------------------------------------.
3027 # '----------------------------------------------------------------------'
3029 register_check_parameters(
3030 RulespecGroupCheckParametersOperatingSystem
,
3032 _("Uptime since last reboot"),
3033 Dictionary(elements
=[
3036 title
=_("Minimum required uptime"),
3038 Age(title
=_("Warning if below")),
3039 Age(title
=_("Critical if below")),
3043 title
=_("Maximum allowed uptime"),
3045 Age(title
=_("Warning at")),
3046 Age(title
=_("Critical at")),
3053 register_check_parameters(
3054 RulespecGroupCheckParametersOperatingSystem
, "systemtime", _("Windows system time offset"),
3056 title
=_("Time offset"),
3058 Integer(title
=_("Warning at"), unit
=_("Seconds")),
3059 Integer(title
=_("Critical at"), unit
=_("Seconds")),
3063 # .--Unsorted--(Don't create new stuff here!)----------------------------.
3065 # | | | | |_ __ ___ ___ _ __| |_ ___ __| | |
3066 # | | | | | '_ \/ __|/ _ \| '__| __/ _ \/ _` | |
3067 # | | |_| | | | \__ \ (_) | | | || __/ (_| | |
3068 # | \___/|_| |_|___/\___/|_| \__\___|\__,_| |
3070 # +----------------------------------------------------------------------+
3071 # | All these rules have not been moved into their according sections. |
3072 # | Please move them as you come along - but beware of dependecies! |
3073 # | Remove this section as soon as it's empty. |
3074 # '----------------------------------------------------------------------'
3076 register_check_parameters(
3077 RulespecGroupCheckParametersEnvironment
, "ups_test", _("Time since last UPS selftest"),
3079 title
=_("Time since last UPS selftest"),
3082 title
=_("Warning Level for time since last self test"),
3083 help=_("Warning Level for time since last diagnostic test of the device. "
3084 "For a value of 0 the warning level will not be used"),
3089 title
=_("Critical Level for time since last self test"),
3090 help=_("Critical Level for time since last diagnostic test of the device. "
3091 "For a value of 0 the critical level will not be used"),
3097 register_check_parameters(
3098 RulespecGroupCheckParametersEnvironment
,
3100 _("APC Power Consumption"),
3102 title
=_("Power Comsumption of APC Devices"),
3105 title
=_("Warning below"),
3110 title
=_("Critical below"),
3117 help=_("The identifier of the phase the power is related to."),
3121 register_check_parameters(
3122 RulespecGroupCheckParametersStorage
,
3124 _("Size and age of single files"),
3125 Dictionary(elements
=[
3128 title
=_("Minimal age"),
3130 Age(title
=_("Warning if younger than")),
3131 Age(title
=_("Critical if younger than")),
3135 title
=_("Maximal age"),
3137 Age(title
=_("Warning if older than")),
3138 Age(title
=_("Critical if older than")),
3142 title
=_("Minimal size"),
3144 Filesize(title
=_("Warning if below")),
3145 Filesize(title
=_("Critical if below")),
3149 title
=_("Maximal size"),
3151 Filesize(title
=_("Warning at")),
3152 Filesize(title
=_("Critical at")),
3156 title
=_("Only check during the following times of the day"),
3157 help=_("Outside these ranges the check will always be OK"),
3159 ("state_missing", MonitoringState(default_value
=3, title
=_("State when file is missing"))),
3161 TextAscii(title
=_("File name"), allow_empty
=True),
3166 RulespecGroupCheckParametersStorage
,
3167 varname
="filesystem_groups",
3168 title
=_('Filesystem grouping patterns'),
3169 help=_('Normally the filesystem checks (<tt>df</tt>, <tt>hr_fs</tt> and others) '
3170 'will create a single service for each filesystem. '
3171 'By defining grouping '
3172 'patterns you can handle groups of filesystems like one filesystem. '
3173 'For each group you can define one or several patterns. '
3174 'The filesystems matching one of the patterns '
3175 'will be monitored like one big filesystem in a single service.'),
3179 orientation
="horizontal",
3181 TextAscii(title
=_("Name of group"),),
3183 title
=_("Pattern for mount point (using * and ?)"),
3184 help=_("You can specify one or several patterns containing "
3185 "<tt>*</tt> and <tt>?</tt>, for example <tt>/spool/tmpspace*</tt>. "
3186 "The filesystems matching the patterns will be monitored "
3187 "like one big filesystem in a single service."),
3190 add_label
=_("Add pattern"),
3196 RulespecGroupCheckParametersStorage
,
3197 varname
="fileinfo_groups",
3198 title
=_('File Grouping Patterns'),
3199 help=_('The check <tt>fileinfo</tt> monitors the age and size of '
3200 'a single file. Each file information that is sent '
3201 'by the agent will create one service. By defining grouping '
3202 'patterns you can switch to the check <tt>fileinfo.groups</tt>. '
3203 'That check monitors a list of files at once. You can set levels '
3204 'not only for the total size and the age of the oldest/youngest '
3205 'file but also on the count. You can define one or several '
3206 'patterns for a group containing <tt>*</tt> and <tt>?</tt>, for example '
3207 '<tt>/var/log/apache/*.log</tt>. Please see Python\'s fnmatch for more '
3208 'information regarding globbing patterns and special characters. '
3209 'If the pattern begins with a tilde then this pattern is interpreted as '
3210 'a regular expression instead of as a filename globbing pattern and '
3211 '<tt>*</tt> and <tt>?</tt> are treated differently. '
3212 'For files contained in a group '
3213 'the discovery will automatically create a group service instead '
3214 'of single services for each file. This rule also applies when '
3215 'you use manually configured checks instead of inventorized ones. '
3216 'Furthermore, the current time/date in a configurable format '
3217 'may be included in the include pattern. The syntax is as follows: '
3218 '$DATE:format-spec$ or $YESTERDAY:format-spec$, where format-spec '
3219 'is a list of time format directives of the unix date command. '
3220 'Example: $DATE:%Y%m%d$ is todays date, e.g. 20140127. A pattern '
3221 'of /var/tmp/backups/$DATE:%Y%m%d$.txt would search for .txt files '
3222 'with todays date as name in the directory /var/tmp/backups. '
3223 'The YESTERDAY syntax simply subtracts one day from the reference time.'),
3226 help=_("This defines one file grouping pattern."),
3228 orientation
="horizontal",
3231 title
=_("Name of group"),
3237 orientation
="vertical",
3239 TextAscii(title
=_("Include Pattern"), size
=40),
3240 TextAscii(title
=_("Exclude Pattern"), size
=40),
3243 forth
=lambda params
: isinstance(params
, str) and (params
, '') or params
),
3246 add_label
=_("Add pattern group"),
3251 register_check_parameters(
3252 RulespecGroupCheckParametersStorage
,
3254 _("Size, age and count of file groups"),
3259 title
=_("Minimal age of oldest file"),
3261 Age(title
=_("Warning if younger than")),
3262 Age(title
=_("Critical if younger than")),
3266 title
=_("Maximal age of oldest file"),
3268 Age(title
=_("Warning if older than")),
3269 Age(title
=_("Critical if older than")),
3273 title
=_("Minimal age of newest file"),
3275 Age(title
=_("Warning if younger than")),
3276 Age(title
=_("Critical if younger than")),
3280 title
=_("Maximal age of newest file"),
3282 Age(title
=_("Warning if older than")),
3283 Age(title
=_("Critical if older than")),
3285 ("minsize_smallest",
3287 title
=_("Minimal size of smallest file"),
3289 Filesize(title
=_("Warning if below")),
3290 Filesize(title
=_("Critical if below")),
3292 ("maxsize_smallest",
3294 title
=_("Maximal size of smallest file"),
3296 Filesize(title
=_("Warning if above")),
3297 Filesize(title
=_("Critical if above")),
3301 title
=_("Minimal size of largest file"),
3303 Filesize(title
=_("Warning if below")),
3304 Filesize(title
=_("Critical if below")),
3308 title
=_("Maximal size of largest file"),
3310 Filesize(title
=_("Warning if above")),
3311 Filesize(title
=_("Critical if above")),
3315 title
=_("Minimal size"),
3317 Filesize(title
=_("Warning if below")),
3318 Filesize(title
=_("Critical if below")),
3322 title
=_("Maximal size"),
3324 Filesize(title
=_("Warning if above")),
3325 Filesize(title
=_("Critical if above")),
3329 title
=_("Minimal file count"),
3331 Integer(title
=_("Warning if below")),
3332 Integer(title
=_("Critical if below")),
3336 title
=_("Maximal file count"),
3338 Integer(title
=_("Warning if above")),
3339 Integer(title
=_("Critical if above")),
3343 title
=_("Only check during the following times of the day"),
3344 help=_("Outside these ranges the check will always be OK"),
3349 MonitoringState(title
=_("Monitoring state"), default_value
=2),
3352 orientation
="hroizontal",
3354 ("count", _("File count at"), Integer()),
3355 ("count_lower", _("File count below"), Integer()),
3356 ("size", _("File size at"), Filesize()),
3357 ("size_lower", _("File size below"), Filesize()),
3358 ("largest_size", _("Largest file size at"), Filesize()),
3359 ("largest_size_lower", _("Largest file size below"), Filesize()),
3360 ("smallest_size", _("Smallest file size at"), Filesize()),
3361 ("smallest_size_lower", _("Smallest file size below"), Filesize()),
3362 ("oldest_age", _("Oldest file age at"), Age()),
3363 ("oldest_age_lower", _("Oldest file age below"), Age()),
3364 ("newest_age", _("Newest file age at"), Age()),
3365 ("newest_age_lower", _("Newest file age below"), Age()),
3370 title
=_("Level conjunctions"),
3372 _("In order to check dependent file group statistics you can configure "
3373 "conjunctions of single levels now. A conjunction consists of a monitoring state "
3374 "and any number of upper or lower levels. If all of the configured levels within "
3375 "a conjunction are reached then the related state is reported."),
3378 ignored_keys
=["precompiled_patterns"]),
3380 title
=_("File Group Name"),
3382 "This name must match the name of the group defined "
3383 "in the <a href=\"wato.py?mode=edit_ruleset&varname=fileinfo_groups\">%s</a> ruleset.")
3384 % (_('File Grouping Patterns')),
3389 register_check_parameters(
3390 RulespecGroupCheckParametersStorage
,
3392 _("Netapp FC Port throughput"),
3393 Dictionary(elements
=[("read",
3397 Filesize(title
=_("Warning if below")),
3398 Filesize(title
=_("Critical if below")),
3404 Filesize(title
=_("Warning at")),
3405 Filesize(title
=_("Critical at")),
3407 TextAscii(title
=_("File name"), allow_empty
=True),
3411 register_check_parameters(
3412 RulespecGroupCheckParametersOperatingSystem
,
3413 "memory_pagefile_win",
3414 _("Memory and pagefile levels for Windows"),
3415 Dictionary(elements
=[
3419 title
=_("Memory Levels"),
3423 title
=_("Memory usage in percent"),
3425 Percentage(title
=_("Warning at")),
3426 Percentage(title
=_("Critical at")),
3431 title
=_("Absolute free memory"),
3433 Filesize(title
=_("Warning if less than")),
3434 Filesize(title
=_("Critical if less than")),
3436 # Note: Filesize values lesser 1MB will not work
3437 # -> need hide option in filesize valuespec
3438 back
=lambda x
: (x
[0] / 1024 / 1024, x
[1] / 1024 / 1024),
3439 forth
=lambda x
: (x
[0] * 1024 * 1024, x
[1] * 1024 * 1024)),
3440 PredictiveLevels(unit
=_("GB"), default_difference
=(0.5, 1.0))
3442 default_value
=(80.0, 90.0))),
3446 title
=_("Pagefile Levels"),
3450 title
=_("Pagefile usage in percent"),
3452 Percentage(title
=_("Warning at")),
3453 Percentage(title
=_("Critical at")),
3457 title
=_("Absolute free pagefile"),
3459 Filesize(title
=_("Warning if less than")),
3460 Filesize(title
=_("Critical if less than")),
3462 # Note: Filesize values lesser 1MB will not work
3463 # -> need hide option in filesize valuespec
3464 back
=lambda x
: (x
[0] / 1024 / 1024, x
[1] / 1024 / 1024),
3465 forth
=lambda x
: (x
[0] * 1024 * 1024, x
[1] * 1024 * 1024)),
3467 title
=_("Predictive levels"), unit
=_("GB"), default_difference
=(0.5, 1.0))
3469 default_value
=(80.0, 90.0))),
3472 title
=_("Averaging"),
3473 help=_("If this parameter is set, all measured values will be averaged "
3474 "over the specified time interval before levels are being applied. Per "
3475 "default, averaging is turned off. "),
3484 register_check_parameters(
3485 RulespecGroupCheckParametersApplications
,
3488 Dictionary(elements
=[
3491 title
=_("Remaining Open Slots"),
3492 help=_("Here you can set the number of remaining open slots"),
3494 Integer(title
=_("Warning below"), label
=_("slots")),
3495 Integer(title
=_("Critical below"), label
=_("slots"))
3499 title
=_("Busy workers"),
3500 help=_("Here you can set upper levels of busy workers"),
3502 Integer(title
=_("Warning at"), label
=_("busy workers")),
3503 Integer(title
=_("Critical at"), label
=_("busy workers"))
3507 title
=_("Apache Server"),
3508 help=_("A string-combination of servername and port, e.g. 127.0.0.1:5000.")),
3512 register_check_parameters(
3513 RulespecGroupCheckParametersApplications
,
3514 "saprouter_cert_age",
3515 _("SAP router certificate time settings"),
3516 Dictionary(elements
=[
3519 title
=_('Lower levels for certificate age'),
3521 Age(title
=_("Warning below"), default_value
=30 * 86400),
3522 Age(title
=_("Critical below"), default_value
=7 * 86400),
3529 register_check_parameters(
3530 RulespecGroupCheckParametersApplications
,
3533 Dictionary(elements
=[
3536 title
=_("Number of Loggedin Users"),
3538 Integer(title
=_("Warning at"), label
=_("Users")),
3539 Integer(title
=_("Critical at"), label
=_("Users"))
3543 title
=_("Frontend net time"),
3545 Float(title
=_("Warning at"), unit
=_('ms')),
3546 Float(title
=_("Critical at"), unit
=_('ms'))
3550 title
=_("Response Time"),
3552 Float(title
=_("Warning at"), unit
=_('ms')),
3553 Float(title
=_("Critical at"), unit
=_('ms'))
3557 title
=_("System ID"),
3558 help=_("The SAP system ID."),
3563 register_check_parameters(
3564 RulespecGroupCheckParametersApplications
,
3567 Dictionary(elements
=[("active_connections",
3569 title
=_("Active Connections"),
3570 help=_("You can configure upper thresholds for the currently active "
3571 "connections handled by the web server."),
3573 Integer(title
=_("Warning at"), unit
=_("connections")),
3574 Integer(title
=_("Critical at"), unit
=_("connections"))
3577 title
=_("Nginx Server"),
3578 help=_("A string-combination of servername and port, e.g. 127.0.0.1:80.")),
3582 register_check_parameters(
3583 RulespecGroupCheckParametersApplications
,
3586 Dictionary(elements
=[
3590 help=_("Status of the SLES license"),
3592 ('Registered', _('Registered')),
3593 ('Ignore', _('Do not check')),
3595 ("subscription_status",
3597 title
=_("Subscription"),
3598 help=_("Status of the SLES subscription"),
3600 ('ACTIVE', _('ACTIVE')),
3601 ('Ignore', _('Do not check')),
3605 title
=_("Time until license expiration"),
3606 help=_("Remaining days until the SLES license expires"),
3608 Integer(title
=_("Warning at"), unit
=_("days")),
3609 Integer(title
=_("Critical at"), unit
=_("days"))
3616 register_check_parameters(
3617 RulespecGroupCheckParametersNetworking
,
3619 _("Viprinet router"),
3620 Dictionary(elements
=[
3623 title
=_("Set expected router mode"),
3625 ("inv", _("Mode found during inventory")),
3628 ("2", _("Hub running as HotSpare")),
3629 ("3", _("Hotspare-Hub replacing another router")),
3636 register_check_parameters(
3637 RulespecGroupCheckParametersNetworking
, 'docsis_channels_upstream',
3638 _("Docsis Upstream Channels"),
3639 Dictionary(elements
=[
3642 title
=_("Levels for signal/noise ratio"),
3644 Float(title
=_("Warning at or below"), unit
="dB", default_value
=10.0),
3645 Float(title
=_("Critical at or below"), unit
="dB", default_value
=5.0),
3649 title
=_("Levels for rate of corrected errors"),
3651 Percentage(title
=_("Warning at"), default_value
=5.0),
3652 Percentage(title
=_("Critical at"), default_value
=8.0),
3656 title
=_("Levels for rate of uncorrectable errors"),
3658 Percentage(title
=_("Warning at"), default_value
=1.0),
3659 Percentage(title
=_("Critical at"), default_value
=2.0),
3661 ]), TextAscii(title
=_("ID of the channel (usually ranging from 1)")), "dict")
3663 register_check_parameters(
3664 RulespecGroupCheckParametersNetworking
, "docsis_channels_downstream",
3665 _("Docsis Downstream Channels"),
3666 Dictionary(elements
=[
3669 title
=_("Transmit Power"),
3670 help=_("The operational transmit power"),
3672 Float(title
=_("warning at or below"), unit
="dBmV", default_value
=5.0),
3673 Float(title
=_("critical at or below"), unit
="dBmV", default_value
=1.0),
3675 ]), TextAscii(title
=_("ID of the channel (usually ranging from 1)")), "dict")
3677 register_check_parameters(
3678 RulespecGroupCheckParametersNetworking
, "docsis_cm_status", _("Docsis Cable Modem Status"),
3679 Dictionary(elements
=[
3682 title
=_("Modem States that lead to a critical state"),
3684 "If one of the selected states occurs the check will repsond with a critical state "
3689 (3, "notSynchronized"),
3690 (4, "phySynchronized"),
3691 (5, "usParametersAcquired"),
3692 (6, "rangingComplete"),
3694 (8, "todEstablished"),
3695 (9, "securityEstablished"),
3696 (10, "paramTransferComplete"),
3697 (11, "registrationComplete"),
3698 (12, "operational"),
3699 (13, "accessDenied"),
3701 default_value
=[1, 2, 13],
3705 title
=_("Transmit Power"),
3706 help=_("The operational transmit power"),
3708 Float(title
=_("warning at"), unit
="dBmV", default_value
=20.0),
3709 Float(title
=_("critical at"), unit
="dBmV", default_value
=10.0),
3711 ]), TextAscii(title
=_("ID of the Entry")), "dict")
3713 register_check_parameters(
3714 RulespecGroupCheckParametersNetworking
,
3722 title
=("VPN Tunnel Endpoints"),
3725 title
=_("IP-Address or Name of Tunnel Endpoint"),
3727 "The configured value must match a tunnel reported by the monitored "
3732 title
=_("Tunnel Alias"),
3734 "You can configure an individual alias here for the tunnel matching "
3735 "the IP-Address or Name configured in the field above."),
3739 title
=_("State if tunnel is not found"),
3742 add_label
=_("Add tunnel"),
3744 title
=_("VPN tunnel specific configuration"),
3748 title
=_("Default state to report when tunnel can not be found anymore"),
3749 help=_("Default state if a tunnel, which is not listed above in this rule, "
3750 "can no longer be found."),
3753 TextAscii(title
=_("IP-Address of Tunnel Endpoint")),
3757 register_check_parameters(
3758 RulespecGroupCheckParametersNetworking
, "lsnat", _("Enterasys LSNAT Bindings"),
3761 ("current_bindings",
3763 title
=_("Number of current LSNAT bindings"),
3765 Integer(title
=_("Warning at"), size
=10, unit
=_("bindings")),
3766 Integer(title
=_("Critical at"), size
=10, unit
=_("bindings")),
3769 optional_keys
=False,
3772 register_check_parameters(
3773 RulespecGroupCheckParametersNetworking
, "enterasys_powersupply",
3774 _("Enterasys Power Supply Settings"),
3777 ("redundancy_ok_states",
3779 title
=_("States treated as OK"),
3782 (2, 'notRedundant'),
3783 (3, 'notSupported'),
3788 optional_keys
=False,
3789 ), TextAscii(title
=_("Number of Powersupply"),), "dict")
3791 hivemanger_states
= [
3792 ("Critical", "Critical"),
3797 register_check_parameters(
3798 RulespecGroupCheckParametersNetworking
,
3799 "hivemanager_devices",
3800 _("Hivemanager Devices"),
3801 Dictionary(elements
=[
3804 title
=_("Number of clients"),
3805 help=_("Number of clients connected to a Device."),
3807 Integer(title
=_("Warning at"), unit
=_("clients")),
3808 Integer(title
=_("Critical at"), unit
=_("clients")),
3812 title
=_("Maximum uptime of Device"),
3814 Age(title
=_("Warning at")),
3815 Age(title
=_("Critical at")),
3817 ('alert_on_loss', FixedValue(
3820 title
=_("Do not alert on connection loss"),
3824 title
=_("States treated as warning"),
3825 choices
=hivemanger_states
,
3826 default_value
=['Maybe', 'Major', 'Minor'],
3830 title
=_("States treated as critical"),
3831 choices
=hivemanger_states
,
3832 default_value
=['Critical'],
3835 TextAscii(title
=_("Hostname of the Device")),
3839 register_check_parameters(
3840 RulespecGroupCheckParametersNetworking
,
3841 "hivemanager_ng_devices",
3842 _("HiveManager NG Devices"),
3843 Dictionary(elements
=[
3846 title
=_("Number of clients"),
3847 help=_("Number of clients connected to a Device."),
3849 Integer(title
=_("Warning at"), unit
=_("clients")),
3850 Integer(title
=_("Critical at"), unit
=_("clients")),
3853 TextAscii(title
=_("Hostname of the Device")),
3857 register_check_parameters(
3858 RulespecGroupCheckParametersNetworking
,
3860 _("WLC WiFi client connections"),
3863 title
= _("Number of connections"),
3867 title
= _("Upper levels"),
3869 Integer(title
= _("Warning at"), unit
=_("connections")),
3870 Integer(title
= _("Critical at"), unit
=_("connections")),
3875 title
= _("Lower levels"),
3877 Integer(title
= _("Critical if below"), unit
=_("connections")),
3878 Integer(title
= _("Warning if below"), unit
=_("connections")),
3883 # old params = (crit_low, warn_low, warn, crit)
3884 forth
= lambda v
: isinstance(v
, tuple) and { "levels" : (v
[2], v
[3]), "levels_lower" : (v
[1], v
[0]) } or v
,
3886 TextAscii( title
= _("Name of Wifi")),
3890 register_check_parameters(
3891 RulespecGroupCheckParametersNetworking
,
3895 help=_("Here you can set which alert type is set when the given "
3896 "access point is missing (might be powered off). The access point "
3897 "can be specified by the AP name or the AP model"),
3898 elements
=[("ap_name",
3901 TextAscii(title
=_("AP name")),
3902 MonitoringState(title
=_("State when missing"), default_value
=2)
3904 title
=_("Access point name"),
3905 add_label
=_("Add name")))]),
3906 TextAscii(title
=_("Access Point")),
3910 register_check_parameters(
3911 RulespecGroupCheckParametersNetworking
,
3913 _("TCP connection statistics"),
3914 Dictionary(elements
=[
3917 title
=_("ESTABLISHED"),
3918 help=_("connection up and passing data"),
3920 Integer(title
=_("Warning at"), label
=_("connections")),
3921 Integer(title
=_("Critical at"), label
=_("connections"))
3925 title
=_("SYN_SENT"),
3926 help=_("session has been requested by us; waiting for reply from remote endpoint"),
3928 Integer(title
=_("Warning at"), label
=_("connections")),
3929 Integer(title
=_("Critical at"), label
=_("connections"))
3933 title
=_("SYN_RECV"),
3934 help=_("session has been requested by a remote endpoint "
3935 "for a socket on which we were listening"),
3937 Integer(title
=_("Warning at"), label
=_("connections")),
3938 Integer(title
=_("Critical at"), label
=_("connections"))
3942 title
=_("LAST_ACK"),
3943 help=_("our socket is closed; remote endpoint has also shut down; "
3944 " we are waiting for a final acknowledgement"),
3946 Integer(title
=_("Warning at"), label
=_("connections")),
3947 Integer(title
=_("Critical at"), label
=_("connections"))
3951 title
=_("CLOSE_WAIT"),
3952 help=_("remote endpoint has shut down; the kernel is waiting "
3953 "for the application to close the socket"),
3955 Integer(title
=_("Warning at"), label
=_("connections")),
3956 Integer(title
=_("Critical at"), label
=_("connections"))
3960 title
=_("TIME_WAIT"),
3961 help=_("socket is waiting after closing for any packets left on the network"),
3963 Integer(title
=_("Warning at"), label
=_("connections")),
3964 Integer(title
=_("Critical at"), label
=_("connections"))
3969 help=_("socket is not being used"),
3971 Integer(title
=_("Warning at"), label
=_("connections")),
3972 Integer(title
=_("Critical at"), label
=_("connections"))
3977 help=_("our socket is shut down; remote endpoint is shut down; "
3978 "not all data has been sent"),
3980 Integer(title
=_("Warning at"), label
=_("connections")),
3981 Integer(title
=_("Critical at"), label
=_("connections"))
3985 title
=_("FIN_WAIT1"),
3986 help=_("our socket has closed; we are in the process of "
3987 "tearing down the connection"),
3989 Integer(title
=_("Warning at"), label
=_("connections")),
3990 Integer(title
=_("Critical at"), label
=_("connections"))
3994 title
=_("FIN_WAIT2"),
3995 help=_("the connection has been closed; our socket is waiting "
3996 "for the remote endpoint to shutdown"),
3998 Integer(title
=_("Warning at"), label
=_("connections")),
3999 Integer(title
=_("Critical at"), label
=_("connections"))
4004 help=_("represents waiting for a connection request from any remote TCP and port"),
4006 Integer(title
=_("Warning at"), label
=_("connections")),
4007 Integer(title
=_("Critical at"), label
=_("connections"))
4012 help=_("the socket has been created and an address assigned "
4013 "to with bind(). The TCP stack is not active yet. "
4014 "This state is only reported on Solaris."),
4016 Integer(title
=_("Warning at"), label
=_("connections")),
4017 Integer(title
=_("Critical at"), label
=_("connections"))
4022 help=_("a TCP session that is active but that has no data being "
4023 "transmitted by either device for a prolonged period of time"),
4025 Integer(title
=_("Warning at"), label
=_("connections")),
4026 Integer(title
=_("Critical at"), label
=_("connections"))
4033 register_check_parameters(
4034 RulespecGroupCheckParametersNetworking
,
4036 _("Monitor specific TCP/UDP connections and listeners"),
4038 help=_("This rule allows to monitor the existence of specific TCP connections or "
4039 "TCP/UDP listeners."),
4044 title
=_("Protocol"),
4045 choices
=[("TCP", _("TCP")), ("UDP", _("UDP"))],
4046 default_value
="TCP",
4054 ("ESTABLISHED", "ESTABLISHED"),
4055 ("LISTENING", "LISTENING"),
4056 ("SYN_SENT", "SYN_SENT"),
4057 ("SYN_RECV", "SYN_RECV"),
4058 ("LAST_ACK", "LAST_ACK"),
4059 ("CLOSE_WAIT", "CLOSE_WAIT"),
4060 ("TIME_WAIT", "TIME_WAIT"),
4061 ("CLOSED", "CLOSED"),
4062 ("CLOSING", "CLOSING"),
4063 ("FIN_WAIT1", "FIN_WAIT1"),
4064 ("FIN_WAIT2", "FIN_WAIT2"),
4068 ("local_ip", IPv4Address(title
=_("Local IP address"))),
4069 ("local_port", Integer(
4070 title
=_("Local port number"),
4074 ("remote_ip", IPv4Address(title
=_("Remote IP address"))),
4075 ("remote_port", Integer(
4076 title
=_("Remote port number"),
4082 title
=_("Maximum number of connections or listeners"),
4084 Integer(title
=_("Warning at")),
4085 Integer(title
=_("Critical at")),
4090 title
=_("Minimum number of connections or listeners"),
4092 Integer(title
=_("Warning if below")),
4093 Integer(title
=_("Critical if below")),
4098 title
=_("Connection name"),
4099 help=_("Specify an arbitrary name of this connection here"),
4102 has_inventory
=False,
4105 register_check_parameters(
4106 RulespecGroupCheckParametersApplications
,
4108 _("MS Exchange Information Store"),
4110 title
=_("Set Levels"),
4111 elements
=[('store_latency',
4113 title
=_("Average latency for store requests"),
4115 Float(title
=_("Warning at"), unit
=_('ms'), default_value
=40.0),
4116 Float(title
=_("Critical at"), unit
=_('ms'), default_value
=50.0)
4118 ('clienttype_latency',
4120 title
=_("Average latency for client type requests"),
4122 Float(title
=_("Warning at"), unit
=_('ms'), default_value
=40.0),
4123 Float(title
=_("Critical at"), unit
=_('ms'), default_value
=50.0)
4125 ('clienttype_requests',
4127 title
=_("Maximum number of client type requests per second"),
4129 Integer(title
=_("Warning at"), unit
=_('requests'), default_value
=60),
4130 Integer(title
=_("Critical at"), unit
=_('requests'), default_value
=70)
4135 help=_("Specify the name of a store (This is either a mailbox or public folder)")),
4138 register_check_parameters(
4139 RulespecGroupCheckParametersApplications
,
4140 'msx_rpcclientaccess',
4141 _("MS Exchange RPC Client Access"),
4143 title
=_("Set Levels"),
4144 elements
=[('latency',
4146 title
=_("Average latency for RPC requests"),
4148 Float(title
=_("Warning at"), unit
=_('ms'), default_value
=200.0),
4149 Float(title
=_("Critical at"), unit
=_('ms'), default_value
=250.0)
4153 title
=_("Maximum number of RPC requests per second"),
4155 Integer(title
=_("Warning at"), unit
=_('requests'), default_value
=30),
4156 Integer(title
=_("Critical at"), unit
=_('requests'), default_value
=40)
4162 register_check_parameters(
4163 RulespecGroupCheckParametersApplications
,
4165 _("MS Exchange Database"),
4167 title
=_("Set Levels"),
4169 ('read_attached_latency',
4171 title
=_("I/O Database Reads (Attached) Average Latency"),
4173 Float(title
=_("Warning at"), unit
=_('ms'), default_value
=200.0),
4174 Float(title
=_("Critical at"), unit
=_('ms'), default_value
=250.0)
4176 ('read_recovery_latency',
4178 title
=_("I/O Database Reads (Recovery) Average Latency"),
4180 Float(title
=_("Warning at"), unit
=_('ms'), default_value
=150.0),
4181 Float(title
=_("Critical at"), unit
=_('ms'), default_value
=200.0)
4185 title
=_("I/O Database Writes (Attached) Average Latency"),
4187 Float(title
=_("Warning at"), unit
=_('ms'), default_value
=40.0),
4188 Float(title
=_("Critical at"), unit
=_('ms'), default_value
=50.0)
4192 title
=_("I/O Log Writes Average Latency"),
4194 Float(title
=_("Warning at"), unit
=_('ms'), default_value
=5.0),
4195 Float(title
=_("Critical at"), unit
=_('ms'), default_value
=10.0)
4200 title
=_("Database Name"),
4201 help=_("Specify database names that the rule should apply to"),
4206 def transform_msx_queues(params
):
4207 if isinstance(params
, tuple):
4208 return {"levels": (params
[0], params
[1])}
4212 register_check_parameters(
4213 RulespecGroupCheckParametersApplications
, "msx_queues", _("MS Exchange Message Queues"),
4216 title
=_("Set Levels"),
4220 title
=_("Maximum Number of E-Mails in Queue"),
4222 Integer(title
=_("Warning at"), unit
=_("E-Mails")),
4223 Integer(title
=_("Critical at"), unit
=_("E-Mails"))
4229 _("Use this only if you want to overwrite the postion of the information in the agent "
4230 "output. Also refer to the rule <i>Microsoft Exchange Queues Discovery</i> "
4233 optional_keys
=["offset"],
4235 forth
=transform_msx_queues
,
4238 title
=_("Explicit Queue Names"),
4239 help=_("Specify queue names that the rule should apply to"),
4242 register_check_parameters(
4243 RulespecGroupCheckParametersApplications
, "msexch_copyqueue", _("MS Exchange DAG CopyQueue"),
4245 title
=_("Upper Levels for CopyQueue Length"),
4246 help=_("This rule sets upper levels to the number of transaction logs waiting to be copied "
4247 "and inspected on your Exchange Mailbox Servers in a Database Availability Group "
4248 "(DAG). This is also known as the CopyQueue length."),
4249 elements
=[Integer(title
=_("Warning at")),
4250 Integer(title
=_("Critical at"))],
4252 title
=_("Database Name"),
4253 help=_("The database name on the Mailbox Server."),
4256 register_check_parameters(RulespecGroupCheckParametersStorage
, "mongodb_collections",
4257 _("MongoDB Collection Size"),
4258 Dictionary(elements
=fs_levels_elements
+ size_trend_elements
),
4259 TextAscii(title
=_("Collection name"),), "dict")
4261 register_check_parameters(
4262 RulespecGroupCheckParametersStorage
, "volume_groups", _("Volume Groups (LVM)"),
4267 title
=_("Levels for volume group"),
4268 show_alternative_title
=True,
4269 default_value
=(80.0, 90.0),
4270 match
=match_dual_level_type
,
4272 get_free_used_dynamic_valuespec("used", "volume group"),
4274 get_free_used_dynamic_valuespec(
4275 "free", "volume group", default_value
=(20.0, 10.0)),
4276 title
=_("Levels for volume group free space"),
4278 forth
=transform_filesystem_free
,
4279 back
=transform_filesystem_free
)
4282 optional_keys
=False), TextAscii(title
=_("Volume Group"), allow_empty
=False), "dict")
4284 register_check_parameters(
4285 RulespecGroupCheckParametersStorage
, "ibm_svc_mdiskgrp", _("IBM SVC Pool Capacity"),
4287 elements
=filesystem_elements
+ [
4288 ("provisioning_levels",
4290 title
=_("Provisioning Levels"),
4291 help=_("A provisioning of over 100% means over provisioning."),
4294 title
=_("Warning at a provisioning of"),
4295 default_value
=110.0,
4298 title
=_("Critical at a provisioning of"),
4299 default_value
=120.0,
4303 hidden_keys
=["flex_levels"],
4304 ), TextAscii(title
=_("Name of the pool"), allow_empty
=False), "dict")
4306 register_check_parameters(
4307 RulespecGroupCheckParametersOperatingSystem
,
4309 _("Storage Processor Utilization"),
4311 title
=_("Specify levels in percentage of storage processor usage"),
4313 Percentage(title
=_("Warning at"), default_value
=50.0),
4314 Percentage(title
=_("Critical at"), default_value
=60.0),
4320 register_check_parameters(
4321 RulespecGroupCheckParametersStorage
, "esx_vsphere_datastores",
4322 _("ESX Datastores (used space and growth)"),
4324 elements
=filesystem_elements
+ [
4325 ("provisioning_levels",
4327 title
=_("Provisioning Levels"),
4329 _("A provisioning of more than 100% is called "
4330 "over provisioning and can be a useful strategy for saving disk space. But you cannot guarantee "
4331 "any longer that every VM can really use all space that it was assigned. Here you can "
4332 "set levels for the maximum provisioning. A warning level of 150% will warn at 50% over provisioning."
4336 title
=_("Warning at a provisioning of"),
4338 default_value
=120.0),
4340 title
=_("Critical at a provisioning of"),
4342 default_value
=150.0),
4345 hidden_keys
=["flex_levels"],
4346 ), TextAscii(title
=_("Datastore Name"), help=_("The name of the Datastore"), allow_empty
=False),
4349 register_check_parameters(
4350 RulespecGroupCheckParametersStorage
, "esx_hostystem_maintenance",
4351 _("ESX Hostsystem Maintenance Mode"),
4356 title
=_("Target State"),
4357 help=_("Configure the target mode for the system."),
4359 ('true', "System should be in Maintenance Mode"),
4360 ('false', "System not should be in Maintenance Mode"),
4364 register_check_parameters(
4365 RulespecGroupCheckParametersNetworking
, "bonding", _("Status of Linux bonding interfaces"),
4366 Dictionary(elements
=[
4369 title
=_("Warn on unexpected active interface"),
4371 ("ignore", _("ignore which one is active")),
4372 ("primary", _("require primary interface to be active")),
4373 ("lowest", _("require interface that sorts lowest alphabetically")),
4375 default_value
="ignore",
4377 ("ieee_302_3ad_agg_id_missmatch_state",
4379 title
=_("State for missmatching Aggregator IDs for LACP"),
4382 ]), TextAscii(title
=_("Name of the bonding interface"),), "dict")
4385 def vs_interface_traffic():
4387 return CascadingDropdown(
4388 orientation
="horizontal",
4389 choices
=[("perc", _("Percentual levels (in relation to port speed)"),
4391 orientation
="float",
4394 Percentage(label
=_("Warning at")),
4395 Percentage(label
=_("Critical at")),
4397 ("abs", _("Absolute levels in bits or bytes per second"),
4399 orientation
="float",
4402 Integer(label
=_("Warning at")),
4403 Integer(label
=_("Critical at")),
4404 ])), ("predictive", _("Predictive Levels"), PredictiveLevels())])
4406 return CascadingDropdown(
4407 orientation
="horizontal",
4409 ("upper", _("Upper"), vs_abs_perc()),
4410 ("lower", _("Lower"), vs_abs_perc()),
4414 def transform_if(v
):
4417 if 'traffic' in v
and not isinstance(v
['traffic'], list):
4418 warn
, crit
= v
['traffic']
4419 if isinstance(warn
, int):
4420 new_traffic
.append(('both', ('upper', ('abs', (warn
, crit
)))))
4421 elif isinstance(warn
, float):
4422 new_traffic
.append(('both', ('upper', ('perc', (warn
, crit
)))))
4424 if 'traffic_minimum' in v
:
4425 warn
, crit
= v
['traffic_minimum']
4426 if isinstance(warn
, int):
4427 new_traffic
.append(('both', ('lower', ('abs', (warn
, crit
)))))
4428 elif isinstance(warn
, float):
4429 new_traffic
.append(('both', ('lower', ('perc', (warn
, crit
)))))
4430 del v
['traffic_minimum']
4433 v
['traffic'] = new_traffic
4438 register_check_parameters(
4439 RulespecGroupCheckParametersNetworking
,
4441 _("Network interfaces and switch ports"),
4442 # Transform old traffic related levels which used "traffic" and "traffic_minimum"
4443 # keys where each was configured with an Alternative valuespec
4446 ignored_keys
=["aggregate"], # Created by discovery when using interface grouping
4450 title
=_("Levels for error rates"),
4452 _("These levels make the check go warning or critical whenever the "
4453 "<b>percentual error rate</b> or the <b>absolute error rate</b> of the monitored interface reaches "
4454 "the given bounds. The percentual error rate is computed by dividing number of "
4455 "errors by the total number of packets (successful plus errors)."),
4458 title
=_("Percentual levels for error rates"),
4461 title
=_("Warning at"),
4462 unit
=_("percent errors"),
4464 display_format
='%.3f'),
4466 title
=_("Critical at"),
4467 unit
=_("percent errors"),
4469 display_format
='%.3f')
4472 title
=_("Absolute levels for error rates"),
4474 Integer(title
=_("Warning at"), unit
=_("errors")),
4475 Integer(title
=_("Critical at"), unit
=_("errors"))
4479 OptionalDropdownChoice(
4480 title
=_("Operating speed"),
4481 help=_("If you use this parameter then the check goes warning if the "
4482 "interface is not operating at the expected speed (e.g. it "
4483 "is working with 100Mbit/s instead of 1Gbit/s.<b>Note:</b> "
4484 "some interfaces do not provide speed information. In such cases "
4485 "this setting is used as the assumed speed when it comes to "
4486 "traffic monitoring (see below)."),
4488 (None, _("ignore speed")),
4489 (10000000, "10 Mbit/s"),
4490 (100000000, "100 Mbit/s"),
4491 (1000000000, "1 Gbit/s"),
4492 (10000000000, "10 Gbit/s"),
4494 otherlabel
=_("specify manually ->"),
4496 title
=_("Other speed in bits per second"), label
=_("Bits per second")))),
4500 title
=_("Allowed states:"), choices
=defines
.interface_oper_states()),
4501 title
=_("Operational state"),
4503 _("If you activate the monitoring of the operational state (<tt>ifOperStatus</tt>) "
4504 "the check will get warning or critical if the current state "
4505 "of the interface does not match one of the expected states. Note: the status 9 (<i>admin down</i>) "
4506 "is only visible if you activate this status during switch port inventory or if you manually "
4507 "use the check plugin <tt>if64adm</tt> instead of <tt>if64</tt>."),
4508 label
=_("Ignore the operational state"),
4509 none_label
=_("ignore"),
4514 orientation
="horizontal",
4516 DropdownChoice(choices
=defines
.interface_oper_states()),
4519 title
=_('Map operational states'),
4521 ("assumed_speed_in",
4522 OptionalDropdownChoice(
4523 title
=_("Assumed input speed"),
4525 "If the automatic detection of the link speed does not work "
4526 "or the switch's capabilities are throttled because of the network setup "
4527 "you can set the assumed speed here."),
4529 (None, _("ignore speed")),
4530 (10000000, "10 Mbit/s"),
4531 (100000000, "100 Mbit/s"),
4532 (1000000000, "1 Gbit/s"),
4533 (10000000000, "10 Gbit/s"),
4535 otherlabel
=_("specify manually ->"),
4536 default_value
=16000000,
4538 title
=_("Other speed in bits per second"),
4539 label
=_("Bits per second"),
4541 ("assumed_speed_out",
4542 OptionalDropdownChoice(
4543 title
=_("Assumed output speed"),
4545 "If the automatic detection of the link speed does not work "
4546 "or the switch's capabilities are throttled because of the network setup "
4547 "you can set the assumed speed here."),
4549 (None, _("ignore speed")),
4550 (10000000, "10 Mbit/s"),
4551 (100000000, "100 Mbit/s"),
4552 (1000000000, "1 Gbit/s"),
4553 (10000000000, "10 Gbit/s"),
4555 otherlabel
=_("specify manually ->"),
4556 default_value
=1500000,
4558 title
=_("Other speed in bits per second"),
4559 label
=_("Bits per second"),
4563 title
=_("Measurement unit"),
4564 help=_("Here you can specifiy the measurement unit of the network interface"),
4565 default_value
="byte",
4568 ("byte", _("Bytes")),
4573 title
=_("Change infotext in check output"),
4575 _("This setting allows you to modify the information text which is displayed between "
4576 "the two brackets in the check output. Please note that this setting does not work for "
4577 "grouped interfaces, since the additional information of grouped interfaces is different"
4580 ("alias", _("Show alias")),
4581 ("description", _("Show description")),
4582 ("alias_and_description", _("Show alias and description")),
4583 ("alias_or_description", _("Show alias if set, else description")),
4584 ("desription_or_alias", _("Show description if set, else alias")),
4585 ("hide", _("Hide infotext")),
4590 title
=_("Direction"),
4591 orientation
="horizontal",
4593 ('both', _("In / Out"), vs_interface_traffic()),
4594 ('in', _("In"), vs_interface_traffic()),
4595 ('out', _("Out"), vs_interface_traffic()),
4597 title
=_("Used bandwidth (minimum or maximum traffic)"),
4598 help=_("Setting levels on the used bandwidth is optional. If you do set "
4599 "levels you might also consider using averaging."),
4604 title
=_("Non-unicast packet rates"),
4606 "Setting levels on non-unicast packet rates is optional. This may help "
4607 "to detect broadcast storms and other unwanted traffic."),
4609 Integer(title
=_("Warning at"), unit
=_("pkts / sec")),
4610 Integer(title
=_("Critical at"), unit
=_("pkts / sec")),
4615 title
=_("Absolute levels for discards rates"),
4617 Integer(title
=_("Warning at"), unit
=_("discards")),
4618 Integer(title
=_("Critical at"), unit
=_("discards"))
4622 title
=_("Average values"),
4623 help=_("By activating the computation of averages, the levels on "
4624 "errors and traffic are applied to the averaged value. That "
4625 "way you can make the check react only on long-time changes, "
4626 "not on one-minute events."),
4634 TextAscii(title
=_("port specification"), allow_empty
=False),
4638 register_check_parameters(
4639 RulespecGroupCheckParametersNetworking
,
4641 _("Fibrechannel Interfaces"),
4642 Dictionary(elements
=[
4644 OptionalDropdownChoice(
4645 title
=_("Operating speed"),
4646 help=_("If you use this parameter then the check goes warning if the "
4647 "interface is not operating at the expected speed (e.g. it "
4648 "is working with 8Gbit/s instead of 16Gbit/s)."),
4650 (None, _("ignore speed")),
4651 (4000000000, "4 Gbit/s"),
4652 (8000000000, "8 Gbit/s"),
4653 (16000000000, "16 Gbit/s"),
4655 otherlabel
=_("specify manually ->"),
4657 title
=_("Other speed in bits per second"), label
=_("Bits per second")))),
4661 title
=_("Direction"),
4662 orientation
="horizontal",
4664 ('both', _("In / Out"), vs_interface_traffic()),
4665 ('in', _("In"), vs_interface_traffic()),
4666 ('out', _("Out"), vs_interface_traffic()),
4668 title
=_("Used bandwidth (minimum or maximum traffic)"),
4669 help=_("Setting levels on the used bandwidth is optional. If you do set "
4670 "levels you might also consider using averaging."),
4674 title
=_("Read latency"),
4677 default_levels
=(50.0, 100.0))),
4680 title
=_("Write latency"),
4683 default_levels
=(50.0, 100.0))),
4686 title
=_("Overall latency"),
4689 default_levels
=(50.0, 100.0))),
4691 TextAscii(title
=_("Port specification"), allow_empty
=False),
4695 register_check_parameters(
4696 RulespecGroupCheckParametersNetworking
,
4698 _("Signal quality of Wireless device"),
4700 Percentage(title
=_("Warning if under"), maxvalue
=100),
4701 Percentage(title
=_("Critical if under"), maxvalue
=100),
4703 TextAscii(title
=_("Network specification"), allow_empty
=True),
4707 register_check_parameters(
4708 RulespecGroupCheckParametersNetworking
,
4711 Dictionary(elements
=[
4714 title
=_("RTT type"),
4716 ('echo', _("echo")),
4717 ('path echo', _("path echo")),
4718 ('file IO', _("file IO")),
4719 ('UDP echo', _("UDP echo")),
4720 ('TCP connect', _("TCP connect")),
4721 ('HTTP', _("HTTP")),
4723 ('jitter', _("jitter")),
4724 ('DLSw', _("DLSw")),
4725 ('DHCP', _("DHCP")),
4727 ('VoIP', _("VoIP")),
4729 ('LSP group', _("LSP group")),
4730 ('ICMP jitter', _("ICMP jitter")),
4731 ('LSP ping', _("LSP ping")),
4732 ('LSP trace', _("LSP trace")),
4733 ('ethernet ping', _("ethernet ping")),
4734 ('ethernet jitter', _("ethernet jitter")),
4735 ('LSP ping pseudowire', _("LSP ping pseudowire")),
4737 default_value
="echo",
4741 title
=_("Treshold"),
4742 help=_("Depending on the precision the unit can be "
4743 "either milliseconds or micoseconds."),
4752 ('active', _("active")),
4753 ('inactive', _("inactive")),
4754 ('reset', _("reset")),
4755 ('orderly stop', _("orderly stop")),
4756 ('immediate stop', _("immediate stop")),
4757 ('pending', _("pending")),
4758 ('restart', _("restart")),
4760 default_value
="active",
4762 ("connection_lost_occured",
4764 title
=_("Connection lost occured"),
4773 title
=_("Timeout occured"),
4780 ("completion_time_over_treshold_occured",
4782 title
=_("Completion time over treshold occured"),
4789 ("latest_rtt_completion_time",
4791 title
=_("Latest RTT completion time"),
4792 help=_("Depending on the precision the unit can be "
4793 "either milliseconds or micoseconds."),
4796 title
=_("Warning at"),
4802 title
=_("Critical at"),
4808 ("latest_rtt_state",
4810 title
=_("Latest RTT state"),
4813 ('disconnected', _("disconnected")),
4814 ('over treshold', _("over treshold")),
4815 ('timeout', _("timeout")),
4816 ('other', _("other")),
4822 title
=_("RTT row index of the service"),
4828 register_check_parameters(
4829 RulespecGroupCheckParametersNetworking
,
4831 _("Cisco quality of service"),
4832 Dictionary(elements
=[
4835 title
=_("Measurement unit"),
4836 help=_("Here you can specifiy the measurement unit of the network interface"),
4837 default_value
="bit",
4840 ("byte", _("Bytes")),
4845 title
=_("Used bandwidth (traffic)"),
4846 help=_("Settings levels on the used bandwidth is optional. If you do set "
4847 "levels you might also consider using averaging."),
4850 title
=_("Percentual levels (in relation to policy speed)"),
4853 title
=_("Warning at"), maxvalue
=1000, label
=_("% of port speed")),
4855 title
=_("Critical at"), maxvalue
=1000, label
=_("% of port speed")),
4858 title
=_("Absolute levels in bits or bytes per second"),
4860 _("Depending on the measurement unit (defaults to bit) the absolute levels are set in bit or byte"
4864 title
=_("Warning at"), size
=10, label
=_("bits / bytes per second")),
4866 title
=_("Critical at"), size
=10, label
=_("bits / bytes per second")),
4871 title
=_("Average values"),
4872 help=_("By activating the computation of averages, the levels on "
4873 "errors and traffic are applied to the averaged value. That "
4874 "way you can make the check react only on long-time changes, "
4875 "not on one-minute events."),
4881 title
=_("Number of dropped bits or bytes per second"),
4883 "Depending on the measurement unit (defaults to bit) you can set the warn and crit "
4884 "levels for the number of dropped bits or bytes"),
4887 title
=_("Percentual levels (in relation to policy speed)"),
4890 title
=_("Warning at"), maxvalue
=1000, label
=_("% of port speed")),
4892 title
=_("Critical at"), maxvalue
=1000, label
=_("% of port speed")),
4895 Integer(title
=_("Warning at"), size
=8, label
=_("bits / bytes per second")),
4896 Integer(title
=_("Critical at"), size
=8, label
=_("bits / bytes per second")),
4900 TextAscii(title
=_("port specification"), allow_empty
=False),
4904 register_check_parameters(
4905 RulespecGroupCheckParametersOperatingSystem
, "innovaphone_mem", _("Innovaphone Memory Usage"),
4907 title
=_("Specify levels in percentage of total RAM"),
4909 Percentage(title
=_("Warning at a usage of"), unit
=_("% of RAM")),
4910 Percentage(title
=_("Critical at a usage of"), unit
=_("% of RAM")),
4913 register_check_parameters(
4914 RulespecGroupCheckParametersOperatingSystem
, "mem_pages", _("Memory Pages Statistics"),
4915 Dictionary(elements
=[(
4918 title
=_("Pages per second"),
4920 Integer(title
=_("Warning at"), unit
=_("pages/s")),
4921 Integer(title
=_("Critical at"), unit
=_("pages/s")),
4925 register_check_parameters(
4926 RulespecGroupCheckParametersOperatingSystem
,
4928 _("Statgrab Memory Usage"),
4929 Alternative(elements
=[
4931 title
=_("Specify levels in percentage of total RAM"),
4933 Percentage(title
=_("Warning at a usage of"), unit
=_("% of RAM"), maxvalue
=None),
4934 Percentage(title
=_("Critical at a usage of"), unit
=_("% of RAM"), maxvalue
=None)
4937 title
=_("Specify levels in absolute usage values"),
4939 Integer(title
=_("Warning at"), unit
=_("MB")),
4940 Integer(title
=_("Critical at"), unit
=_("MB"))
4948 register_check_parameters(
4949 RulespecGroupCheckParametersOperatingSystem
,
4951 _("Cisco Memory Usage"),
4953 Dictionary(elements
=[
4956 title
=_("Levels for memory usage"),
4959 title
=_("Specify levels in percentage of total RAM"),
4962 title
=_("Warning at a usage of"),
4966 title
=_("Critical at a usage of"),
4971 title
=_("Specify levels in absolute usage values"),
4973 Integer(title
=_("Warning at"), unit
=_("MB")),
4974 Integer(title
=_("Critical at"), unit
=_("MB"))
4977 ] + size_trend_elements
),
4978 forth
=lambda spec
: spec
if isinstance(spec
, dict) else {"levels": spec
},
4980 TextAscii(title
=_("Memory Pool Name"), allow_empty
=False),
4984 register_check_parameters(
4985 RulespecGroupCheckParametersOperatingSystem
, "juniper_mem", _("Juniper Memory Usage"),
4987 title
=_("Specify levels in percentage of total memory usage"),
4990 title
=_("Warning at a usage of"),
4995 title
=_("Critical at a usage of"),
5001 # TODO: Remove situations where a rule is used once with and once without items
5002 register_check_parameters(
5003 RulespecGroupCheckParametersOperatingSystem
,
5004 "juniper_mem_modules",
5005 _("Juniper Modules Memory Usage"),
5007 title
=_("Specify levels in percentage of total memory usage"),
5010 title
=_("Warning at a usage of"),
5015 title
=_("Critical at a usage of"),
5021 title
=_("Module Name"),
5022 help=_("The identificator of the module."),
5027 register_check_parameters(
5028 RulespecGroupCheckParametersOperatingSystem
,
5030 _("Juniper Processor Utilization of Routing Engine"),
5033 help=_("CPU utilization of routing engine."),
5039 title
=_("Specify levels in percentage of processor routing engine usage"),
5041 Percentage(title
=_("Warning at"), default_value
=80.0),
5042 Percentage(title
=_("Critical at"), default_value
=90.0),
5047 forth
=lambda old
: not old
and {'levels': (80.0, 90.0)} or old
,
5049 TextAscii(title
=_("Routing Engine"),),
5053 register_check_parameters(
5054 RulespecGroupCheckParametersOperatingSystem
, "netscaler_mem", _("Netscaler Memory Usage"),
5056 title
=_("Specify levels in percentage of total memory usage"),
5059 title
=_("Warning at a usage of"),
5064 title
=_("Critical at a usage of"),
5070 register_check_parameters(
5071 RulespecGroupCheckParametersOperatingSystem
, "netscaler_vserver", _("Netscaler VServer States"),
5072 Dictionary(elements
=[
5075 title
=_("Lower health levels"),
5077 Percentage(title
=_("Warning below"), default_value
=100.0),
5078 Percentage(title
=_("Critical below"), default_value
=0.1),
5080 ]), TextAscii(title
=_("Name of VServer")), "dict")
5082 register_check_parameters(
5083 RulespecGroupCheckParametersOperatingSystem
,
5084 "general_flash_usage",
5085 _("Flash Space Usage"),
5086 Alternative(elements
=[
5088 title
=_("Specify levels in percentage of total Flash"),
5090 Percentage(title
=_("Warning at a usage of"), label
=_("% of Flash"), maxvalue
=None),
5091 Percentage(title
=_("Critical at a usage of"), label
=_("% of Flash"), maxvalue
=None)
5094 title
=_("Specify levels in absolute usage values"),
5096 Integer(title
=_("Warning at"), unit
=_("MB")),
5097 Integer(title
=_("Critical at"), unit
=_("MB"))
5104 register_check_parameters(
5105 RulespecGroupCheckParametersOperatingSystem
,
5106 "cisco_supervisor_mem",
5107 _("Cisco Nexus Supervisor Memory Usage"),
5109 title
=_("The average utilization of memory on the active supervisor"),
5111 Percentage(title
=_("Warning at a usage of"), default_value
=80.0, maxvalue
=100.0),
5112 Percentage(title
=_("Critical at a usage of"), default_value
=90.0, maxvalue
=100.0)
5119 def UsedSize(**args
):
5120 GB
= 1024 * 1024 * 1024
5123 Filesize(title
=_("Warning at"), default_value
=1 * GB
),
5124 Filesize(title
=_("Critical at"), default_value
=2 * GB
),
5129 def FreeSize(**args
):
5130 GB
= 1024 * 1024 * 1024
5133 Filesize(title
=_("Warning below"), default_value
=2 * GB
),
5134 Filesize(title
=_("Critical below"), default_value
=1 * GB
),
5139 def UsedPercentage(default_percents
=None, of_what
=None):
5141 unit
= _("%% of %s") % of_what
5146 return Tuple(elements
=[
5148 title
=_("Warning at"),
5149 default_value
=default_percents
and default_percents
[0] or 80.0,
5154 title
=_("Critical at"),
5155 default_value
=default_percents
and default_percents
[1] or 90.0,
5161 def FreePercentage(default_percents
=None, of_what
=None):
5163 unit
= _("%% of %s") % of_what
5166 return Tuple(elements
=[
5168 title
=_("Warning below"),
5169 default_value
=default_percents
and default_percents
[0] or 20.0,
5172 title
=_("Critical below"),
5173 default_value
=default_percents
and default_percents
[1] or 10.0,
5178 def DualMemoryLevels(what
, default_percents
=None):
5179 return CascadingDropdown(
5180 title
=_("Levels for %s") % what
,
5182 ("perc_used", _("Percentual levels for used %s") % what
,
5183 UsedPercentage(default_percents
)),
5184 ("perc_free", _("Percentual levels for free %s") % what
, FreePercentage()),
5185 ("abs_used", _("Absolute levels for used %s") % what
, UsedSize()),
5186 ("abs_free", _("Absolute levels for free %s") % what
, FreeSize()),
5187 # PredictiveMemoryChoice(_("used %s") % what), # not yet implemented
5188 ("ignore", _("Do not impose levels")),
5192 def UpperMemoryLevels(what
, default_percents
=None, of_what
=None):
5193 return CascadingDropdown(
5194 title
=_("Upper levels for %s") % what
,
5196 ("perc_used", _("Percentual levels%s") % (of_what
and
5197 (_(" in relation to %s") % of_what
) or ""),
5198 UsedPercentage(default_percents
, of_what
)),
5199 ("abs_used", _("Absolute levels"), UsedSize()),
5200 # PredictiveMemoryChoice(what), # not yet implemented
5201 ("ignore", _("Do not impose levels")),
5205 def LowerMemoryLevels(what
, default_percents
=None, of_what
=None, help_text
=None):
5206 return CascadingDropdown(
5207 title
=_("Lower levels for %s") % what
,
5210 ("perc_free", _("Percentual levels"), FreePercentage(default_percents
, of_what
)),
5211 ("abs_free", _("Absolute levels"), FreeSize()),
5212 # PredictiveMemoryChoice(what), # not yet implemented
5213 ("ignore", _("Do not impose levels")),
5217 # Beware: This is not yet implemented in the check.
5218 # def PredictiveMemoryChoice(what):
5219 # return ( "predictive", _("Predictive levels for %s") % what,
5222 # default_difference = (0.5, 1.0)
5225 register_check_parameters(
5226 RulespecGroupCheckParametersOperatingSystem
,
5228 _("Memory and Swap usage on Linux"),
5231 ("levels_ram", DualMemoryLevels(_("RAM"))),
5232 ("levels_swap", DualMemoryLevels(_("Swap"))),
5233 ("levels_virtual", DualMemoryLevels(_("Total virtual memory"), (80.0, 90.0))),
5235 UpperMemoryLevels(_("Total Data in relation to RAM"), (120.0, 150.0), _("RAM"))),
5236 ("levels_shm", UpperMemoryLevels(_("Shared memory"), (20.0, 30.0), _("RAM"))),
5237 ("levels_pagetables", UpperMemoryLevels(_("Page tables"), (8.0, 16.0), _("RAM"))),
5238 ("levels_writeback", UpperMemoryLevels(_("Disk Writeback"))),
5239 ("levels_committed",
5240 UpperMemoryLevels(_("Committed memory"), (100.0, 150.0), _("RAM + Swap"))),
5241 ("levels_commitlimit",
5242 LowerMemoryLevels(_("Commit Limit"), (20.0, 10.0), _("RAM + Swap"))),
5243 ("levels_available",
5245 _("Estimated RAM for new processes"), (20.0, 10.0), _("RAM"),
5246 _("If the host has a kernel of version 3.14 or newer, the information MemAvailable is provided: "
5247 "\"An estimate of how much memory is available for starting new "
5248 "applications, without swapping. Calculated from MemFree, "
5249 "SReclaimable, the size of the file LRU lists, and the low "
5250 "watermarks in each zone. "
5251 "The estimate takes into account that the system needs some "
5252 "page cache to function well, and that not all reclaimable "
5253 "slab will be reclaimable, due to items being in use. The "
5254 "impact of those factors will vary from system to system.\" "
5255 "(https://www.kernel.org/doc/Documentation/filesystems/proc.txt)"))),
5256 ("levels_vmalloc", LowerMemoryLevels(_("Largest Free VMalloc Chunk"))),
5257 ("handle_hw_corrupted_error",
5259 title
=_("Handle Hardware Corrupted Error"),
5267 register_check_parameters(
5268 RulespecGroupCheckParametersOperatingSystem
,
5270 _("Main memory usage (UNIX / Other Devices)"),
5277 title
=_("Levels for memory"),
5278 show_alternative_title
=True,
5279 default_value
=(150.0, 200.0),
5280 match
=match_dual_level_type
,
5282 _("The used and free levels for the memory on UNIX systems take into account the "
5283 "currently used memory (RAM or SWAP) by all processes and sets this in relation "
5284 "to the total RAM of the system. This means that the memory usage can exceed 100%. "
5285 "A usage of 200% means that the total size of all processes is twice as large as "
5286 "the main memory, so <b>at least</b> half of it is currently swapped out. For systems "
5287 "without Swap space you should choose levels below 100%."),
5290 title
=_("Levels for used memory"),
5294 title
=_("Specify levels in percentage of total RAM"),
5297 title
=_("Warning at a usage of"), maxvalue
=None),
5299 title
=_("Critical at a usage of"), maxvalue
=None)
5302 title
=_("Specify levels in absolute values"),
5304 Integer(title
=_("Warning at"), unit
=_("MB")),
5305 Integer(title
=_("Critical at"), unit
=_("MB"))
5313 title
=_("Specify levels in percentage of total RAM"),
5316 title
=_("Warning if less than"), maxvalue
=None),
5318 title
=_("Critical if less than"), maxvalue
=None)
5321 title
=_("Specify levels in absolute values"),
5323 Integer(title
=_("Warning if below"), unit
=_("MB")),
5324 Integer(title
=_("Critical if below"), unit
=_("MB"))
5327 title
=_("Levels for free memory"),
5329 _("Keep in mind that if you have 1GB RAM and 1GB SWAP you need to "
5330 "specify 120% or 1200MB to get an alert if there is only 20% free RAM available. "
5331 "The free memory levels do not work with the fortigate check, because it does "
5332 "not provide total memory data."),
5334 forth
=lambda val
: tuple(-x
for x
in val
),
5335 back
=lambda val
: tuple(-x
for x
in val
))
5340 title
=_("Averaging"),
5341 help=_("If this parameter is set, all measured values will be averaged "
5342 "over the specified time interval before levels are being applied. Per "
5343 "default, averaging is turned off."),
5349 optional_keys
=["average"],
5351 forth
=lambda t
: isinstance(t
, tuple) and {"levels": t
} or t
,
5357 register_check_parameters(
5358 RulespecGroupCheckParametersOperatingSystem
, "memory_relative",
5359 _("Main memory usage for Brocade fibre channel switches"),
5360 OptionalDropdownChoice(
5361 title
=_("Memory usage"),
5362 choices
=[(None, _("Do not impose levels"))],
5363 otherlabel
=_("Percentual levels ->"),
5364 explicit
=Tuple(elements
=[
5365 Integer(title
=_("Warning at"), default_value
=85, unit
="%"),
5366 Integer(title
=_("Critical at"), default_value
=90, unit
="%"),
5369 register_check_parameters(
5370 RulespecGroupCheckParametersOperatingSystem
,
5372 _("Main memory usage of simple devices"),
5375 help=_("Memory levels for simple devices not running more complex OSs"),
5379 title
=_("Levels for memory usage"),
5381 ("perc_used", _("Percentual levels for used memory"),
5384 title
=_("Warning at a memory usage of"),
5388 title
=_("Critical at a memory usage of"),
5392 ("abs_free", _("Absolute levels for free memory"),
5394 Filesize(title
=_("Warning below")),
5395 Filesize(title
=_("Critical below"))
5397 ("ignore", _("Do not impose levels")),
5402 # Convert default levels from discovered checks
5403 forth
=lambda v
: not isinstance(v
, dict) and {"levels": ("perc_used", v
)} or v
,
5406 title
=_("Module name or empty"),
5407 help=_("Leave this empty for systems without modules, which just "
5408 "have one global memory usage."),
5414 register_check_parameters(
5415 RulespecGroupCheckParametersOperatingSystem
,
5417 _("Main memory usage of devices with modules"),
5420 "The memory levels for one specific module of this host. This is relevant for hosts that have "
5421 "several distinct memory areas, e.g. pluggable cards"),
5425 title
=_("Memory levels"),
5428 title
=_("Specify levels in percentage of total RAM"),
5431 title
=_("Warning at a memory usage of"),
5435 title
=_("Critical at a memory usage of"),
5440 title
=_("Specify levels in absolute usage values"),
5442 Filesize(title
=_("Warning at")),
5443 Filesize(title
=_("Critical at"))
5448 TextAscii(title
=_("Module name"), allow_empty
=False),
5452 register_check_parameters(
5453 RulespecGroupCheckParametersOperatingSystem
,
5455 _("Memory and Swap usage on Arbor devices"),
5458 ("levels_ram", DualMemoryLevels(_("RAM"))),
5459 ("levels_swap", DualMemoryLevels(_("Swap"))),
5465 register_check_parameters(
5466 RulespecGroupCheckParametersNetworking
, "mem_cluster", _("Memory Usage of Clusters"),
5469 Integer(title
=_("Equal or more than"), unit
=_("nodes")),
5471 title
=_("Percentage of total RAM"),
5473 Percentage(title
=_("Warning at a RAM usage of"), default_value
=80.0),
5474 Percentage(title
=_("Critical at a RAM usage of"), default_value
=90.0),
5477 help=_("Here you can specify the total memory usage levels for clustered hosts."),
5478 title
=_("Memory Usage"),
5479 add_label
=_("Add limits")), None, "first", False)
5481 register_check_parameters(
5482 RulespecGroupCheckParametersNetworking
, "cpu_utilization_cluster",
5483 _("CPU Utilization of Clusters"),
5486 Integer(title
=_("Equal or more than"), unit
=_("nodes")),
5489 Percentage(title
=_("Warning at a utilization of"), default_value
=90.0),
5490 Percentage(title
=_("Critical at a utilization of"), default_value
=95.0)
5492 title
=_("Alert on too high CPU utilization"),
5496 "Configure levels for averaged CPU utilization depending on number of cluster nodes. "
5497 "The CPU utilization sums up the percentages of CPU time that is used "
5498 "for user processes and kernel routines over all available cores within "
5499 "the last check interval. The possible range is from 0% to 100%"),
5500 title
=_("Memory Usage"),
5501 add_label
=_("Add limits")), None, "first", False)
5503 register_check_parameters(
5504 RulespecGroupCheckParametersOperatingSystem
,
5506 _("Main memory usage of ESX host system"),
5508 title
=_("Specify levels in percentage of total RAM"),
5510 Percentage(title
=_("Warning at a RAM usage of"), default_value
=80.0),
5511 Percentage(title
=_("Critical at a RAM usage of"), default_value
=90.0),
5517 register_check_parameters(
5518 RulespecGroupCheckParametersOperatingSystem
,
5520 _("Virtual machine (for example ESX) guest tools status"),
5522 optional_keys
=False,
5524 ("guestToolsCurrent",
5526 title
=_("VMware Tools is installed, and the version is current"),
5529 ("guestToolsNeedUpgrade",
5531 title
=_("VMware Tools is installed, but the version is not current"),
5534 ("guestToolsNotInstalled",
5536 title
=_("VMware Tools have never been installed"),
5539 ("guestToolsUnmanaged",
5541 title
=_("VMware Tools is installed, but it is not managed by VMWare"),
5548 register_check_parameters(
5549 RulespecGroupCheckParametersOperatingSystem
,
5551 _("Virtual machine (for example ESX) heartbeat status"),
5553 optional_keys
=False,
5555 ("heartbeat_missing",
5557 title
=_("No heartbeat"),
5558 help=_("Guest operating system may have stopped responding."),
5561 ("heartbeat_intermittend",
5563 title
=_("Intermittent heartbeat"),
5564 help=_("May be due to high guest load."),
5567 ("heartbeat_no_tools",
5569 title
=_("Heartbeat tools missing or not installed"),
5570 help=_("No VMWare Tools installed."),
5575 title
=_("Heartbeat OK"),
5576 help=_("Guest operating system is responding normally."),
5584 register_check_parameters(
5585 RulespecGroupCheckParametersApplications
, "services_summary", _("Windows Service Summary"),
5587 title
=_('Autostart Services'),
5591 title
=_("Ignored autostart services"),
5592 help=_('Regular expressions matching the begining of the internal name '
5593 'or the description of the service. '
5594 'If no name is given then this rule will match all services. The '
5595 'match is done on the <i>beginning</i> of the service name. It '
5596 'is done <i>case sensitive</i>. You can do a case insensitive match '
5597 'by prefixing the regular expression with <tt>(?i)</tt>. Example: '
5598 '<tt>(?i).*mssql</tt> matches all services which contain <tt>MSSQL</tt> '
5599 'or <tt>MsSQL</tt> or <tt>mssql</tt> or...'),
5600 orientation
="horizontal",
5602 ('state_if_stopped',
5604 title
=_("Default state if stopped autostart services are found"),
5610 register_check_parameters(
5611 RulespecGroupCheckParametersApplications
, "solaris_services_summary",
5612 _("Solaris Services Summary"),
5615 ('maintenance_state',
5617 title
=_("State if 'maintenance' services are found"),
5622 register_check_parameters(
5623 RulespecGroupCheckParametersApplications
,
5624 "esx_vsphere_objects",
5625 _("State of ESX hosts and virtual machines"),
5627 help=_("Usually the check goes to WARN if a VM or host is powered off and OK otherwise. "
5628 "You can change this behaviour on a per-state-basis here."),
5629 optional_keys
=False,
5633 title
=_("Target states"),
5634 optional_keys
=False,
5638 title
=_("Powered ON"),
5639 help=_("Check result if the host or VM is powered on"),
5644 title
=_("Powered OFF"),
5645 help=_("Check result if the host or VM is powered off"),
5650 title
=_("Suspended"),
5651 help=_("Check result if the host or VM is suspended"),
5658 "Check result if the host or VM state is reported as <i>unknown</i>"),
5664 title
=_("Name of the VM/HostSystem"),
5666 "Please do not forget to specify either <tt>VM</tt> or <tt>HostSystem</tt>. Example: <tt>VM abcsrv123</tt>. Also note, "
5667 "that we match the <i>beginning</i> of the name."),
5668 regex
="(^VM|HostSystem)( .*|$)",
5669 regex_error
=_("The name of the system must begin with <tt>VM</tt> or <tt>HostSystem</tt>."),
5675 register_check_parameters(
5676 RulespecGroupCheckParametersApplications
,
5677 "esx_vsphere_objects_count",
5678 _("Distribution of virtual machines over ESX hosts"),
5680 optional_keys
=False,
5685 optional_keys
=False,
5686 elements
=[("vm_names", ListOfStrings(title
=_("VMs"))),
5687 ("hosts_count", Integer(title
=_("Number of hosts"),
5690 MonitoringState(title
=_("State if violated"), default_value
=1))]),
5691 title
=_("VM distribution"),
5693 "You can specify lists of VM names and a number of hosts,"
5694 " to make sure the specfied VMs are distributed across at least so many hosts."
5695 " E.g. provide two VM names and set 'Number of hosts' to two,"
5696 " to make sure those VMs are not running on the same host."))),
5703 def windows_printer_queues_forth(old
):
5705 "warn_states": [8, 11],
5706 "crit_states": [9, 10],
5708 if isinstance(old
, tuple):
5709 default
['levels'] = old
5710 if isinstance(old
, dict):
5715 register_check_parameters(
5716 RulespecGroupCheckParametersPrinters
,
5717 "windows_printer_queues",
5718 _("Number of open jobs of a printer on windows"),
5721 title
=_("Windows Printer Configuration"),
5726 title
=_("Levels for the number of print jobs"),
5727 help=_("This rule is applied to the number of print jobs "
5728 "currently waiting in windows printer queue."),
5730 Integer(title
=_("Warning at"), unit
=_("jobs"), default_value
=40),
5731 Integer(title
=_("Critical at"), unit
=_("jobs"), default_value
=60),
5736 title
=_("States who should lead to critical"),
5748 (10, "Service Requested"),
5749 (11, "Output Bin Full"),
5751 default_value
=[9, 10],
5755 title
=_("States who should lead to warning"),
5767 (10, "Service Requested"),
5768 (11, "Output Bin Full"),
5770 default_value
=[8, 11],
5773 forth
=windows_printer_queues_forth
,
5775 TextAscii(title
=_("Printer Name"), allow_empty
=True),
5779 register_check_parameters(
5780 RulespecGroupCheckParametersPrinters
,
5782 _("Printer Input Units"),
5787 title
=_('Capacity remaining'),
5789 Percentage(title
=_("Warning at"), default_value
=0.0),
5790 Percentage(title
=_("Critical at"), default_value
=0.0),
5794 default_keys
=['capacity_levels'],
5796 TextAscii(title
=_('Unit Name'), allow_empty
=True),
5800 register_check_parameters(
5801 RulespecGroupCheckParametersPrinters
,
5803 _("Printer Output Units"),
5808 title
=_('Capacity filled'),
5810 Percentage(title
=_("Warning at"), default_value
=0.0),
5811 Percentage(title
=_("Critical at"), default_value
=0.0),
5815 default_keys
=['capacity_levels'],
5817 TextAscii(title
=_('Unit Name'), allow_empty
=True),
5821 register_check_parameters(
5822 RulespecGroupCheckParametersOperatingSystem
,
5824 _("CPU load (not utilization!)"),
5826 help=_("The CPU load of a system is the number of processes currently being "
5827 "in the state <u>running</u>, i.e. either they occupy a CPU or wait "
5828 "for one. The <u>load average</u> is the averaged CPU load over the last 1, "
5829 "5 or 15 minutes. The following levels will be applied on the average "
5830 "load. On Linux system the 15-minute average load is used when applying "
5831 "those levels. The configured levels are multiplied with the number of "
5832 "CPUs, so you should configure the levels based on the value you want to "
5833 "be warned \"per CPU\"."),
5835 default_difference
=(2.0, 4.0),
5836 default_levels
=(5.0, 10.0),
5842 register_check_parameters(
5843 RulespecGroupCheckParametersOperatingSystem
,
5845 _("CPU utilization for Appliances"),
5848 Percentage(title
=_("Warning at a utilization of")),
5849 Percentage(title
=_("Critical at a utilization of"))
5851 label
=_("Alert on too high CPU utilization"),
5852 help=_("The CPU utilization sums up the percentages of CPU time that is used "
5853 "for user processes and kernel routines over all available cores within "
5854 "the last check interval. The possible range is from 0% to 100%"),
5855 default_value
=(90.0, 95.0)),
5860 register_check_parameters(
5861 RulespecGroupCheckParametersOperatingSystem
,
5862 "cpu_utilization_multiitem",
5863 _("CPU utilization of Devices with Modules"),
5865 help=_("The CPU utilization sums up the percentages of CPU time that is used "
5866 "for user processes and kernel routines over all available cores within "
5867 "the last check interval. The possible range is from 0% to 100%"),
5872 title
=_("Alert on too high CPU utilization"),
5874 Percentage(title
=_("Warning at a utilization of"), default_value
=90.0),
5875 Percentage(title
=_("Critical at a utilization of"), default_value
=95.0)
5880 TextAscii(title
=_("Module name"), allow_empty
=False),
5884 register_check_parameters(
5885 RulespecGroupCheckParametersOperatingSystem
,
5887 _("FPGA utilization"),
5889 help=_("Give FPGA utilization levels in percent. The possible range is from 0% to 100%."),
5894 title
=_("Alert on too high FPGA utilization"),
5896 Percentage(title
=_("Warning at a utilization of"), default_value
=80.0),
5897 Percentage(title
=_("Critical at a utilization of"), default_value
=90.0)
5902 TextAscii(title
=_("FPGA"), allow_empty
=False),
5907 def transform_humidity(p
):
5908 if isinstance(p
, (list, tuple)):
5910 "levels_lower": (float(p
[1]), float(p
[0])),
5911 "levels": (float(p
[2]), float(p
[3])),
5916 register_check_parameters(
5917 RulespecGroupCheckParametersEnvironment
,
5919 _("Humidity Levels"),
5922 help=_("This Ruleset sets the threshold limits for humidity sensors"),
5926 title
=_("Upper levels"),
5928 Percentage(title
=_("Warning at")),
5929 Percentage(title
=_("Critical at")),
5933 title
=_("Lower levels"),
5935 Percentage(title
=_("Warning below")),
5936 Percentage(title
=_("Critical below")),
5939 forth
=transform_humidity
,
5942 title
=_("Sensor name"),
5943 help=_("The identifier of the sensor."),
5948 register_check_parameters(
5949 RulespecGroupCheckParametersEnvironment
,
5951 _("Humidity Levels for devices with a single sensor"),
5953 help=_("This Ruleset sets the threshold limits for humidity sensors"),
5955 Integer(title
=_("Critical at or below"), unit
="%"),
5956 Integer(title
=_("Warning at or below"), unit
="%"),
5957 Integer(title
=_("Warning at or above"), unit
="%"),
5958 Integer(title
=_("Critical at or above"), unit
="%"),
5964 db_levels_common
= [
5967 title
=_("Levels for the Tablespace usage"),
5968 default_value
=(10.0, 5.0),
5971 title
=_("Percentage free space"),
5973 Percentage(title
=_("Warning if below"), unit
=_("% free")),
5974 Percentage(title
=_("Critical if below"), unit
=_("% free")),
5977 title
=_("Absolute free space"),
5979 Integer(title
=_("Warning if below"), unit
=_("MB"), default_value
=1000),
5980 Integer(title
=_("Critical if below"), unit
=_("MB"), default_value
=500),
5984 orientation
="horizontal",
5986 Filesize(title
=_("Tablespace larger than")),
5988 title
=_("Levels for the Tablespace size"),
5991 title
=_("Percentage free space"),
5993 Percentage(title
=_("Warning if below"), unit
=_("% free")),
5994 Percentage(title
=_("Critical if below"), unit
=_("% free")),
5997 title
=_("Absolute free space"),
5999 Integer(title
=_("Warning if below"), unit
=_("MB")),
6000 Integer(title
=_("Critical if below"), unit
=_("MB")),
6005 title
=_('Dynamic levels'),
6010 title
=_("Magic factor (automatic level adaptation for large tablespaces)"),
6011 help=_("This is only be used in case of percentual levels"),
6014 default_value
=0.9)),
6017 title
=_("Reference size for magic factor"), minvalue
=1, default_value
=1000, unit
=_("MB"))),
6020 title
=_("Maximum levels if using magic factor"),
6021 help=_("The tablespace levels will never be raise above these values, when using "
6022 "the magic factor and the tablespace is very small."),
6025 title
=_("Maximum warning level"),
6028 default_value
=60.0),
6030 title
=_("Maximum critical level"),
6037 register_check_parameters(
6038 RulespecGroupCheckParametersApplications
,
6039 "oracle_tablespaces",
6040 _("Oracle Tablespaces"),
6042 help=_("A tablespace is a container for segments (tables, indexes, etc). A "
6043 "database consists of one or more tablespaces, each made up of one or "
6044 "more data files. Tables and indexes are created within a particular "
6046 "This rule allows you to define checks on the size of tablespaces."),
6047 elements
=db_levels_common
+ [
6050 title
=_("Expected autoextend setting"),
6052 (True, _("Autoextend is expected to be ON")),
6053 (False, _("Autoextend is expected to be OFF")),
6054 (None, _("Autoextend will be ignored")),
6056 ("autoextend_severity",
6058 title
=_("Severity of invalid autoextend setting"),
6061 ("defaultincrement",
6063 title
=_("Default Increment"),
6065 (True, _("State is WARNING in case the next extent has the default size.")),
6066 (False, _("Ignore default increment")),
6068 ("map_file_online_states",
6071 orientation
="horizontal",
6073 DropdownChoice(choices
=[
6074 ("RECOVER", _("Recover")),
6075 ("OFFLINE", _("Offline")),
6079 title
=_('Map file online states'),
6083 title
=_("Monitor temporary Tablespace"),
6085 (False, _("Ignore temporary Tablespaces (Default)")),
6086 (True, _("Apply rule to temporary Tablespaces")),
6091 title
=_("Explicit tablespaces"),
6093 _("Here you can set explicit tablespaces by defining them via SID and the tablespace name, separated by a dot, for example <b>pengt.TEMP</b>"
6100 register_check_parameters(
6101 RulespecGroupCheckParametersApplications
,
6103 _("Oracle Processes"),
6106 "Here you can override the default levels for the ORACLE Processes check. The levels "
6107 "are applied on the number of used processes in percentage of the configured limit."),
6111 title
=_("Levels for used processes"),
6113 Percentage(title
=_("Warning if more than"), default_value
=70.0),
6114 Percentage(title
=_("Critical if more than"), default_value
=90.0)
6117 optional_keys
=False,
6119 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
6123 register_check_parameters(
6124 RulespecGroupCheckParametersApplications
,
6125 "oracle_recovery_area",
6126 _("Oracle Recovery Area"),
6127 Dictionary(elements
=[("levels",
6129 title
=_("Levels for used space (reclaimable is considered as free)"),
6131 Percentage(title
=_("warning at"), default_value
=70.0),
6132 Percentage(title
=_("critical at"), default_value
=90.0),
6134 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
6138 register_check_parameters(
6139 RulespecGroupCheckParametersApplications
,
6140 "oracle_dataguard_stats",
6141 _("Oracle Data-Guard Stats"),
6144 _("The Data-Guard statistics are available in Oracle Enterprise Edition with enabled Data-Guard. "
6145 "The <tt>init.ora</tt> parameter <tt>dg_broker_start</tt> must be <tt>TRUE</tt> for this check. "
6146 "The apply and transport lag can be configured with this rule."),
6150 title
=_("Apply Lag Maximum Time"),
6151 help=_("The maximum limit for the apply lag in <tt>v$dataguard_stats</tt>."),
6152 elements
=[Age(title
=_("Warning at"),),
6153 Age(title
=_("Critical at"),)])),
6156 title
=_("Apply Lag Minimum Time"),
6158 "The minimum limit for the apply lag in <tt>v$dataguard_stats</tt>. "
6159 "This is only useful if also <i>Apply Lag Maximum Time</i> has been configured."
6161 elements
=[Age(title
=_("Warning at"),),
6162 Age(title
=_("Critical at"),)])),
6165 title
=_("Transport Lag"),
6166 help=_("The limit for the transport lag in <tt>v$dataguard_stats</tt>"),
6167 elements
=[Age(title
=_("Warning at"),),
6168 Age(title
=_("Critical at"),)])),
6170 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
6174 register_check_parameters(
6175 RulespecGroupCheckParametersApplications
,
6177 _("Oracle Undo Retention"),
6178 Dictionary(elements
=[
6181 title
=_("Levels for remaining undo retention"),
6183 Age(title
=_("warning if less then"), default_value
=600),
6184 Age(title
=_("critical if less then"), default_value
=300),
6187 'nospaceerrcnt_state',
6190 title
=_("State in case of non space error count is greater then 0: "),
6194 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
6198 register_check_parameters(
6199 RulespecGroupCheckParametersApplications
,
6201 _("Oracle RMAN Backups"),
6202 Dictionary(elements
=[("levels",
6204 title
=_("Maximum Age for RMAN backups"),
6206 Age(title
=_("warning if older than"), default_value
=1800),
6207 Age(title
=_("critical if older than"), default_value
=3600),
6209 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
6213 register_check_parameters(
6214 RulespecGroupCheckParametersApplications
,
6215 "oracle_recovery_status",
6216 _("Oracle Recovery Status"),
6217 Dictionary(elements
=[("levels",
6219 title
=_("Levels for checkpoint time"),
6221 Age(title
=_("warning if higher then"), default_value
=1800),
6222 Age(title
=_("critical if higher then"), default_value
=3600),
6226 title
=_("Levels for user managed backup files"),
6227 help=_("Important! This checks is only for monitoring of datafiles "
6228 "who were left in backup mode. "
6229 "(alter database datafile ... begin backup;) "),
6231 Age(title
=_("warning if higher then"), default_value
=1800),
6232 Age(title
=_("critical if higher then"), default_value
=3600),
6234 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
6238 register_check_parameters(
6239 RulespecGroupCheckParametersApplications
,
6241 _("Oracle Scheduler Job"),
6243 help=_("A scheduler job is an object in an ORACLE database which could be "
6244 "compared to a cron job on Unix. "),
6248 title
=_("Maximum run duration for last execution"),
6249 help=_("Here you can define an upper limit for the run duration of "
6250 "last execution of the job."),
6252 Age(title
=_("warning at")),
6253 Age(title
=_("critical at")),
6257 title
=_("Job State"),
6258 help=_("The state of the job is ignored per default."),
6261 (True, _("Ignore the state of the Job")),
6262 (False, _("Consider the state of the job")),
6265 ("status_disabled_jobs",
6266 MonitoringState(title
="Status of service in case of disabled job", default_value
=0)),
6267 ("status_missing_jobs",
6269 title
=_("Status of service in case of missing job."),
6274 title
=_("Scheduler Job Name"),
6275 help=_("Here you can set explicit Scheduler-Jobs by defining them via SID, Job-Owner "
6276 "and Job-Name, separated by a dot, for example <tt>TUX12C.SYS.PURGE_LOG</tt>"),
6282 register_check_parameters(
6283 RulespecGroupCheckParametersApplications
,
6285 _("Oracle Instance"),
6287 title
=_("Consider state of Archivelogmode: "),
6292 title
=_("State in case of Archivelogmode is enabled: "),
6298 title
=_("State in case of Archivelogmode is disabled: "),
6305 title
=_("State in case of Force Logging is enabled: "),
6312 title
=_("State in case of Force Logging is disabled: "),
6319 title
=_("State in case of logins are not possible: "),
6326 title
=_("State in case of Database is PRIMARY and not OPEN: "),
6331 title
=_("Minimum required uptime"),
6333 Age(title
=_("Warning if below")),
6334 Age(title
=_("Critical if below")),
6336 ('ignore_noarchivelog',
6338 title
=_("Ignore state of no-archive log"),
6340 help=_("If active, only a single summary item is displayed. The summary "
6341 "will explicitly mention sensors in warn/crit state but the "
6342 "sensors that are ok are aggregated."),
6343 default_value
=False)),
6346 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
6350 register_check_parameters(
6351 RulespecGroupCheckParametersApplications
, "asm_diskgroup",
6352 _("ASM Disk Group (used space and growth)"),
6354 elements
=filesystem_elements
+ [
6357 title
=_("Handling for required mirror space"),
6360 (False, _("Do not regard required mirror space as free space")),
6361 (True, _("Regard required mirror space as free space")),
6364 "ASM calculates the free space depending on free_mb or required mirror "
6365 "free space. Enable this option to set the check against required "
6366 "mirror free space. This only works for normal or high redundancy Disk Groups."
6369 hidden_keys
=["flex_levels"],
6372 title
=_("ASM Disk Group"),
6373 help=_("Specify the name of the ASM Disk Group "),
6374 allow_empty
=False), "dict")
6377 def _vs_mssql_backup_age(title
):
6379 title
=_("%s" % title
),
6383 title
=_("Set levels"),
6385 Age(title
=_("Warning if older than")),
6386 Age(title
=_("Critical if older than")),
6389 title
=_("No levels"),
6391 FixedValue(None, totext
=""),
6392 FixedValue(None, totext
=""),
6396 register_check_parameters(
6397 RulespecGroupCheckParametersApplications
,
6399 _("MSSQL Backup summary"),
6402 help = _("This rule allows you to set limits on the age of backups for "
6403 "different backup types. If your agent does not support "
6404 "backup types (e.g. <i>Log Backup</i>, <i>Database Diff "
6405 "Backup</i>, etc.) you can use the option <i>Database Backup"
6406 "</i> to set a general limit"),
6408 ("database", _vs_mssql_backup_age("Database backup")),
6409 ("database_diff", _vs_mssql_backup_age("Database diff backup")),
6410 ("log", _vs_mssql_backup_age("Log backup")),
6411 ("file_or_filegroup", _vs_mssql_backup_age("File or filegroup backup")),
6412 ("file_diff", _vs_mssql_backup_age("File diff backup")),
6413 ("partial", _vs_mssql_backup_age("Partial backup")),
6414 ("partial_diff", _vs_mssql_backup_age("Partial diff backup")),
6415 ("unspecific", _vs_mssql_backup_age("Unspecific backup")),
6416 ("not_found", MonitoringState(title
=_("State if no backup found"))),
6419 forth
= lambda params
: (params
if isinstance(params
, dict)
6420 else {'database': (params
[0], params
[1])})
6423 title
= _("Service descriptions"),
6424 allow_empty
= False),
6428 register_check_parameters(
6429 RulespecGroupCheckParametersApplications
,
6430 "mssql_backup_per_type",
6432 Dictionary(elements
=[
6433 ("levels", _vs_mssql_backup_age("Upper levels for the backup age")),
6435 TextAscii(title
=_("Backup name"), allow_empty
=False),
6439 register_check_parameters(
6440 RulespecGroupCheckParametersApplications
, "mssql_file_sizes",
6441 _("MSSQL Log and Data File Sizes"),
6443 title
=_("File Size Levels"),
6447 title
=_("Levels for Datafiles"),
6449 Filesize(title
=_("Warning at")),
6450 Filesize(title
=_("Critical at")),
6454 title
=_("Log files: Absolute upper thresholds"),
6455 elements
=[Filesize(title
=_("Warning at")),
6456 Filesize(title
=_("Critical at"))])),
6459 title
=_("Levels for log files used"),
6462 title
=_("Upper absolute levels"),
6464 Filesize(title
=_("Warning at")),
6465 Filesize(title
=_("Critical at"))
6468 title
=_("Upper percentage levels"),
6470 Percentage(title
=_("Warning at")),
6471 Percentage(title
=_("Critical at"))
6474 ]), TextAscii(title
=_("Service descriptions"), allow_empty
=False), "dict")
6476 register_check_parameters(
6477 RulespecGroupCheckParametersApplications
,
6478 "mssql_tablespaces",
6479 _("MSSQL Size of Tablespace"),
6484 title
=_("Upper levels for size"),
6485 elements
=[Filesize(title
=_("Warning at")),
6486 Filesize(title
=_("Critical at"))])),
6489 title
=_("Upper levels for reserved space"),
6492 title
=_("Absolute levels"),
6494 Filesize(title
=_("Warning at")),
6495 Filesize(title
=_("Critical at"))
6498 title
=_("Percentage levels"),
6500 Percentage(title
=_("Warning at")),
6501 Percentage(title
=_("Critical at"))
6506 title
=_("Upper levels for data"),
6509 title
=_("Absolute levels"),
6511 Filesize(title
=_("Warning at")),
6512 Filesize(title
=_("Critical at"))
6515 title
=_("Percentage levels"),
6517 Percentage(title
=_("Warning at")),
6518 Percentage(title
=_("Critical at"))
6523 title
=_("Upper levels for indexes"),
6526 title
=_("Absolute levels"),
6528 Filesize(title
=_("Warning at")),
6529 Filesize(title
=_("Critical at"))
6532 title
=_("Percentage levels"),
6534 Percentage(title
=_("Warning at")),
6535 Percentage(title
=_("Critical at"))
6540 title
=_("Upper levels for unused space"),
6543 title
=_("Absolute levels"),
6545 Filesize(title
=_("Warning at")),
6546 Filesize(title
=_("Critical at"))
6549 title
=_("Percentage levels"),
6551 Percentage(title
=_("Warning at")),
6552 Percentage(title
=_("Critical at"))
6557 title
=_("Lower levels for unallocated space"),
6560 title
=_("Absolute levels"),
6562 Filesize(title
=_("Warning below")),
6563 Filesize(title
=_("Critical below"))
6566 title
=_("Percentage levels"),
6568 Percentage(title
=_("Warning below")),
6569 Percentage(title
=_("Critical below"))
6573 TextAscii(title
=_("Tablespace name"), allow_empty
=False),
6577 register_check_parameters(
6578 RulespecGroupCheckParametersApplications
,
6579 "mssql_page_activity",
6580 _("MSSQL Page Activity"),
6582 title
=_("Page Activity Levels"),
6586 title
=_("Reads/sec"),
6588 Float(title
=_("warning at"), unit
=_("/sec")),
6589 Float(title
=_("critical at"), unit
=_("/sec")),
6593 title
=_("Writes/sec"),
6595 Float(title
=_("warning at"), unit
=_("/sec")),
6596 Float(title
=_("critical at"), unit
=_("/sec")),
6598 ("page_lookups/sec",
6600 title
=_("Lookups/sec"),
6602 Float(title
=_("warning at"), unit
=_("/sec")),
6603 Float(title
=_("critical at"), unit
=_("/sec")),
6606 TextAscii(title
=_("Service descriptions"), allow_empty
=False),
6610 def levels_absolute_or_dynamic(name
, value
):
6612 title
=_("Levels of %s %s") % (name
, value
),
6613 default_value
=(80.0, 90.0),
6616 title
=_("Percentage %s space") % value
,
6618 Percentage(title
=_("Warning at"), unit
=_("% used")),
6619 Percentage(title
=_("Critical at"), unit
=_("% used")),
6622 title
=_("Absolute %s space") % value
,
6624 Integer(title
=_("Warning at"), unit
=_("MB"), default_value
=500),
6625 Integer(title
=_("Critical at"), unit
=_("MB"), default_value
=1000),
6629 orientation
="horizontal",
6631 Filesize(title
=_(" larger than")),
6633 title
=_("Levels for the %s %s size") % (name
, value
),
6636 title
=_("Percentage %s space") % value
,
6638 Percentage(title
=_("Warning at"), unit
=_("% used")),
6639 Percentage(title
=_("Critical at"), unit
=_("% used")),
6642 title
=_("Absolute free space"),
6644 Integer(title
=_("Warning at"), unit
=_("MB")),
6645 Integer(title
=_("Critical at"), unit
=_("MB")),
6650 title
=_('Dynamic levels'),
6655 register_check_parameters(
6656 RulespecGroupCheckParametersApplications
, "mssql_transactionlogs",
6657 _("MSSQL Transactionlog Sizes"),
6659 title
=_("File Size Levels"),
6660 help=_("Specify levels for transactionlogs of a database. Please note that relative "
6661 "levels will only work if there is a max_size set for the file on the database "
6664 ("used_levels", levels_absolute_or_dynamic(_("Transactionlog"), _("used"))),
6665 ("allocated_used_levels",
6666 levels_absolute_or_dynamic(_("Transactionlog"), _("used of allocation"))),
6667 ("allocated_levels", levels_absolute_or_dynamic(_("Transactionlog"), _("allocated"))),
6668 ]), TextAscii(title
=_("Database Name"), allow_empty
=False), "dict")
6670 register_check_parameters(
6671 RulespecGroupCheckParametersApplications
, "mssql_datafiles", _("MSSQL Datafile Sizes"),
6673 title
=_("File Size Levels"),
6674 help=_("Specify levels for datafiles of a database. Please note that relative "
6675 "levels will only work if there is a max_size set for the file on the database "
6678 ("used_levels", levels_absolute_or_dynamic(_("Datafile"), _("used"))),
6679 ("allocated_used_levels",
6680 levels_absolute_or_dynamic(_("Datafile"), _("used of allocation"))),
6681 ("allocated_levels", levels_absolute_or_dynamic(_("Datafile"), _("allocated"))),
6682 ]), TextAscii(title
=_("Database Name"), allow_empty
=False), "dict")
6684 register_check_parameters(
6685 RulespecGroupCheckParametersApplications
,
6687 _("Virtual Machine Snapshots"),
6688 Dictionary(elements
=[
6691 title
=_("Age of the last snapshot"),
6693 Age(title
=_("Warning if older than")),
6694 Age(title
=_("Critical if older than"))
6698 title
=_("Age of the oldest snapshot"),
6700 Age(title
=_("Warning if older than")),
6701 Age(title
=_("Critical if older than"))
6708 register_check_parameters(
6709 RulespecGroupCheckParametersApplications
,
6711 _("Veeam: Time since last Backup"),
6712 Dictionary(elements
=[("age",
6714 title
=_("Time since end of last backup"),
6716 Age(title
=_("Warning if older than"), default_value
=108000),
6717 Age(title
=_("Critical if older than"), default_value
=172800)
6719 TextAscii(title
=_("Job name")),
6723 register_check_parameters(
6724 RulespecGroupCheckParametersApplications
,
6725 "backup_timemachine",
6726 _("Age of timemachine backup"),
6727 Dictionary(elements
=[("age",
6729 title
=_("Maximum age of latest timemachine backup"),
6731 Age(title
=_("Warning if older than"), default_value
=86400),
6732 Age(title
=_("Critical if older than"), default_value
=172800)
6738 register_check_parameters(
6739 RulespecGroupCheckParametersApplications
,
6741 _("Age of jobs controlled by mk-job"),
6742 Dictionary(elements
=[
6745 title
=_("Maximum time since last start of job execution"),
6747 Age(title
=_("Warning at"), default_value
=0),
6748 Age(title
=_("Critical at"), default_value
=0)
6750 ("outcome_on_cluster",
6752 title
=_("Clusters: Prefered check result of local checks"),
6753 help=_("If you're running local checks on clusters via clustered services rule "
6754 "you can influence the check result with this rule. You can choose between "
6755 "best or worst state. Default setting is worst state."),
6757 ("worst", _("Worst state")),
6758 ("best", _("Best state")),
6760 default_value
="worst")),
6762 TextAscii(title
=_("Job name"),),
6766 register_check_parameters(
6767 RulespecGroupCheckParametersApplications
,
6768 "mssql_counters_locks",
6771 help=_("This check monitors locking related information of MSSQL tablespaces."),
6774 "lock_requests/sec",
6776 title
=_("Lock Requests / sec"),
6778 _("Number of new locks and lock conversions per second requested from the lock manager."
6781 Float(title
=_("Warning at"), unit
=_("requests/sec")),
6782 Float(title
=_("Critical at"), unit
=_("requests/sec")),
6787 "lock_timeouts/sec",
6789 title
=_("Lock Timeouts / sec"),
6791 _("Number of lock requests per second that timed out, including requests for NOWAIT locks."
6794 Float(title
=_("Warning at"), unit
=_("timeouts/sec")),
6795 Float(title
=_("Critical at"), unit
=_("timeouts/sec")),
6800 "number_of_deadlocks/sec",
6802 title
=_("Number of Deadlocks / sec"),
6803 help=_("Number of lock requests per second that resulted in a deadlock."),
6805 Float(title
=_("Warning at"), unit
=_("deadlocks/sec")),
6806 Float(title
=_("Critical at"), unit
=_("deadlocks/sec")),
6813 title
=_("Lock Waits / sec"),
6814 help=_("Number of lock requests per second that required the caller to wait."),
6816 Float(title
=_("Warning at"), unit
=_("waits/sec")),
6817 Float(title
=_("Critical at"), unit
=_("waits/sec")),
6822 TextAscii(title
=_("Service descriptions"), allow_empty
=False),
6829 "ASYNC_DISKPOOL_LOCK",
6830 "ASYNC_IO_COMPLETION",
6832 "AUDIT_GROUPCACHE_LOCK",
6833 "AUDIT_LOGINCACHE_LOCK",
6834 "AUDIT_ON_DEMAND_TARGET_LOCK",
6835 "AUDIT_XE_SESSION_MGR",
6842 "BROKER_CONNECTION_RECEIVE_TASK",
6843 "BROKER_ENDPOINT_STATE_MUTEX",
6844 "BROKER_EVENTHANDLER",
6846 "BROKER_MASTERSTART",
6847 "BROKER_RECEIVE_WAITFOR",
6848 "BROKER_REGISTERALLENDPOINTS",
6853 "BROKER_TRANSMITTER",
6854 "BUILTIN_HASHKEY_MUTEX",
6855 "CHECK_PRINT_RECORD",
6865 "CLR_RWLOCK_READER",
6866 "CLR_RWLOCK_WRITER",
6869 "CLRHOST_STATE_ACCESS",
6875 "DBMIRROR_DBM_EVENT",
6876 "DBMIRROR_DBM_MUTEX",
6877 "DBMIRROR_EVENTS_QUEUE",
6879 "DBMIRROR_WORKER_QUEUE",
6881 "DEADLOCK_ENUM_MUTEX",
6882 "DEADLOCK_TASK_SEARCH",
6884 "DISABLE_VERSIONING",
6886 "DISPATCHER_QUEUE_SEMAPHORE",
6887 "DLL_LOADING_MUTEX",
6890 "DTC_ABORT_REQUEST",
6893 "DTC_TMDOWN_REQUEST",
6894 "DTC_WAITFOR_OUTCOME",
6895 "DUMP_LOG_COORDINATOR",
6899 "EE_SPECPROC_MAP_INIT",
6900 "ENABLE_VERSIONING",
6901 "ERROR_REPORTING_MANAGER",
6904 "EXECUTION_PIPE_EVENT_INTERNAL",
6907 "FCB_REPLICA_WRITE",
6909 "FS_GARBAGE_COLLECTOR_SHUTDOWN",
6911 "FS_LOGTRUNC_RWLOCK",
6912 "FSA_FORCE_OWN_XACT",
6914 "FSTR_CONFIG_MUTEX",
6915 "FSTR_CONFIG_RWLOCK",
6916 "FT_COMPROWSET_RWLOCK",
6918 "FT_IFTS_SCHEDULER_IDLE_WAIT",
6922 "FT_METADATA_MUTEX",
6927 "HADR_AR_CRITICAL_SECTION_ENTRY",
6928 "HADR_AR_MANAGER_MUTEX",
6929 "HADR_ARCONTROLLER_NOTIFICATIONS_SUBSCRIBER_LIST",
6930 "HADR_BACKUP_BULK_LOCK",
6931 "HADR_BACKUP_QUEUE",
6932 "HADR_CLUSAPI_CALL",
6933 "HADR_COMPRESSED_CACHE_SYNC",
6934 "HADR_DATABASE_FLOW_CONTROL",
6935 "HADR_DATABASE_VERSIONING_STATE",
6936 "HADR_DATABASE_WAIT_FOR_RESTART",
6937 "HADR_DATABASE_WAIT_FOR_TRANSITION_TO_VERSIONING",
6939 "HADR_DB_OP_COMPLETION_SYNC",
6940 "HADR_DB_OP_START_SYNC",
6941 "HADR_DBR_SUBSCRIBER",
6942 "HADR_DBR_SUBSCRIBER_FILTER_LIST",
6943 "HADR_DBSTATECHANGE_SYNC",
6944 "HADR_FILESTREAM_BLOCK_FLUSH",
6945 "HADR_FILESTREAM_FILE_CLOSE",
6946 "HADR_FILESTREAM_FILE_REQUEST",
6947 "HADR_FILESTREAM_IOMGR",
6948 "HADR_FILESTREAM_IOMGR_IOCOMPLETION",
6949 "HADR_FILESTREAM_MANAGER",
6950 "HADR_GROUP_COMMIT",
6951 "HADR_LOGCAPTURE_SYNC",
6952 "HADR_LOGCAPTURE_WAIT",
6953 "HADR_LOGPROGRESS_SYNC",
6954 "HADR_NOTIFICATION_DEQUEUE",
6955 "HADR_NOTIFICATION_WORKER_EXCLUSIVE_ACCESS",
6956 "HADR_NOTIFICATION_WORKER_STARTUP_SYNC",
6957 "HADR_NOTIFICATION_WORKER_TERMINATION_SYNC",
6958 "HADR_PARTNER_SYNC",
6959 "HADR_READ_ALL_NETWORKS",
6960 "HADR_RECOVERY_WAIT_FOR_CONNECTION",
6961 "HADR_RECOVERY_WAIT_FOR_UNDO",
6962 "HADR_REPLICAINFO_SYNC",
6964 "HADR_SYNCHRONIZING_THROTTLE",
6965 "HADR_TDS_LISTENER_SYNC",
6966 "HADR_TDS_LISTENER_SYNC_PROCESSING",
6968 "HADR_TRANSPORT_DBRLIST",
6969 "HADR_TRANSPORT_FLOW_CONTROL",
6970 "HADR_TRANSPORT_SESSION",
6973 "HADR_XRF_STACK_ACCESS",
6981 "IOAFF_RANGE_QUEUE",
6984 "KTM_RECOVERY_MANAGER",
6985 "KTM_RECOVERY_RESOLUTION",
6994 "LCK_M_BU_ABORT_BLOCKERS",
6995 "LCK_M_BU_LOW_PRIORITY",
6997 "LCK_M_IS_ABORT_BLOCKERS",
6998 "LCK_M_IS_LOW_PRIORITY",
7000 "LCK_M_IU_ABORT_BLOCKERS",
7001 "LCK_M_IU_LOW_PRIORITY",
7003 "LCK_M_IX_ABORT_BLOCKERS",
7004 "LCK_M_IX_LOW_PRIORITY",
7006 "LCK_M_RIn_NL_ABORT_BLOCKERS",
7007 "LCK_M_RIn_NL_LOW_PRIORITY",
7009 "LCK_M_RIn_S_ABORT_BLOCKERS",
7010 "LCK_M_RIn_S_LOW_PRIORITY",
7012 "LCK_M_RIn_U_ABORT_BLOCKERS",
7013 "LCK_M_RIn_U_LOW_PRIORITY",
7015 "LCK_M_RIn_X_ABORT_BLOCKERS",
7016 "LCK_M_RIn_X_LOW_PRIORITY",
7018 "LCK_M_RS_S_ABORT_BLOCKERS",
7019 "LCK_M_RS_S_LOW_PRIORITY",
7021 "LCK_M_RS_U_ABORT_BLOCKERS",
7022 "LCK_M_RS_U_LOW_PRIORITY",
7024 "LCK_M_RX_S_ABORT_BLOCKERS",
7025 "LCK_M_RX_S_LOW_PRIORITY",
7027 "LCK_M_RX_U_ABORT_BLOCKERS",
7028 "LCK_M_RX_U_LOW_PRIORITY",
7030 "LCK_M_RX_X_ABORT_BLOCKERS",
7031 "LCK_M_RX_X_LOW_PRIORITY",
7033 "LCK_M_S_ABORT_BLOCKERS",
7034 "LCK_M_S_LOW_PRIORITY",
7036 "LCK_M_SCH_M_ABORT_BLOCKERS",
7037 "LCK_M_SCH_M_LOW_PRIORITY",
7039 "LCK_M_SCH_S_ABORT_BLOCKERS",
7040 "LCK_M_SCH_S_LOW_PRIORITY",
7042 "LCK_M_SIU_ABORT_BLOCKERS",
7043 "LCK_M_SIU_LOW_PRIORITY",
7045 "LCK_M_SIX_ABORT_BLOCKERS",
7046 "LCK_M_SIX_LOW_PRIORITY",
7048 "LCK_M_U_ABORT_BLOCKERS",
7049 "LCK_M_U_LOW_PRIORITY",
7051 "LCK_M_UIX_ABORT_BLOCKERS",
7052 "LCK_M_UIX_LOW_PRIORITY",
7054 "LCK_M_X_ABORT_BLOCKERS",
7055 "LCK_M_X_LOW_PRIORITY",
7061 "LOGMGR_RESERVE_APPEND",
7062 "LOWFAIL_MEMMGR_QUEUE",
7063 "MEMORY_ALLOCATION_EXT",
7066 "MSQL_XACT_MGR_MUTEX",
7070 "NET_WAITFOR_PACKET",
7072 "ONDEMAND_TASK_QUEUE",
7085 "PARALLEL_BACKUP_QUEUE",
7087 "PREEMPTIVE_AUDIT_ACCESS_EVENTLOG",
7088 "PREEMPTIVE_AUDIT_ACCESS_SECLOG",
7089 "PREEMPTIVE_CLOSEBACKUPMEDIA",
7090 "PREEMPTIVE_CLOSEBACKUPTAPE",
7091 "PREEMPTIVE_CLOSEBACKUPVDIDEVICE",
7092 "PREEMPTIVE_CLUSAPI_CLUSTERRESOURCECONTROL",
7093 "PREEMPTIVE_COM_COCREATEINSTANCE",
7094 "PREEMPTIVE_HADR_LEASE_MECHANISM",
7095 "PREEMPTIVE_SOSTESTING",
7096 "PREEMPTIVE_STRESSDRIVER",
7097 "PREEMPTIVE_TESTING",
7098 "PREEMPTIVE_XETESTING",
7099 "PRINT_ROLLBACK_PROGRESS",
7100 "PWAIT_HADR_CHANGE_NOTIFIER_TERMINATION_SYNC",
7101 "PWAIT_HADR_CLUSTER_INTEGRATION",
7102 "PWAIT_HADR_OFFLINE_COMPLETED",
7103 "PWAIT_HADR_ONLINE_COMPLETED",
7104 "PWAIT_HADR_POST_ONLINE_COMPLETED",
7105 "PWAIT_HADR_WORKITEM_COMPLETED",
7106 "PWAIT_MD_LOGIN_STATS",
7107 "PWAIT_MD_RELATION_CACHE",
7108 "PWAIT_MD_SERVER_CACHE",
7109 "PWAIT_MD_UPGRADE_CONFIG",
7110 "PWAIT_METADATA_LAZYCACHE_RWLOCk",
7112 "QPJOB_WAITFOR_ABORT",
7113 "QRY_MEM_GRANT_INFO_MUTEX",
7114 "QUERY_ERRHDL_SERVICE_DONE",
7115 "QUERY_EXECUTION_INDEX_SORT_EVENT_OPEN",
7116 "QUERY_NOTIFICATION_MGR_MUTEX",
7117 "QUERY_NOTIFICATION_SUBSCRIPTION_MUTEX",
7118 "QUERY_NOTIFICATION_TABLE_MGR_MUTEX",
7119 "QUERY_NOTIFICATION_UNITTEST_MUTEX",
7120 "QUERY_OPTIMIZER_PRINT_MUTEX",
7122 "QUERY_WAIT_ERRHDL_SERVICE",
7124 "REPL_CACHE_ACCESS",
7125 "REPL_SCHEMA_ACCESS",
7127 "REQUEST_DISPENSER_PAUSE",
7128 "REQUEST_FOR_DEADLOCK_SEARCH",
7131 "RESOURCE_SEMAPHORE",
7132 "RESOURCE_SEMAPHORE_MUTEX",
7133 "RESOURCE_SEMAPHORE_QUERY_COMPILE",
7134 "RESOURCE_SEMAPHORE_SMALL_QUERY",
7135 "SEC_DROP_TEMP_KEY",
7138 "SERVER_IDLE_CHECK",
7140 "SLEEP_BPOOL_FLUSH",
7142 "SLEEP_DCOMSTARTUP",
7143 "SLEEP_MSDBSTARTUP",
7146 "SLEEP_TEMPDBSTARTUP",
7147 "SNI_CRITICAL_SECTION",
7148 "SNI_HTTP_WAITFOR_",
7149 "SNI_LISTENER_ACCESS",
7150 "SNI_TASK_COMPLETION",
7153 "SOS_CALLBACK_REMOVAL",
7154 "SOS_DISPATCHER_MUTEX",
7155 "SOS_LOCALALLOCATORLIST",
7156 "SOS_MEMORY_USAGE_ADJUSTMENT",
7157 "SOS_OBJECT_STORE_DESTROY_MUTEX",
7158 "SOS_PHYS_PAGE_CACHE",
7159 "SOS_PROCESS_AFFINITY_MUTEX",
7160 "SOS_RESERVEDMEMBLOCKLIST",
7161 "SOS_SCHEDULER_YIELD",
7162 "SOS_SMALL_PAGE_ALLOC",
7163 "SOS_STACKSTORE_INIT_MUTEX",
7164 "SOS_SYNC_TASK_ENQUEUE_EVENT",
7165 "SOS_VIRTUALMEMORY_LOW",
7170 "SOSHOST_SEMAPHORE",
7172 "SOSHOST_TRACELOCK",
7173 "SOSHOST_WAITFORDONE",
7176 "SQLCLR_DEADLOCK_DETECTION",
7177 "SQLCLR_QUANTUM_PUNISHMENT",
7178 "SQLSORT_NORMMUTEX",
7179 "SQLSORT_SORTMUTEX",
7180 "SQLTRACE_BUFFER_FLUSH",
7181 "SQLTRACE_FILE_BUFFER",
7182 "SQLTRACE_SHUTDOWN",
7183 "SQLTRACE_WAIT_ENTRIES",
7187 "TIMEPRIV_TIMEPERIOD",
7189 "TRAN_MARKLATCH_DT",
7190 "TRAN_MARKLATCH_EX",
7191 "TRAN_MARKLATCH_KP",
7192 "TRAN_MARKLATCH_NL",
7193 "TRAN_MARKLATCH_SH",
7194 "TRAN_MARKLATCH_UP",
7195 "TRANSACTION_MUTEX",
7198 "VIEW_DEFINITION_MUTEX",
7200 "WAIT_XTP_CKPT_CLOSE",
7201 "WAIT_XTP_CKPT_ENABLED",
7202 "WAIT_XTP_CKPT_STATE_LOCK",
7204 "WAIT_XTP_HOST_WAIT",
7205 "WAIT_XTP_OFFLINE_CKPT_LOG_IO",
7206 "WAIT_XTP_OFFLINE_CKPT_NEW_LOG",
7207 "WAIT_XTP_PROCEDURE_ENTRY",
7208 "WAIT_XTP_RECOVERY",
7209 "WAIT_XTP_TASK_SHUTDOWN",
7210 "WAIT_XTP_TRAN_COMMIT",
7211 "WAIT_XTP_TRAN_DEPENDENCY",
7213 "WAITFOR_TASKSHUTDOWN",
7219 "XACT_OWN_TRANSACTION",
7220 "XACT_RECLAIM_SESSION",
7222 "XACTWORKSPACE_MUTEX",
7223 "XE_BUFFERMGR_ALLPROCESSED_EVENT",
7224 "XE_BUFFERMGR_FREEBUF_EVENT",
7225 "XE_DISPATCHER_CONFIG_SESSION_LIST",
7226 "XE_DISPATCHER_JOIN",
7227 "XE_DISPATCHER_WAIT",
7228 "XE_MODULEMGR_SYNC",
7230 "XE_PACKAGE_LOCK_BACKOFF",
7231 "XTPPROC_CACHE_ACCESS",
7232 "XTPPROC_PARTITIONED_STACK_CREATE",
7235 register_check_parameters(
7236 RulespecGroupCheckParametersApplications
,
7237 "mssql_blocked_sessions",
7238 _("MSSQL Blocked Sessions"),
7243 title
=_("State of MSSQL Blocked Sessions is treated as"),
7244 help=_("The default state if there is at least one "
7245 "blocked session."),
7250 title
=_("Levels for wait"),
7251 help=_("The threshholds for wait_duration_ms. Will "
7252 "overwrite the default state set above."),
7253 default_value
=(0, 0),
7255 Float(title
=_("Warning at"), unit
=_("seconds"), display_format
="%.3f"),
7256 Float(title
=_("Critical at"), unit
=_("seconds"), display_format
="%.3f"),
7258 ("ignore_waittypes",
7260 title
=_("Ignore wait types"),
7262 choices
=[(entry
, entry
) for entry
in mssql_waittypes
],
7270 register_check_parameters(
7271 RulespecGroupCheckParametersApplications
,
7272 "mssql_instance_blocked_sessions",
7273 _("MSSQL Blocked Sessions"),
7278 title
=_("State of MSSQL Blocked Sessions is treated as"),
7279 help=_("The default state if there is at least one "
7280 "blocked session."),
7285 title
=_("Levels for wait"),
7286 help=_("The threshholds for wait_duration_ms. Will "
7287 "overwrite the default state set above."),
7288 default_value
=(0, 0),
7290 Float(title
=_("Warning at"), unit
=_("seconds"), display_format
="%.3f"),
7291 Float(title
=_("Critical at"), unit
=_("seconds"), display_format
="%.3f"),
7293 ("ignore_waittypes",
7295 title
=_("Ignore wait types"),
7297 choices
=[(entry
, entry
) for entry
in mssql_waittypes
],
7300 TextAscii(title
=_("Instance identifier")),
7304 register_check_parameters(
7305 RulespecGroupCheckParametersApplications
,
7307 _("MySQL Sessions & Connections"),
7309 help=_("This check monitors the current number of active sessions to the MySQL "
7310 "database server as well as the connection rate."),
7315 title
=_("Number of current sessions"),
7317 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
7318 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
7325 title
=_("Number of currently running sessions"),
7326 help=_("Levels for the number of sessions that are currently active"),
7328 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=10),
7329 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=20),
7336 title
=_("Number of new connections per second"),
7338 Integer(title
=_("Warning at"), unit
=_("connection/sec"), default_value
=20),
7339 Integer(title
=_("Critical at"), unit
=_("connection/sec"), default_value
=40),
7345 title
=_("Instance"),
7346 help=_("Only needed if you have multiple MySQL Instances on one server"),
7351 register_check_parameters(
7352 RulespecGroupCheckParametersApplications
,
7354 _("MySQL InnoDB Throughput"),
7358 title
=_("Read throughput"),
7360 Float(title
=_("warning at"), unit
=_("MB/s")),
7361 Float(title
=_("critical at"), unit
=_("MB/s"))
7365 title
=_("Write throughput"),
7367 Float(title
=_("warning at"), unit
=_("MB/s")),
7368 Float(title
=_("critical at"), unit
=_("MB/s"))
7373 help=_("When averaging is set, a floating average value "
7374 "of the disk throughput is computed and the levels for read "
7375 "and write will be applied to the average instead of the current "
7379 unit
=_("minutes")))]),
7381 title
=_("Instance"),
7382 help=_("Only needed if you have multiple MySQL Instances on one server"),
7387 register_check_parameters(
7388 RulespecGroupCheckParametersApplications
,
7389 "mysql_connections",
7390 _("MySQL Connections"),
7391 Dictionary(elements
=[
7394 title
=_("Max. parallel connections"),
7395 help=_("Compares the maximum number of connections that have been "
7396 "in use simultaneously since the server started with the maximum simultaneous "
7397 "connections allowed by the configuration of the server. This threshold "
7398 "makes the check raise warning/critical states if the percentage is equal to "
7399 "or above the configured levels."),
7401 Percentage(title
=_("Warning at")),
7402 Percentage(title
=_("Critical at")),
7406 title
=_("Instance"),
7407 help=_("Only needed if you have multiple MySQL Instances on one server"),
7412 register_check_parameters(
7413 RulespecGroupCheckParametersApplications
,
7418 ("seconds_behind_master",
7420 title
=_("Max. time behind the master"),
7422 "Compares the time which the slave can be behind the master. "
7423 "This rule makes the check raise warning/critical states if the time is equal to "
7424 "or above the configured levels."),
7426 Age(title
=_("Warning at")),
7427 Age(title
=_("Critical at")),
7430 optional_keys
=None),
7432 title
=_("Instance"),
7433 help=_("Only needed if you have multiple MySQL Instances on one server"),
7438 register_check_parameters(
7439 RulespecGroupCheckParametersApplications
, "db_bloat", _("Database Bloat (PostgreSQL)"),
7441 help=_("This rule allows you to configure bloat levels for a databases tablespace and "
7446 title
=_("Table absolute bloat levels"),
7448 Filesize(title
=_("Warning at")),
7449 Filesize(title
=_("Critical at")),
7451 ("table_bloat_perc",
7453 title
=_("Table percentage bloat levels"),
7454 help=_("Percentage in respect to the optimal utilization. "
7455 "For example if an alarm should raise at 50% wasted space, you need "
7456 "to configure 150%"),
7458 Percentage(title
=_("Warning at"), maxvalue
=None),
7459 Percentage(title
=_("Critical at"), maxvalue
=None),
7463 title
=_("Index absolute levels"),
7465 Filesize(title
=_("Warning at")),
7466 Filesize(title
=_("Critical at")),
7468 ("index_bloat_perc",
7470 title
=_("Index percentage bloat levels"),
7471 help=_("Percentage in respect to the optimal utilization. "
7472 "For example if an alarm should raise at 50% wasted space, you need "
7473 "to configure 150%"),
7475 Percentage(title
=_("Warning at"), maxvalue
=None),
7476 Percentage(title
=_("Critical at"), maxvalue
=None),
7478 ]), TextAscii(title
=_("Name of the database"),), "dict")
7480 register_check_parameters(
7481 RulespecGroupCheckParametersApplications
, "db_connections",
7482 _("Database Connections (PostgreSQL/MongoDB)"),
7484 help=_("This rule allows you to configure the number of maximum concurrent "
7485 "connections for a given database."),
7489 title
=_("Percentage of maximum available connections"),
7491 Percentage(title
=_("Warning at"), unit
=_("% of maximum connections")),
7492 Percentage(title
=_("Critical at"), unit
=_("% of maximum connections")),
7496 title
=_("Absolute number of connections"),
7498 Integer(title
=_("Warning at"), minvalue
=0, unit
=_("connections")),
7499 Integer(title
=_("Critical at"), minvalue
=0, unit
=_("connections")),
7501 ]), TextAscii(title
=_("Name of the database"),), "dict")
7503 register_check_parameters(
7504 RulespecGroupCheckParametersApplications
, "postgres_locks", _("PostgreSQL Locks"),
7507 "This rule allows you to configure the limits for the SharedAccess and Exclusive Locks "
7508 "for a PostgreSQL database."),
7512 title
=_("Shared Access Locks"),
7514 Integer(title
=_("Warning at"), minvalue
=0),
7515 Integer(title
=_("Critical at"), minvalue
=0),
7517 ("levels_exclusive",
7519 title
=_("Exclusive Locks"),
7521 Integer(title
=_("Warning at"), minvalue
=0),
7522 Integer(title
=_("Critical at"), minvalue
=0),
7524 ]), TextAscii(title
=_("Name of the database"),), "dict")
7526 register_check_parameters(
7527 RulespecGroupCheckParametersApplications
, "postgres_maintenance",
7528 _("PostgreSQL VACUUM and ANALYZE"),
7530 help=_("With this rule you can set limits for the VACUUM and ANALYZE operation of "
7531 "a PostgreSQL database. Keep in mind that each table within a database is checked "
7532 "with this limits."),
7536 title
=_("Time since the last VACUUM"),
7538 Age(title
=_("Warning if older than"), default_value
=86400 * 7),
7539 Age(title
=_("Critical if older than"), default_value
=86400 * 14)
7543 title
=_("Time since the last ANALYZE"),
7545 Age(title
=_("Warning if older than"), default_value
=86400 * 7),
7546 Age(title
=_("Critical if older than"), default_value
=86400 * 14)
7548 ("never_analyze_vacuum",
7550 title
=_("Age of never analyzed/vacuumed tables"),
7552 Age(title
=_("Warning if older than"), default_value
=86400 * 7),
7553 Age(title
=_("Critical if older than"), default_value
=86400 * 14)
7555 ]), TextAscii(title
=_("Name of the database"),), "dict")
7557 register_check_parameters(
7558 RulespecGroupCheckParametersApplications
, "f5_connections", _("F5 Loadbalancer Connections"),
7559 Dictionary(elements
=[
7562 title
=_("Max. number of connections"),
7564 default_levels
=(25000, 30000))),
7567 title
=_("Max. number of SSL connections"),
7569 default_levels
=(25000, 30000))),
7570 ("connections_rate",
7572 title
=_("Maximum connections per second"),
7574 default_levels
=(500, 1000))),
7575 ("connections_rate_lower",
7577 title
=_("Minimum connections per second"),
7579 Integer(title
=_("Warning at")),
7580 Integer(title
=_("Critical at")),
7585 title
=_("HTTP requests per second"), default_value
=None, default_levels
=(500, 1000))),
7588 register_check_parameters(
7589 RulespecGroupCheckParametersApplications
,
7590 "cisco_fw_connections",
7591 _("Cisco ASA Firewall Connections"),
7592 Dictionary(elements
=[
7595 help=_("This rule sets limits to the current number of connections through "
7596 "a Cisco ASA firewall."),
7597 title
=_("Maximum number of firewall connections"),
7599 Integer(title
=_("Warning at")),
7600 Integer(title
=_("Critical at")),
7608 register_check_parameters(
7609 RulespecGroupCheckParametersApplications
,
7610 "checkpoint_connections",
7611 _("Checkpoint Firewall Connections"),
7613 help=_("This rule sets limits to the current number of connections through "
7614 "a Checkpoint firewall."),
7615 title
=_("Maximum number of firewall connections"),
7617 Integer(title
=_("Warning at"), default_value
=40000),
7618 Integer(title
=_("Critical at"), default_value
=50000),
7625 register_check_parameters(
7626 RulespecGroupCheckParametersApplications
, "checkpoint_packets",
7627 _("Checkpoint Firewall Packet Rates"),
7628 Dictionary(elements
=[
7631 title
=_("Maximum Rate of Accepted Packets"),
7633 default_levels
=(100000, 200000),
7637 title
=_("Maximum Rate of Rejected Packets"),
7639 default_levels
=(100000, 200000),
7643 title
=_("Maximum Rate of Dropped Packets"),
7645 default_levels
=(100000, 200000),
7649 title
=_("Maximum Rate of Logged Packets"),
7651 default_levels
=(100000, 200000),
7655 register_check_parameters(
7656 RulespecGroupCheckParametersApplications
, "f5_pools", _("F5 Loadbalancer Pools"),
7658 title
=_("Minimum number of pool members"),
7660 Integer(title
=_("Warning if below"), unit
=_("Members ")),
7661 Integer(title
=_("Critical if below"), unit
=_("Members")),
7663 ), TextAscii(title
=_("Name of pool")), "first")
7665 register_check_parameters(
7666 RulespecGroupCheckParametersApplications
, "mysql_db_size", _("Size of MySQL databases"),
7669 Filesize(title
=_("warning at")),
7670 Filesize(title
=_("critical at")),
7672 help=_("The check will trigger a warning or critical state if the size of the "
7673 "database exceeds these levels."),
7674 title
=_("Impose limits on the size of the database"),
7677 title
=_("Name of the database"),
7678 help=_("Don't forget the instance: instance:dbname"),
7681 register_check_parameters(
7682 RulespecGroupCheckParametersApplications
,
7683 "postgres_sessions",
7684 _("PostgreSQL Sessions"),
7686 help=_("This check monitors the current number of active and idle sessions on PostgreSQL"),
7691 title
=_("Number of current sessions"),
7693 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
7694 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
7701 title
=_("Number of currently running sessions"),
7702 help=_("Levels for the number of sessions that are currently active"),
7704 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=10),
7705 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=20),
7715 register_check_parameters(
7716 RulespecGroupCheckParametersApplications
,
7717 "postgres_instance_sessions",
7718 _("PostgreSQL Sessions"),
7720 help=_("This check monitors the current number of active and idle sessions on PostgreSQL"),
7725 title
=_("Number of current sessions"),
7727 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
7728 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
7735 title
=_("Number of currently running sessions"),
7736 help=_("Levels for the number of sessions that are currently active"),
7738 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=10),
7739 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=20),
7744 TextAscii(title
=_("Instance")),
7748 register_check_parameters(
7749 RulespecGroupCheckParametersApplications
,
7751 _("Cisco SSl VPN Client Sessions"),
7753 title
=_("Number of active sessions"),
7754 help=_("This check monitors the current number of active sessions"),
7756 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
7757 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
7765 def convert_oracle_sessions(value
):
7766 if isinstance(value
, tuple):
7767 return {'sessions_abs': value
}
7768 if 'sessions_abs' not in value
:
7769 value
['sessions_abs'] = (100, 200)
7773 register_check_parameters(
7774 RulespecGroupCheckParametersApplications
,
7776 _("Oracle Sessions"),
7782 title
=_("Absolute levels of active sessions"),
7784 help=_("This check monitors the current number of active sessions on Oracle"),
7786 FixedValue(None, title
=_("Do not use absolute levels"), totext
=""),
7788 title
=_("Number of active sessions"),
7791 title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
7793 title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
7801 title
=_("Relative levels of active sessions."),
7803 _("Set upper levels of active sessions relative to max. number of sessions. This is optional."
7806 Percentage(title
=_("Warning at")),
7807 Percentage(title
=_("Critical at")),
7812 optional_keys
=["sessions_perc"],
7814 forth
=convert_oracle_sessions
),
7815 TextAscii(title
=_("Database name"), allow_empty
=False),
7819 register_check_parameters(
7820 RulespecGroupCheckParametersApplications
,
7823 Dictionary(elements
=[("levels",
7825 title
=_("Levels for minimum wait time for a lock"),
7827 Age(title
=_("warning if higher then"), default_value
=1800),
7828 Age(title
=_("critical if higher then"), default_value
=3600),
7830 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
7834 register_check_parameters(
7835 RulespecGroupCheckParametersApplications
,
7836 "oracle_longactivesessions",
7837 _("Oracle Long Active Sessions"),
7838 Dictionary(elements
=[("levels",
7840 title
=_("Levels of active sessions"),
7842 Integer(title
=_("Warning if more than"), unit
=_("sessions")),
7843 Integer(title
=_("Critical if more than"), unit
=_("sessions")),
7845 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
7849 register_check_parameters(
7850 RulespecGroupCheckParametersApplications
,
7851 "postgres_stat_database",
7852 _("PostgreSQL Database Statistics"),
7855 "This check monitors how often database objects in a PostgreSQL Database are accessed"),
7860 title
=_("Blocks read"),
7862 Float(title
=_("Warning at"), unit
=_("blocks/s")),
7863 Float(title
=_("Critical at"), unit
=_("blocks/s")),
7872 Float(title
=_("Warning at"), unit
=_("/s")),
7873 Float(title
=_("Critical at"), unit
=_("/s")),
7882 Float(title
=_("Warning at"), unit
=_("/s")),
7883 Float(title
=_("Critical at"), unit
=_("/s")),
7892 Float(title
=_("Warning at"), unit
=_("/s")),
7893 Float(title
=_("Critical at"), unit
=_("/s")),
7902 Float(title
=_("Warning at"), unit
=_("/s")),
7903 Float(title
=_("Critical at"), unit
=_("/s")),
7912 Float(title
=_("Warning at"), unit
=_("/s")),
7913 Float(title
=_("Critical at"), unit
=_("/s")),
7919 TextAscii(title
=_("Database name"), allow_empty
=False),
7923 register_check_parameters(
7924 RulespecGroupCheckParametersApplications
,
7926 _("DHCP Pools for Windows and Linux"),
7932 title
= _("Free leases levels"),
7935 title
= _("Free leases levels in percent"),
7937 Percentage(title
= _("Warning if below"), default_value
= 10.0),
7938 Percentage(title
= _("Critical if below"), default_value
= 5.0)
7942 title
= _("Absolute free leases levels"),
7944 Integer(title
= _("Warning if below"), unit
= _("free leases")),
7945 Integer(title
= _("Critical if below"), unit
= _("free leases"))
7953 title
= _("Used leases levels"),
7956 title
= _("Used leases levels in percent"),
7958 Percentage(title
= _("Warning if below")),
7959 Percentage(title
= _("Critical if below"))
7963 title
= _("Absolute used leases levels"),
7965 Integer(title
= _("Warning if below"), unit
= _("used leases")),
7966 Integer(title
= _("Critical if below"), unit
= _("used leases"))
7974 forth
= lambda params
: isinstance(params
, tuple) and {"free_leases" : (float(params
[0]), float(params
[1]))} or params
,
7977 title
= _("Pool name"),
7978 allow_empty
= False,
7980 match_type
= "first",
7983 register_check_parameters(
7984 RulespecGroupCheckParametersOperatingSystem
,
7986 _("Number of threads"),
7989 "These levels check the number of currently existing threads on the system. Each process has at "
7990 "least one thread."),
7992 Integer(title
=_("Warning at"), unit
=_("threads"), default_value
=1000),
7993 Integer(title
=_("Critical at"), unit
=_("threads"), default_value
=2000)
7999 register_check_parameters(
8000 RulespecGroupCheckParametersOperatingSystem
,
8002 _("Number of Logins on System"),
8004 help=_("This rule defines upper limits for the number of logins on a system."),
8006 Integer(title
=_("Warning at"), unit
=_("users"), default_value
=20),
8007 Integer(title
=_("Critical at"), unit
=_("users"), default_value
=30)
8013 register_check_parameters(
8014 RulespecGroupCheckParametersApplications
,
8016 _("Number of processes on OpenVMS"),
8019 Integer(title
=_("Warning at"), unit
=_("processes"), default_value
=100),
8020 Integer(title
=_("Critical at"), unit
=_("processes"), default_value
=200)
8022 title
=_("Impose levels on number of processes"),
8028 register_check_parameters(
8029 RulespecGroupCheckParametersOperatingSystem
, "vm_counter",
8030 _("Number of kernel events per second"),
8032 help=_("This ruleset applies to several similar checks measing various kernel "
8033 "events like context switches, process creations and major page faults. "
8034 "Please create separate rules for each type of kernel counter you "
8035 "want to set levels for."),
8036 unit
=_("events per second"),
8037 default_levels
=(1000, 5000),
8038 default_difference
=(500.0, 1000.0),
8042 title
=_("kernel counter"),
8043 choices
=[("Context Switches", _("Context Switches")),
8044 ("Process Creations", _("Process Creations")),
8045 ("Major Page Faults", _("Major Page Faults"))]), "first")
8047 register_check_parameters(
8048 RulespecGroupCheckParametersStorage
,
8049 "ibm_svc_total_latency",
8050 _("IBM SVC: Levels for total disk latency"),
8051 Dictionary(elements
=[
8054 title
=_("Read latency"),
8057 default_levels
=(50.0, 100.0))),
8060 title
=_("Write latency"),
8063 default_levels
=(50.0, 100.0))),
8067 ("Drives", _("Total latency for all drives")),
8068 ("MDisks", _("Total latency for all MDisks")),
8069 ("VDisks", _("Total latency for all VDisks")),
8071 title
=_("Disk/Drive type"),
8072 help=_("Please enter <tt>Drives</tt>, <tt>Mdisks</tt> or <tt>VDisks</tt> here.")),
8077 def transform_ibm_svc_host(params
):
8079 # Old inventory rule until version 1.2.7
8080 # params were None instead of emtpy dictionary
8081 params
= {'always_ok': False}
8083 if 'always_ok' in params
:
8084 if params
['always_ok'] is False:
8085 params
= {'degraded_hosts': (1, 1), 'offline_hosts': (1, 1), 'other_hosts': (1, 1)}
8091 register_check_parameters(
8092 RulespecGroupCheckParametersStorage
,
8094 _("IBM SVC: Options for SVC Hosts Check"),
8096 Dictionary(elements
=[
8100 title
=_("Count of active hosts"),
8102 Integer(title
=_("Warning at or below"), minvalue
=0, unit
=_("active hosts")),
8104 title
=_("Critical at or below"), minvalue
=0, unit
=_("active hosts")),
8110 title
=_("Count of inactive hosts"),
8113 title
=_("Warning at or above"), minvalue
=0, unit
=_("inactive hosts")),
8115 title
=_("Critical at or above"), minvalue
=0, unit
=_("inactive hosts")),
8121 title
=_("Count of degraded hosts"),
8124 title
=_("Warning at or above"), minvalue
=0, unit
=_("degraded hosts")),
8126 title
=_("Critical at or above"), minvalue
=0, unit
=_("degraded hosts")),
8132 title
=_("Count of offline hosts"),
8135 title
=_("Warning at or above"), minvalue
=0, unit
=_("offline hosts")),
8137 title
=_("Critical at or above"), minvalue
=0, unit
=_("offline hosts")),
8143 title
=_("Count of other hosts"),
8145 Integer(title
=_("Warning at or above"), minvalue
=0, unit
=_("other hosts")),
8146 Integer(title
=_("Critical at or above"), minvalue
=0, unit
=_("other hosts")),
8150 forth
=transform_ibm_svc_host
,
8156 register_check_parameters(
8157 RulespecGroupCheckParametersStorage
,
8159 _("IBM SVC: Options for SVC Disk Check"),
8161 optional_keys
=False,
8166 title
=_("Resulting state if disk is online"),
8173 title
=_("Resulting state if disk is degraded"),
8180 title
=_("Resulting state if disk is offline"),
8187 title
=_("Resulting state if disk is excluded"),
8194 title
=_("Resulting state if disk is in managed mode"),
8201 title
=_("Resulting state if disk is in array mode"),
8208 title
=_("Resulting state if disk is in image mode"),
8215 title
=_("Resulting state if disk is in unmanaged mode"),
8221 title
=_("IBM SVC disk"),
8222 help=_("Name of the disk, e.g. mdisk0"),
8227 register_check_parameters(
8228 RulespecGroupCheckParametersStorage
,
8230 _("Levels for disk IO"),
8233 "With this rule you can set limits for various disk IO statistics. "
8234 "Keep in mind that not all of these settings may be applicable for the actual "
8235 "check. For example, if the check doesn't provide a <i>Read wait</i> information in its "
8236 "output, any configuration setting referring to <i>Read wait</i> will have no effect."),
8240 title
=_("Read throughput"),
8242 default_levels
=(50.0, 100.0),
8246 title
=_("Write throughput"),
8248 default_levels
=(50.0, 100.0),
8252 title
=_("Disk Utilization"),
8254 default_levels
=(80.0, 90.0),
8257 title
=_("Disk Latency"),
8259 default_levels
=(80.0, 160.0),
8261 ("read_wait", Levels(title
=_("Read wait"), unit
=_("ms"), default_levels
=(30.0, 50.0))),
8262 ("write_wait", Levels(title
=_("Write wait"), unit
=_("ms"), default_levels
=(30.0,
8266 title
=_("Averaging"),
8268 "When averaging is set, then all of the disk's metrics are averaged "
8269 "over the selected interval - rather then the check interval. This allows "
8270 "you to make your monitoring less reactive to short peaks. But it will also "
8271 "introduce a loss of accuracy in your graphs. "),
8275 Levels(title
=_("Read operations"), unit
=_("1/s"), default_levels
=(400.0, 600.0))),
8277 Levels(title
=_("Write operations"), unit
=_("1/s"), default_levels
=(300.0, 400.0))),
8282 "For a summarized throughput of all disks, specify <tt>SUMMARY</tt>, "
8283 "a per-disk IO is specified by the drive letter, a colon and a slash on Windows "
8284 "(e.g. <tt>C:/</tt>) or by the device name on Linux/UNIX (e.g. <tt>/dev/sda</tt>).")),
8288 register_check_parameters(
8289 RulespecGroupCheckParametersStorage
, "disk_io", _("Levels on disk IO (old style checks)"),
8290 Dictionary(elements
=[
8293 title
=_("Read throughput"),
8296 default_levels
=(50.0, 100.0))),
8299 title
=_("Write throughput"),
8302 default_levels
=(50.0, 100.0))),
8306 help=_("When averaging is set, a floating average value "
8307 "of the disk throughput is computed and the levels for read "
8308 "and write will be applied to the average instead of the current "
8312 unit
=_("minutes"))),
8315 title
=_("IO Latency"),
8317 Float(title
=_("warning at"), unit
=_("ms"), default_value
=80.0),
8318 Float(title
=_("critical at"), unit
=_("ms"), default_value
=160.0),
8323 title
=_("Performance Data for Latency"),
8324 label
=_("Collect performance data for disk latency"),
8325 help=_("Note: enabling performance data for the latency might "
8326 "cause incompatibilities with existing historical data "
8327 "if you are running PNP4Nagios in SINGLE mode.")),
8331 title
=_("Read Queue-Length"),
8333 Float(title
=_("warning at"), default_value
=80.0),
8334 Float(title
=_("critical at"), default_value
=90.0),
8338 title
=_("Write Queue-Length"),
8340 Float(title
=_("warning at"), default_value
=80.0),
8341 Float(title
=_("critical at"), default_value
=90.0),
8346 title
=_("Performance Data for Queue Length"),
8347 label
=_("Collect performance data for disk latency"),
8348 help=_("Note: enabling performance data for the latency might "
8349 "cause incompatibilities with existing historical data "
8350 "if you are running PNP4Nagios in SINGLE mode.")),
8356 "For a summarized throughput of all disks, specify <tt>SUMMARY</tt>, for a "
8357 "sum of read or write throughput write <tt>read</tt> or <tt>write</tt> resp. "
8358 "A per-disk IO is specified by the drive letter, a colon and a slash on Windows "
8359 "(e.g. <tt>C:/</tt>) or by the device name on Linux/UNIX (e.g. <tt>/dev/sda</tt>).")),
8363 RulespecGroupCheckParametersStorage
,
8364 "diskstat_inventory",
8366 title
=_("Discovery mode for Disk IO check"),
8367 help=_("This rule controls which and how many checks will be created "
8368 "for monitoring individual physical and logical disks. "
8369 "Note: the option <i>Create a summary for all read, one for "
8370 "write</i> has been removed. Some checks will still support "
8371 "this settings, but it will be removed there soon."),
8373 ("summary", _("Create a summary over all physical disks")),
8374 # This option is still supported by some checks, but is deprecated and
8376 # ( "legacy", _("Create a summary for all read, one for write") ),
8377 ("physical", _("Create a separate check for each physical disk")),
8378 ("lvm", _("Create a separate check for each LVM volume (Linux)")),
8379 ("vxvm", _("Creata a separate check for each VxVM volume (Linux)")),
8380 ("diskless", _("Creata a separate check for each partition (XEN)")),
8382 default_value
=['summary'],
8387 def transform_if_groups_forth(params
):
8388 for param
in params
:
8389 if param
.get("name"):
8390 param
["group_name"] = param
["name"]
8392 if param
.get("include_items"):
8393 param
["items"] = param
["include_items"]
8394 del param
["include_items"]
8395 if param
.get("single") is not None:
8397 param
["group_presence"] = "instead"
8399 param
["group_presence"] = "separate"
8404 vs_elements_if_groups_matches
= [
8408 title
=_("Select interface port type"),
8409 choices
=defines
.interface_port_types(),
8410 help=_("Only interfaces with the given port type are put into this group. "
8411 "For example 53 (propVirtual)."),
8418 title
=_("Restrict interface items"),
8419 help=_("Only interface with these item names are put into this group."),
8423 vs_elements_if_groups_group
= [
8426 title
=_("Group name"),
8427 help=_("Name of group in service description"),
8432 title
=_("Group interface presence"),
8433 help=_("Determine whether the group interface is created as an "
8434 "separate service or not. In second case the choosen interface "
8435 "services disapear."),
8437 ("separate", _("List grouped interfaces separately")),
8438 ("instead", _("List grouped interfaces instead")),
8440 default_value
="instead",
8445 RulespecGroupCheckParametersNetworking
,
8446 varname
="if_groups",
8447 title
=_('Network interface groups'),
8449 'Normally the Interface checks create a single service for interface. '
8450 'By defining if-group patterns multiple interfaces can be combined together. '
8451 'A single service is created for this interface group showing the total traffic amount '
8452 'of its members. You can configure if interfaces which are identified as group interfaces '
8453 'should not show up as single service. You can restrict grouped interfaces by iftype and the '
8454 'item name of the single interface.'),
8455 valuespec
=Transform(
8460 title
=_("Groups on single host"),
8461 add_label
=_("Add pattern"),
8462 valuespec
=Dictionary(
8463 elements
=vs_elements_if_groups_group
+ vs_elements_if_groups_matches
,
8464 required_keys
=["group_name", "group_presence"]),
8468 title
=_("Groups on cluster"),
8469 add_label
=_("Add pattern"),
8470 valuespec
=Dictionary(
8471 elements
=vs_elements_if_groups_group
+
8474 title
=_("Patterns for each node"),
8475 add_label
=_("Add pattern"),
8476 valuespec
=Dictionary(
8477 elements
=[("node_name", TextAscii(title
=_("Node name")))] +
8478 vs_elements_if_groups_matches
,
8479 required_keys
=["node_name"]),
8485 forth
=transform_if_groups_forth
),
8490 RulespecGroupCheckParametersDiscovery
,
8491 varname
="winperf_msx_queues_inventory",
8492 title
=_('MS Exchange Message Queues Discovery'),
8494 'Per default the offsets of all Windows performance counters are preconfigured in the check. '
8495 'If the format of your counters object is not compatible then you can adapt the counter '
8496 'offsets manually.'),
8499 orientation
="horizontal",
8502 title
=_("Name of Counter"),
8503 help=_("Name of the Counter to be monitored."),
8509 help=_("The offset of the information relative to counter base"),
8514 add_label
=_("Add Counter")),
8518 mailqueue_params
= Dictionary(
8523 title
=_("Mails in outgoing mail queue/deferred mails"),
8524 help=_("This rule is applied to the number of E-Mails currently "
8525 "in the deferred mail queue, or in the general outgoing mail "
8526 "queue, if such a distinction is not available."),
8528 Integer(title
=_("Warning at"), unit
=_("mails"), default_value
=10),
8529 Integer(title
=_("Critical at"), unit
=_("mails"), default_value
=20),
8536 title
=_("Mails in active mail queue"),
8537 help=_("This rule is applied to the number of E-Mails currently "
8538 "in the active mail queue"),
8540 Integer(title
=_("Warning at"), unit
=_("mails"), default_value
=800),
8541 Integer(title
=_("Critical at"), unit
=_("mails"), default_value
=1000),
8546 optional_keys
=["active"],
8549 register_check_parameters(
8550 RulespecGroupCheckParametersApplications
,
8552 _("Number of mails in outgoing mail queue"),
8555 forth
=lambda old
: not isinstance(old
, dict) and {"deferred": old
} or old
,
8562 register_check_parameters(
8563 RulespecGroupCheckParametersApplications
,
8564 "mail_queue_length",
8565 _("Number of mails in outgoing mail queue"),
8568 forth
=lambda old
: not isinstance(old
, dict) and {"deferred": old
} or old
,
8570 TextAscii(title
=_("Mail queue name")),
8574 register_check_parameters(
8575 RulespecGroupCheckParametersApplications
, "mail_latency", _("Mail Latency"),
8577 title
=_("Upper levels for Mail Latency"),
8579 Age(title
=_("Warning at"), default_value
=40),
8580 Age(title
=_("Critical at"), default_value
=60),
8583 register_check_parameters(
8584 RulespecGroupCheckParametersStorage
,
8586 _("ZFS storage pool status"),
8592 register_check_parameters(
8593 RulespecGroupCheckParametersVirtualization
,
8595 _("Overall state of a virtual machine (for example ESX VMs)"),
8601 register_check_parameters(
8602 RulespecGroupCheckParametersHardware
,
8604 _("Simple checks for BIOS/Hardware errors"),
8610 register_check_parameters(
8611 RulespecGroupCheckParametersApplications
, "omd_status", _("OMD site status"), None,
8613 title
=_("Name of the OMD site"),
8614 help=_("The name of the OMD site to check the status for")), "first")
8616 register_check_parameters(
8617 RulespecGroupCheckParametersStorage
, "network_fs",
8618 _("Network filesystem - overall status (e.g. NFS)"),
8624 title
=_("Performance data settings"),
8626 (True, _("Enable performance data")),
8627 (False, _("Disable performance data")),
8629 default_value
=False),
8633 title
=_("Name of the mount point"), help=_("For NFS enter the name of the mount point.")),
8636 register_check_parameters(
8637 RulespecGroupCheckParametersStorage
,
8638 "windows_multipath",
8639 _("Windows Multipath Count"),
8641 help=_("This rules sets the expected number of active paths for a multipath LUN."),
8642 title
=_("Expected number of active paths"),
8644 Integer(title
=_("Expected number of active paths")),
8646 title
=_("Expected percentage of active paths"),
8648 Integer(title
=_("Expected number of active paths")),
8649 Percentage(title
=_("Warning if less then")),
8650 Percentage(title
=_("Critical if less then")),
8657 register_check_parameters(
8658 RulespecGroupCheckParametersStorage
, "multipath", _("Linux and Solaris Multipath Count"),
8660 help=_("This rules sets the expected number of active paths for a multipath LUN "
8661 "on Linux and Solaris hosts"),
8662 title
=_("Expected number of active paths"),
8664 Integer(title
=_("Expected number of active paths")),
8666 title
=_("Expected percentage of active paths"),
8668 Percentage(title
=_("Warning if less then")),
8669 Percentage(title
=_("Critical if less then")),
8673 title
=_("Name of the MP LUN"),
8674 help=_("For Linux multipathing this is either the UUID (e.g. "
8675 "60a9800043346937686f456f59386741), or the configured "
8676 "alias.")), "first")
8679 RulespecGroupCheckParametersStorage
,
8680 varname
="inventory_multipath_rules",
8681 title
=_("Linux Multipath Inventory"),
8682 valuespec
=Dictionary(
8686 title
=_("Use the multipath alias as service name, if one is set"),
8687 label
=_("use alias"),
8689 "If a multipath device has an alias then you can use it for specifying "
8690 "the device instead of the UUID. The alias will then be part of the service "
8691 "description. The UUID will be displayed in the plugin output."))),
8694 "This rule controls whether the UUID or the alias is used in the service description during "
8695 "discovery of Multipath devices on Linux."),
8700 register_check_parameters(
8701 RulespecGroupCheckParametersStorage
, "multipath_count", _("ESX Multipath Count"),
8703 help=_("This rules sets the expected number of active paths for a multipath LUN "
8705 title
=_("Match type"),
8709 title
=_("OK if standby count is zero or equals active paths."),
8713 title
=_("Custom settings"),
8720 Integer(title
=_("Critical if less than")),
8721 Integer(title
=_("Warning if less than")),
8722 Integer(title
=_("Warning if more than")),
8723 Integer(title
=_("Critical if more than")),
8725 forth
=lambda x
: len(x
) == 2 and (0, 0, x
[0], x
[1]) or x
))
8727 description
) in [("active", _("Active paths")), (
8728 "dead", _("Dead paths")), (
8729 "disabled", _("Disabled paths")), (
8730 "standby", _("Standby paths")), ("unknown",
8731 _("Unknown paths"))]
8733 ]), TextAscii(title
=_("Path ID")), "first")
8735 register_check_parameters(
8736 RulespecGroupCheckParametersStorage
, "hpux_multipath", _("HP-UX Multipath Count"),
8738 title
=_("Expected path situation"),
8739 help=_("This rules sets the expected number of various paths for a multipath LUN "
8742 Integer(title
=_("Number of active paths")),
8743 Integer(title
=_("Number of standby paths")),
8744 Integer(title
=_("Number of failed paths")),
8745 Integer(title
=_("Number of unopen paths")),
8746 ]), TextAscii(title
=_("WWID of the LUN")), "first")
8748 register_check_parameters(
8749 RulespecGroupCheckParametersStorage
,
8751 _("DR:BD roles and diskstates"),
8752 Dictionary(elements
=[(
8757 FixedValue(None, totext
="", title
=_("Do not monitor")),
8760 orientation
="horizontal",
8763 title
=_("DRBD shows up as"),
8764 default_value
="running",
8765 choices
=[("primary_secondary", _("Primary / Secondary")
8766 ), ("primary_primary", _("Primary / Primary")
8767 ), ("secondary_primary", _("Secondary / Primary")
8768 ), ("secondary_secondary",
8769 _("Secondary / Secondary"))]),
8770 MonitoringState(title
=_("Resulting state"),),
8772 default_value
=("ignore", 0)),
8773 title
=_("Set roles"),
8774 add_label
=_("Add role rule"))
8779 title
=_("Diskstates"),
8781 FixedValue(None, totext
="", title
=_("Do not monitor")),
8786 title
=_("Diskstate"),
8788 ("primary_Diskless",
8789 _("Primary - Diskless")),
8790 ("primary_Attaching",
8791 _("Primary - Attaching")),
8792 ("primary_Failed", _("Primary - Failed")),
8793 ("primary_Negotiating",
8794 _("Primary - Negotiating")),
8795 ("primary_Inconsistent",
8796 _("Primary - Inconsistent")),
8797 ("primary_Outdated",
8798 _("Primary - Outdated")),
8799 ("primary_DUnknown",
8800 _("Primary - DUnknown")),
8801 ("primary_Consistent",
8802 _("Primary - Consistent")),
8803 ("primary_UpToDate",
8804 _("Primary - UpToDate")),
8805 ("secondary_Diskless",
8806 _("Secondary - Diskless")),
8807 ("secondary_Attaching",
8808 _("Secondary - Attaching")),
8809 ("secondary_Failed",
8810 _("Secondary - Failed")),
8811 ("secondary_Negotiating",
8812 _("Secondary - Negotiating")),
8813 ("secondary_Inconsistent",
8814 _("Secondary - Inconsistent")),
8815 ("secondary_Outdated",
8816 _("Secondary - Outdated")),
8817 ("secondary_DUnknown",
8818 _("Secondary - DUnknown")),
8819 ("secondary_Consistent",
8820 _("Secondary - Consistent")),
8821 ("secondary_UpToDate",
8822 _("Secondary - UpToDate")),
8824 MonitoringState(title
=_("Resulting state"))
8826 orientation
="horizontal",
8828 title
=_("Set diskstates"),
8829 add_label
=_("Add diskstate rule"))
8832 TextAscii(title
=_("DRBD device")),
8836 register_check_parameters(
8837 RulespecGroupCheckParametersStorage
,
8839 _("NetApp Snapvaults / Snapmirror Lag Time"),
8845 title
=_("Default levels"),
8847 Age(title
=_("Warning at")),
8848 Age(title
=_("Critical at")),
8855 orientation
="horizontal",
8857 TextAscii(title
=_("Policy name")),
8859 title
=_("Maximum age"),
8861 Age(title
=_("Warning at")),
8862 Age(title
=_("Critical at")),
8866 title
=_('Policy specific levels (Clustermode only)'),
8868 "Here you can specify levels for different policies which overrule the levels "
8869 "from the <i>Default levels</i> parameter. This setting only works in NetApp Clustermode setups."
8873 TextAscii(title
=_("Source Path"), allow_empty
=False),
8877 register_check_parameters(
8878 RulespecGroupCheckParametersStorage
,
8880 _("NetApp Snapshot Reserve"),
8885 title
=_("Levels for used configured reserve"),
8887 Percentage(title
=_("Warning at or above"), unit
="%", default_value
=85.0),
8888 Percentage(title
=_("Critical at or above"), unit
="%", default_value
=90.0),
8890 ("state_noreserve", MonitoringState(title
=_("State if no reserve is configured"),)),
8892 TextAscii(title
=_("Volume name")),
8896 register_check_parameters(
8897 RulespecGroupCheckParametersStorage
,
8899 _("Filer Disk Levels (NetApp, IBM SVC)"),
8903 ("failed_spare_ratio",
8905 title
=_("Failed to spare ratio"),
8906 help=_("You can set a limit to the failed to spare disk ratio. "
8907 "The ratio is calculated with <i>spare / (failed + spare)</i>."),
8909 Percentage(title
=_("Warning at or above"), default_value
=1.0),
8910 Percentage(title
=_("Critical at or above"), default_value
=50.0),
8912 ("offline_spare_ratio",
8914 title
=_("Offline to spare ratio"),
8915 help=_("You can set a limit to the offline to spare disk ratio. "
8916 "The ratio is calculated with <i>spare / (offline + spare)</i>."),
8918 Percentage(title
=_("Warning at or above"), default_value
=1.0),
8919 Percentage(title
=_("Critical at or above"), default_value
=50.0),
8921 ("number_of_spare_disks",
8923 title
=_("Number of spare disks"),
8924 help=_("You can set a lower limit to the absolute number of spare disks."),
8926 Integer(title
=_("Warning below"), default_value
=2, min_value
=0),
8927 Integer(title
=_("Critical below"), default_value
=1, min_value
=0),
8931 lambda a
: "broken_spare_ratio" in a
and {"failed_spare_ratio": a
["broken_spare_ratio"]} or a
8937 register_check_parameters(
8938 RulespecGroupCheckParametersStorage
,
8940 _("NetApp Volumes"),
8941 Dictionary(elements
=[
8944 title
=_("Levels for volume"),
8945 show_alternative_title
=True,
8946 default_value
=(80.0, 90.0),
8947 match
=match_dual_level_type
,
8949 get_free_used_dynamic_valuespec("used", "volume"),
8951 get_free_used_dynamic_valuespec("free", "volume", default_value
=(20.0, 10.0)),
8953 forth
=transform_filesystem_free
,
8954 back
=transform_filesystem_free
)
8958 title
=_("Performance data for protocols"),
8959 help=_("Specify for which protocol performance data should get recorded."),
8961 ("", _("Summarized data of all protocols")),
8963 ("cifs", _("CIFS")),
8966 ("iscsi", _("iSCSI")),
8971 title
=_("Magic factor (automatic level adaptation for large volumes)"),
8977 title
=_("Reference size for magic factor"), default_value
=20, minvalue
=1, unit
=_("GB"))
8981 title
=_("Minimum levels if using magic factor"),
8982 help=_("The volume levels will never fall below these values, when using "
8983 "the magic factor and the volume is very small."),
8986 title
=_("Warning if above"),
8991 title
=_("Critical if above"),
8998 title
=_("Levels for Inodes"),
8999 help=_("The number of remaining inodes on the filesystem. "
9000 "Please note that this setting has no effect on some filesystem checks."),
9003 title
=_("Percentage free"),
9005 Percentage(title
=_("Warning if less than")),
9006 Percentage(title
=_("Critical if less than")),
9009 title
=_("Absolute free"),
9012 title
=_("Warning if less than"),
9016 default_value
=10000),
9018 title
=_("Critical if less than"),
9022 default_value
=5000),
9025 default_value
=(10.0, 5.0),
9029 title
=_("Display inode usage in check output..."),
9031 ("onproblem", _("Only in case of a problem")),
9032 ("onlow", _("Only in case of a problem or if inodes are below 50%")),
9033 ("always", _("Always")),
9035 default_value
="onlow",
9040 title
=_("Time Range for filesystem trend computation"),
9044 title
=_("Trend computation"),
9045 label
=_("Enable trend computation"))),
9048 title
=_("Levels on trends in MB per time range"),
9050 Integer(title
=_("Warning at"), unit
=_("MB / range"), default_value
=100),
9051 Integer(title
=_("Critical at"), unit
=_("MB / range"), default_value
=200)
9055 title
=_("Levels for the percentual growth per time range"),
9058 title
=_("Warning at"),
9059 unit
=_("% / range"),
9063 title
=_("Critical at"),
9064 unit
=_("% / range"),
9070 title
=_("Levels on the time left until the filesystem gets full"),
9073 title
=_("Warning if below"),
9078 title
=_("Critical if below"),
9083 ("trend_showtimeleft",
9085 title
=_("Display time left in check output"),
9087 help=_("Normally, the time left until the disk is full is only displayed when "
9088 "the configured levels have been breached. If you set this option "
9089 "the check always reports this information"))),
9092 title
=_("Trend performance data"),
9093 label
=_("Enable generation of performance data from trends"))),
9095 TextAscii(title
=_("Volume name")),
9099 register_check_parameters(
9100 RulespecGroupCheckParametersStorage
,
9104 title
=_("Configure levels for used space"),
9108 title
=_("Ignore used space (this option disables any other options)"),
9110 "Some luns, e.g. jfs formatted, tend to report incorrect used space values"),
9111 label
=_("Ignore used space"),
9117 title
=_("Levels for LUN"),
9118 show_alternative_title
=True,
9119 default_value
=(80.0, 90.0),
9120 match
=match_dual_level_type
,
9122 get_free_used_dynamic_valuespec("used", "LUN"),
9124 get_free_used_dynamic_valuespec("free", "LUN", default_value
=(20.0, 10.0)),
9126 forth
=transform_filesystem_free
,
9127 back
=transform_filesystem_free
,
9133 title
=_("Time Range for lun filesystem trend computation"),
9137 title
=_("Trend computation"),
9138 label
=_("Enable trend computation"))),
9141 title
=_("Levels on trends in MB per time range"),
9143 Integer(title
=_("Warning at"), unit
=_("MB / range"), default_value
=100),
9144 Integer(title
=_("Critical at"), unit
=_("MB / range"), default_value
=200)
9148 title
=_("Levels for the percentual growth per time range"),
9151 title
=_("Warning at"),
9152 unit
=_("% / range"),
9156 title
=_("Critical at"),
9157 unit
=_("% / range"),
9163 title
=_("Levels on the time left until the lun filesystem gets full"),
9166 title
=_("Warning if below"),
9171 title
=_("Critical if below"),
9176 ("trend_showtimeleft",
9178 title
=_("Display time left in check output"),
9181 "Normally, the time left until the lun filesystem is full is only displayed when "
9182 "the configured levels have been breached. If you set this option "
9183 "the check always reports this information"))),
9186 title
=_("Trend performance data"),
9187 label
=_("Enable generation of performance data from trends"))),
9190 title
=_("LUN is read-only"),
9191 help=_("Display a warning if a LUN is not read-only. Without "
9192 "this setting a warning will be displayed if a LUN is "
9194 label
=_("Enable"))),
9196 TextAscii(title
=_("LUN name")),
9200 register_check_parameters(
9201 RulespecGroupCheckParametersApplications
,
9203 _("Windows Services"),
9204 Dictionary(elements
=[
9205 ("additional_servicenames",
9207 title
=_("Alternative names for the service"),
9208 help=_("Here you can specify alternative names that the service might have. "
9209 "This helps when the exact spelling of the services can changed from "
9210 "one version to another."),
9215 orientation
="horizontal",
9218 title
=_("Expected state"),
9219 default_value
="running",
9221 _("ignore the state")), ("running",
9222 _("running")), ("stopped",
9225 title
=_("Start type"),
9226 default_value
="auto",
9228 (None, _("ignore the start type")),
9231 ("disabled", _("disabled")),
9232 ("auto", _("auto")),
9233 ("unknown", _("unknown (old agent)")),
9235 MonitoringState(title
=_("Resulting state"),),
9237 default_value
=("running", "auto", 0)),
9238 title
=_("Services states"),
9239 help=_("You can specify a separate monitoring state for each possible "
9240 "combination of service state and start type. If you do not use "
9241 "this parameter, then only running/auto will be assumed to be OK."),
9245 title
=_("State if no entry matches"),
9251 title
=_("Add custom icon or action"),
9252 help=_("You can assign icons or actions to the found services in the status GUI."),
9256 title
=_("Name of the service"),
9257 help=_("Please Please note, that the agent replaces spaces in "
9258 "the service names with underscores. If you are unsure about the "
9259 "correct spelling of the name then please look at the output of "
9260 "the agent (cmk -d HOSTNAME). The service names are in the first "
9261 "column of the section <<<services>>>. Please "
9262 "do not mix up the service name with the display name of the service."
9263 "The latter one is just being displayed as a further information."),
9268 register_check_parameters(
9269 RulespecGroupCheckParametersApplications
,
9271 _("Solaris Services"),
9274 ("additional_servicenames",
9276 title
=_("Alternative names for the service"),
9277 help=_("Here you can specify alternative names that the service might have. "
9278 "This helps when the exact spelling of the services can changed from "
9279 "one version to another."),
9284 orientation
="horizontal",
9287 title
=_("Expected state"),
9289 (None, _("Ignore the state")),
9290 ("online", _("Online")),
9291 ("disabled", _("Disabled")),
9292 ("maintenance", _("Maintenance")),
9293 ("legacy_run", _("Legacy run")),
9298 (None, _("Ignore")),
9299 (True, _("Has changed")),
9300 (False, _("Did not changed")),
9302 MonitoringState(title
=_("Resulting state"),),
9305 title
=_("Services states"),
9306 help=_("You can specify a separate monitoring state for each possible "
9307 "combination of service state. If you do not use this parameter, "
9308 "then only online/legacy_run will be assumed to be OK."),
9310 ("else", MonitoringState(
9311 title
=_("State if no entry matches"),
9315 TextAscii(title
=_("Name of the service"), allow_empty
=False),
9319 register_check_parameters(
9320 RulespecGroupCheckParametersApplications
,
9321 "winperf_ts_sessions",
9322 _("Windows Terminal Server Sessions"),
9324 help=_("This check monitors number of active and inactive terminal "
9325 "server sessions."),
9330 title
=_("Number of active sessions"),
9332 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
9333 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
9340 title
=_("Number of inactive sessions"),
9341 help=_("Levels for the number of sessions that are currently inactive"),
9343 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=10),
9344 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=20),
9353 register_check_parameters(
9354 RulespecGroupCheckParametersStorage
, "raid", _("RAID: overall state"), None,
9356 title
=_("Name of the device"),
9357 help=_("For Linux MD specify the device name without the "
9358 "<tt>/dev/</tt>, e.g. <tt>md0</tt>, for hardware raids "
9359 "please refer to the manual of the actual check being used.")), "first")
9361 register_check_parameters(
9362 RulespecGroupCheckParametersStorage
, "raid_summary", _("RAID: summary state"),
9363 Dictionary(elements
=[
9364 ("use_device_states",
9366 title
=_("Use device states and overwrite expected status"),
9368 (False, _("Ignore")),
9369 (True, _("Use device states")),
9375 register_check_parameters(
9376 RulespecGroupCheckParametersStorage
, "raid_disk", _("RAID: state of a single disk"),
9378 Dictionary(elements
=[
9382 title
=_("Expected state"),
9383 help=_("State the disk is expected to be in. Typical good states "
9384 "are online, host spare, OK and the like. The exact way of how "
9385 "to specify a state depends on the check and hard type being used. "
9386 "Please take examples from discovered checks for reference.")),
9388 ("use_device_states",
9390 title
=_("Use device states and overwrite expected status"),
9392 (False, _("Ignore")),
9393 (True, _("Use device states")),
9398 forth
=lambda x
: isinstance(x
, str) and {"expected_state": x
} or x
,
9401 title
=_("Number or ID of the disk"),
9402 help=_("How the disks are named depends on the type of hardware being "
9403 "used. Please look at already discovered checks for examples.")), "first")
9405 register_check_parameters(
9406 RulespecGroupCheckParametersStorage
, "pfm_health", _("PCIe flash module"),
9410 "health_lifetime_perc",
9412 title
=_("Lower levels for health lifetime"),
9414 Percentage(title
=_("Warning if below"), default_value
=10),
9415 Percentage(title
=_("Critical if below"), default_value
=5)
9421 title
=_("Number or ID of the disk"),
9422 help=_("How the disks are named depends on the type of hardware being "
9423 "used. Please look at already discovered checks for examples.")), "dict")
9425 register_check_parameters(
9426 RulespecGroupCheckParametersEnvironment
,
9428 _("Switch contact state"),
9430 help=_("This rule sets the required state of a switch contact"),
9431 label
=_("Required switch contact state"),
9433 ("open", "Switch contact is <b>open</b>"),
9434 ("closed", "Switch contact is <b>closed</b>"),
9435 ("ignore", "Ignore switch contact state"),
9438 TextAscii(title
=_("Sensor"), allow_empty
=False),
9442 register_check_parameters(
9443 RulespecGroupCheckParametersEnvironment
,
9445 _("State of PDU Plugs"),
9447 help=_("This rule sets the required state of a PDU plug. It is meant to "
9448 "be independent of the hardware manufacturer."),
9449 title
=_("Required plug state"),
9451 ("on", _("Plug is ON")),
9452 ("off", _("Plug is OFF")),
9454 default_value
="on"),
9456 title
=_("Plug item number or name"),
9458 _("Whether you need the number or the name depends on the check. Just take a look to the service description."
9464 # New temperature rule for modern temperature checks that have the
9465 # sensor type (e.g. "CPU", "Chassis", etc.) as the beginning of their
9466 # item (e.g. "CPU 1", "Chassis 17/11"). This will replace all other
9467 # temperature rulesets in future. Note: those few temperature checks
9468 # that do *not* use an item, need to be converted to use one single
9469 # item (other than None).
9470 register_check_parameters(
9471 RulespecGroupCheckParametersEnvironment
,
9475 Dictionary(elements
=[
9478 title
=_("Upper Temperature Levels"),
9480 Float(title
=_("Warning at"), unit
=u
"°C", default_value
=26),
9481 Float(title
=_("Critical at"), unit
=u
"°C", default_value
=30),
9485 title
=_("Lower Temperature Levels"),
9487 Float(title
=_("Warning below"), unit
=u
"°C", default_value
=0),
9488 Float(title
=_("Critical below"), unit
=u
"°C", default_value
=-10),
9492 title
=_("Display values in "),
9494 ("c", _("Celsius")),
9495 ("f", _("Fahrenheit")),
9500 title
=_("Override unit of sensor"),
9501 help=_("In some rare cases the unit that is signalled by the sensor "
9502 "is wrong and e.g. the sensor sends values in Fahrenheit while "
9503 "they are misinterpreted as Celsius. With this setting you can "
9504 "force the reading of the sensor to be interpreted as customized. "),
9506 ("c", _("Celsius")),
9507 ("f", _("Fahrenheit")),
9510 ("device_levels_handling",
9512 title
=_("Interpretation of the device's own temperature status"),
9514 ("usr", _("Ignore device's own levels")),
9515 ("dev", _("Only use device's levels, ignore yours")),
9516 ("best", _("Use least critical of your and device's levels")),
9517 ("worst", _("Use most critical of your and device's levels")),
9518 ("devdefault", _("Use device's levels if present, otherwise yours")),
9519 ("usrdefault", _("Use your own levels if present, otherwise the device's")),
9521 default_value
="usrdefault",
9526 title
=_("Trend computation"),
9527 label
=_("Enable trend computation"),
9531 title
=_("Observation period for temperature trend computation"),
9534 unit
=_("minutes"))),
9537 title
=_("Levels on temperature increase per period"),
9540 title
=_("Warning at"),
9541 unit
=u
"°C / " + _("period"),
9544 title
=_("Critical at"),
9545 unit
=u
"°C / " + _("period"),
9548 ("trend_levels_lower",
9550 title
=_("Levels on temperature decrease per period"),
9553 title
=_("Warning at"),
9554 unit
=u
"°C / " + _("period"),
9557 title
=_("Critical at"),
9558 unit
=u
"°C / " + _("period"),
9564 _("Levels on the time left until a critical temperature (upper or lower) is reached"
9568 title
=_("Warning if below"),
9573 title
=_("Critical if below"),
9579 optional_keys
=["trend_levels", "trend_levels_lower", "trend_timeleft"],
9583 forth
=lambda v
: isinstance(v
, tuple) and {"levels": v
} or v
,
9585 TextAscii(title
=_("Sensor ID"), help=_("The identifier of the thermal sensor.")),
9589 register_check_parameters(
9590 RulespecGroupCheckParametersEnvironment
,
9592 _("Room temperature (external thermal sensors)"),
9594 help=_("Temperature levels for external thermometers that are used "
9595 "for monitoring the temperature of a datacenter. An example "
9596 "is the webthem from W&T."),
9598 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=26),
9599 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=30),
9601 TextAscii(title
=_("Sensor ID"), help=_("The identifier of the thermal sensor.")),
9606 register_check_parameters(
9607 RulespecGroupCheckParametersEnvironment
,
9608 "hw_single_temperature",
9609 _("Host/Device temperature"),
9611 help=_("Temperature levels for hardware devices with "
9612 "a single temperature sensor."),
9614 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=35),
9615 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=40),
9622 register_check_parameters(
9623 RulespecGroupCheckParametersEnvironment
, "evolt",
9624 _("Voltage levels (UPS / PDU / Other Devices)"),
9626 help=_("Voltage Levels for devices like UPS or PDUs. "
9627 "Several phases may be addressed independently."),
9629 Integer(title
=_("warning if below"), unit
="V", default_value
=210),
9630 Integer(title
=_("critical if below"), unit
="V", default_value
=180),
9632 TextAscii(title
=_("Phase"),
9633 help=_("The identifier of the phase the power is related to.")), "first")
9635 register_check_parameters(
9636 RulespecGroupCheckParametersEnvironment
, "efreq", _("Nominal Frequencies"),
9638 help=_("Levels for the nominal frequencies of AC devices "
9639 "like UPSs or PDUs. Several phases may be addressed independently."),
9641 Integer(title
=_("warning if below"), unit
="Hz", default_value
=40),
9642 Integer(title
=_("critical if below"), unit
="Hz", default_value
=45),
9644 TextAscii(title
=_("Phase"), help=_("The identifier of the phase the power is related to.")),
9647 register_check_parameters(
9648 RulespecGroupCheckParametersEnvironment
, "epower", _("Electrical Power"),
9650 help=_("Levels for the electrical power consumption of a device "
9651 "like a UPS or a PDU. Several phases may be addressed independently."),
9653 Integer(title
=_("warning if below"), unit
="Watt", default_value
=20),
9654 Integer(title
=_("critical if below"), unit
="Watt", default_value
=1),
9656 TextAscii(title
=_("Phase"), help=_("The identifier of the phase the power is related to.")),
9659 register_check_parameters(
9660 RulespecGroupCheckParametersEnvironment
, "ups_out_load",
9661 _("Parameters for output loads of UPSs and PDUs"),
9663 Integer(title
=_("warning at"), unit
=u
"%", default_value
=85),
9664 Integer(title
=_("critical at"), unit
=u
"%", default_value
=90),
9665 ]), TextAscii(title
=_("Phase"), help=_("The identifier of the phase the power is related to.")),
9668 register_check_parameters(
9669 RulespecGroupCheckParametersEnvironment
, "epower_single",
9670 _("Electrical Power for Devices with only one phase"),
9672 help=_("Levels for the electrical power consumption of a device "),
9674 Integer(title
=_("warning if at"), unit
="Watt", default_value
=300),
9675 Integer(title
=_("critical if at"), unit
="Watt", default_value
=400),
9678 register_check_parameters(
9679 RulespecGroupCheckParametersEnvironment
,
9681 _("Hardware temperature, multiple sensors"),
9683 help=_("Temperature levels for hardware devices like "
9684 "Brocade switches with (potentially) several "
9685 "temperature sensors. Sensor IDs can be selected "
9688 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=35),
9689 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=40),
9691 TextAscii(title
=_("Sensor ID"), help=_("The identifier of the thermal sensor.")),
9696 register_check_parameters(
9697 RulespecGroupCheckParametersEnvironment
,
9698 "hw_temperature_single",
9699 _("Hardware temperature, single sensor"),
9701 help=_("Temperature levels for hardware devices like "
9702 "DELL Powerconnect that have just one temperature sensor. "),
9704 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=35),
9705 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=40),
9712 register_check_parameters(
9713 RulespecGroupCheckParametersEnvironment
,
9715 _("Harddisk temperature (e.g. via SMART)"),
9717 help=_("Temperature levels for hard disks, that is determined e.g. via SMART"),
9719 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=35),
9720 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=40),
9723 title
=_("Hard disk device"),
9724 help=_("The identificator of the hard disk device, e.g. <tt>/dev/sda</tt>.")),
9729 register_check_parameters(
9730 RulespecGroupCheckParametersEnvironment
, "eaton_enviroment",
9731 _("Temperature and Humidity for Eaton UPS"),
9732 Dictionary(elements
=[
9735 title
=_("Temperature"),
9737 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=26),
9738 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=30),
9742 title
=_("Remote Temperature"),
9744 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=26),
9745 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=30),
9749 title
=_("Humidity"),
9751 Integer(title
=_("warning at"), unit
=u
"%", default_value
=60),
9752 Integer(title
=_("critical at"), unit
=u
"%", default_value
=75),
9761 Integer(title
=_("warning if below"), unit
=u
"V", default_value
=210),
9762 Integer(title
=_("critical if below"), unit
=u
"V", default_value
=200),
9769 Integer(title
=_("warning at"), unit
=u
"W", default_value
=1000),
9770 Integer(title
=_("critical at"), unit
=u
"W", default_value
=1200),
9775 title
=_("Apparent Power"),
9777 Integer(title
=_("warning at"), unit
=u
"VA", default_value
=1100),
9778 Integer(title
=_("critical at"), unit
=u
"VA", default_value
=1300),
9785 Integer(title
=_("warning at"), unit
=u
"A", default_value
=5),
9786 Integer(title
=_("critical at"), unit
=u
"A", default_value
=10),
9791 title
=_("Frequency"),
9793 Integer(title
=_("warning if below"), unit
=u
"Hz", default_value
=45),
9794 Integer(title
=_("critical if below"), unit
=u
"Hz", default_value
=40),
9795 Integer(title
=_("warning if above"), unit
=u
"Hz", default_value
=55),
9796 Integer(title
=_("critical if above"), unit
=u
"Hz", default_value
=60),
9799 ("differential_current_ac",
9801 title
=_("Differential current AC"),
9803 Float(title
=_("warning at"), unit
=u
"mA", default_value
=3.5),
9804 Float(title
=_("critical at"), unit
=u
"mA", default_value
=30),
9807 ("differential_current_dc",
9809 title
=_("Differential current DC"),
9811 Float(title
=_("warning at"), unit
=u
"mA", default_value
=70),
9812 Float(title
=_("critical at"), unit
=u
"mA", default_value
=100),
9817 register_check_parameters(
9818 RulespecGroupCheckParametersEnvironment
, "ups_outphase",
9819 _("Parameters for output phases of UPSs and PDUs"),
9821 help=_("This rule allows you to specify levels for the voltage, current, load, power "
9822 "and apparent power of your device. The levels will only be applied if the device "
9823 "actually supplies values for these parameters."),
9824 elements
=phase_elements
+ [
9829 Integer(title
=_("warning at"), unit
=u
"%", default_value
=80),
9830 Integer(title
=_("critical at"), unit
=u
"%", default_value
=90),
9832 ("map_device_states",
9834 Tuple(elements
=[TextAscii(size
=10), MonitoringState()]),
9835 title
=_("Map device state"),
9836 help=_("Here you can enter either device state number (eg. from SNMP devices) "
9837 "or exact device state name and the related monitoring state."),
9841 title
=_("Output Name"),
9842 help=_("The name of the output, e.g. <tt>Phase 1</tt>/<tt>PDU 1</tt>")), "dict")
9844 register_check_parameters(
9845 RulespecGroupCheckParametersEnvironment
, "el_inphase",
9846 _("Parameters for input phases of UPSs and PDUs"),
9848 help=_("This rule allows you to specify levels for the voltage, current, power "
9849 "and apparent power of your device. The levels will only be applied if the device "
9850 "actually supplies values for these parameters."),
9851 elements
=phase_elements
+ [
9852 ("map_device_states",
9854 Tuple(elements
=[TextAscii(size
=10), MonitoringState()]),
9855 title
=_("Map device state"),
9856 help=_("Here you can enter either device state number (eg. from SNMP devices) "
9857 "or exact device state name and the related monitoring state."),
9860 ), TextAscii(title
=_("Input Name"), help=_("The name of the input, e.g. <tt>Phase 1</tt>")),
9863 register_check_parameters(
9864 RulespecGroupCheckParametersEnvironment
,
9866 _("FAN speed of Hardware devices"),
9872 help=_("Lower levels for the fan speed of a hardware device"),
9873 title
=_("Lower levels"),
9875 Integer(title
=_("warning if below"), unit
=u
"rpm"),
9876 Integer(title
=_("critical if below"), unit
=u
"rpm"),
9882 help=_("Upper levels for the fan speed of a hardware device"),
9883 title
=_("Upper levels"),
9885 Integer(title
=_("warning at"), unit
=u
"rpm", default_value
=8000),
9886 Integer(title
=_("critical at"), unit
=u
"rpm", default_value
=8400),
9890 Checkbox(title
=_("Performance data"), label
=_("Enable performance data"))),
9892 optional_keys
=["upper"],
9894 TextAscii(title
=_("Fan Name"), help=_("The identificator of the fan.")),
9898 register_check_parameters(
9899 RulespecGroupCheckParametersEnvironment
,
9901 _("Fan speed of hardware devices (in percent)"),
9902 Dictionary(elements
=[
9905 title
=_("Upper fan speed levels"),
9907 Percentage(title
=_("warning if at")),
9908 Percentage(title
=_("critical if at")),
9912 title
=_("Lower fan speed levels"),
9914 Percentage(title
=_("warning if below")),
9915 Percentage(title
=_("critical if below")),
9918 TextAscii(title
=_("Fan Name"), help=_("The identifier of the fan.")),
9922 register_check_parameters(
9923 RulespecGroupCheckParametersOperatingSystem
,
9925 _("Number of used states of OpenBSD PF engine"),
9931 title
=_("Limits for the number of used states"),
9933 Integer(title
=_("warning at")),
9934 Integer(title
=_("critical at")),
9938 optional_keys
=[None],
9944 register_check_parameters(
9945 RulespecGroupCheckParametersEnvironment
,
9947 _("Levels for Gude PDU Devices"),
9948 Dictionary(elements
=[
9951 title
=_("Total accumulated Active Energy of Power Channel"),
9953 Integer(title
=_("warning at"), unit
=_("kW")),
9954 Integer(title
=_("critical at"), unit
=_("kW")),
9958 title
=_("Active Power"),
9960 Integer(title
=_("warning at"), unit
=_("W")),
9961 Integer(title
=_("critical at"), unit
=_("W")),
9965 title
=_("Current on Power Channel"),
9967 Integer(title
=_("warning at"), unit
=_("A")),
9968 Integer(title
=_("critical at"), unit
=_("A")),
9972 title
=_("Voltage on Power Channel"),
9974 Integer(title
=_("warning if below"), unit
=_("V")),
9975 Integer(title
=_("critical if below"), unit
=_("V")),
9979 title
=_("Line Mean Apparent Power"),
9981 Integer(title
=_("warning at"), unit
=_("VA")),
9982 Integer(title
=_("critical at"), unit
=_("VA")),
9985 TextAscii(title
=_("Phase Number"), help=_("The Number of the power Phase.")),
9989 register_check_parameters(
9990 RulespecGroupCheckParametersEnvironment
, "hostsystem_sensors", _("Hostsystem sensor alerts"),
9993 help=_("This rule allows to override alert levels for the given sensor names."),
9995 ("name", TextAscii(title
=_("Sensor name"))),
9998 title
=_("Custom states"),
10001 title
="Sensor %s" % description
,
10002 label
=_("Set state to"),
10003 default_value
=int(element
)))
10004 for (element
, description
) in [("0", _("OK")), (
10005 "1", _("WARNING")), ("2", _("CRITICAL")), ("3", _("UNKNOWN"))]],
10008 optional_keys
=False),
10009 add_label
=_("Add sensor name")), None, "first")
10011 register_check_parameters(
10012 RulespecGroupCheckParametersEnvironment
, "netapp_instance", _("Netapp Instance State"),
10015 help=_("This rule allows you to override netapp warnings"),
10016 elements
=[("name", TextAscii(title
=_("Warning starts with"))),
10017 ("state", MonitoringState(title
="Set state to", default_value
=1))],
10018 optional_keys
=False),
10019 add_label
=_("Add warning")), None, "first")
10021 register_check_parameters(
10022 RulespecGroupCheckParametersEnvironment
,
10023 "temperature_auto",
10024 _("Temperature sensors with builtin levels"),
10026 TextAscii(title
=_("Sensor ID"), help=_("The identificator of the thermal sensor.")),
10031 register_check_parameters(
10032 RulespecGroupCheckParametersEnvironment
,
10033 "temperature_trends",
10034 _("Temperature trends for devices with builtin levels"),
10036 title
=_("Temperature Trend Analysis"),
10038 "This rule enables and configures a trend analysis and corresponding limits for devices, "
10039 "which have their own limits configured on the device. It will only work for supported "
10040 "checks, right now the <tt>adva_fsp_temp</tt> check."),
10045 title
=_("Time range for temperature trend computation"),
10048 unit
=_("minutes")),
10049 title
=_("Trend computation"),
10050 label
=_("Enable trend computation"))),
10053 title
=_("Levels on trends in degrees Celsius per time range"),
10055 Integer(title
=_("Warning at"), unit
=u
"°C / " + _("range"), default_value
=5),
10056 Integer(title
=_("Critical at"), unit
=u
"°C / " + _("range"), default_value
=10)
10060 title
=_("Levels on the time left until limit is reached"),
10063 title
=_("Warning if below"),
10068 title
=_("Critical if below"),
10074 TextAscii(title
=_("Sensor ID"), help=_("The identifier of the thermal sensor.")),
10078 ntp_params
= Tuple(
10079 title
=_("Thresholds for quality of time"),
10082 title
=_("Critical at stratum"),
10085 "The stratum (\"distance\" to the reference clock) at which the check gets critical."
10089 title
=_("Warning at"),
10091 default_value
=200.0,
10092 help=_("The offset in ms at which a warning state is triggered."),
10095 title
=_("Critical at"),
10097 default_value
=500.0,
10098 help=_("The offset in ms at which a critical state is triggered."),
10102 register_check_parameters(
10103 RulespecGroupCheckParametersOperatingSystem
, "ntp_time", _("State of NTP time synchronisation"),
10105 Dictionary(elements
=[
10112 title
=_("Phases without synchronization"),
10115 title
=_("Warning at"),
10116 display
=["hours", "minutes"],
10120 title
=_("Critical at"),
10121 display
=["hours", "minutes"],
10122 default_value
=3600,
10126 forth
=lambda params
: isinstance(params
, tuple) and {"ntp_levels": params
} or params
), None,
10129 register_check_parameters(RulespecGroupCheckParametersOperatingSystem
, "ntp_peer",
10130 _("State of NTP peer"), ntp_params
,
10131 TextAscii(title
=_("Name of the peer")), "first")
10133 register_check_parameters(
10134 RulespecGroupCheckParametersEnvironment
,
10136 _("Smoke Detection"),
10138 help=_("For devices which measure smoke in percent"),
10140 Percentage(title
=_("Warning at"), allow_int
=True, default_value
=1),
10141 Percentage(title
=_("Critical at"), allow_int
=True, default_value
=5),
10143 TextAscii(title
=_("Sensor ID"), help=_("The identifier of the sensor.")),
10147 register_check_parameters(
10148 RulespecGroupCheckParametersEnvironment
,
10150 _("APC Automatic Transfer Switch Output"),
10152 title
=_("Levels for ATS Output parameters"),
10153 optional_keys
=True,
10155 ("output_voltage_max",
10157 title
=_("Maximum Levels for Voltage"),
10159 Integer(title
=_("Warning at"), unit
="Volt"),
10160 Integer(title
=_("Critical at"), unit
="Volt"),
10162 ("output_voltage_min",
10164 title
=_("Minimum Levels for Voltage"),
10166 Integer(title
=_("Warning if below"), unit
="Volt"),
10167 Integer(title
=_("Critical if below"), unit
="Volt"),
10171 title
=_("Maximum Levels for load in percent"),
10173 Percentage(title
=_("Warning at")),
10174 Percentage(title
=_("Critical at")),
10178 title
=_("Minimum Levels for load in percent"),
10180 Percentage(title
=_("Warning if below")),
10181 Percentage(title
=_("Critical if below")),
10185 TextAscii(title
=_("ID of phase")),
10189 register_check_parameters(
10190 RulespecGroupCheckParametersEnvironment
,
10192 _("Airflow levels"),
10194 title
=_("Levels for airflow"),
10198 title
=_("Lower levels"),
10201 title
=_("Warning if below"),
10206 title
=_("Critical if below"),
10213 title
=_("Upper levels"),
10216 title
=_("Warning at"), unit
=_("l/s"), default_value
=10.0, allow_int
=True),
10218 title
=_("Critical at"), unit
=_("l/s"), default_value
=11.0, allow_int
=True)
10225 register_check_parameters(
10226 RulespecGroupCheckParametersEnvironment
,
10230 title
=_("Levels for battery parameters"),
10231 optional_keys
=False,
10235 title
=_("Battery capacity"),
10238 title
=_("Warning at"),
10240 _("The battery capacity in percent at and below which a warning state is triggered"
10246 title
=_("Critical at"),
10248 _("The battery capacity in percent at and below which a critical state is triggered"
10259 title
=_("Time left on battery"),
10262 title
=_("Warning at"),
10264 _("Time left on Battery at and below which a warning state is triggered"
10270 title
=_("Critical at"),
10272 _("Time Left on Battery at and below which a critical state is triggered"
10285 register_check_parameters(
10286 RulespecGroupCheckParametersApplications
,
10287 "mbg_lantime_state",
10288 _("Meinberg Lantime State"),
10290 title
=_("Meinberg Lantime State"),
10294 title
=_("Warning levels for Stratum"),
10297 title
=_("Warning at"),
10301 title
=_("Critical at"),
10307 title
=_("Warning levels for Time Offset"),
10310 title
=_("Warning at"),
10311 unit
=_("microseconds"),
10315 title
=_("Critical at"),
10316 unit
=_("microseconds"),
10325 register_check_parameters(
10326 RulespecGroupCheckParametersApplications
, "sansymphony_pool", _("Sansymphony: pool allocation"),
10328 help=_("This rule sets the warn and crit levels for the percentage of allocated pools"),
10331 title
=_("Warning at"),
10336 title
=_("Critical at"),
10340 ]), TextAscii(title
=_("Name of the pool"),), "first")
10342 register_check_parameters(
10343 RulespecGroupCheckParametersApplications
, "sansymphony_alerts",
10344 _("Sansymphony: Number of unacknowlegded alerts"),
10346 help=_("This rule sets the warn and crit levels for the number of unacknowlegded alerts"),
10349 title
=_("Warning at"),
10354 title
=_("Critical at"),
10360 register_check_parameters(
10361 RulespecGroupCheckParametersApplications
, "jvm_threads", _("JVM threads"),
10363 help=_("This rule sets the warn and crit levels for the number of threads "
10364 "running in a JVM."),
10367 title
=_("Warning at"),
10372 title
=_("Critical at"),
10378 title
=_("Name of the virtual machine"),
10379 help=_("The name of the application server"),
10383 register_check_parameters(
10384 RulespecGroupCheckParametersApplications
,
10385 "sym_brightmail_queues",
10386 "Symantec Brightmail Queues",
10388 help=_("This check is used to monitor successful email delivery through "
10389 "Symantec Brightmail Scanner appliances."),
10393 title
=_("Number of connections"),
10395 Integer(title
=_("Warning at")),
10396 Integer(title
=_("Critical at")),
10400 title
=_("Number of messages delivered"),
10402 Integer(title
=_("Warning at")),
10403 Integer(title
=_("Critical at")),
10407 title
=_("Amount of data processed"),
10409 Integer(title
=_("Warning at")),
10410 Integer(title
=_("Cricital at")),
10414 title
=_("Number of messages currently queued"),
10416 Integer(title
=_("Warning at")),
10417 Integer(title
=_("Critical at")),
10421 title
=_("Size of the queue"),
10423 Integer(title
=_("Warning at")),
10424 Integer(title
=_("Critical at")),
10426 ("deferredMessages",
10428 title
=_("Number of messages in deferred state"),
10430 Integer(title
=_("Warning at")),
10431 Integer(title
=_("Critical at")),
10435 TextAscii(title
=_("Instance name"), allow_empty
=True),
10439 register_check_parameters(
10440 RulespecGroupCheckParametersApplications
, "db2_logsize", _("DB2 logfile usage"),
10441 Dictionary(elements
=[(
10444 get_free_used_dynamic_valuespec("free", "logfile", default_value
=(20.0, 10.0)),
10445 title
=_("Logfile levels"),
10447 forth
=transform_filesystem_free
,
10448 back
=transform_filesystem_free
))]),
10450 title
=_("Instance"), help=_("DB2 instance followed by database name, e.g db2taddm:CMDBS1")),
10453 register_check_parameters(
10454 RulespecGroupCheckParametersApplications
,
10455 "db2_sortoverflow",
10456 _("DB2 Sort Overflow"),
10458 help=_("This rule allows you to set percentual limits for sort overflows."),
10463 title
=_("Overflows"),
10465 Percentage(title
=_("Warning at"), unit
=_("%"), default_value
=2.0),
10466 Percentage(title
=_("Critical at"), unit
=_("%"), default_value
=4.0),
10472 title
=_("Instance"), help=_("DB2 instance followed by database name, e.g db2taddm:CMDBS1")),
10476 register_check_parameters(
10477 RulespecGroupCheckParametersApplications
, "db2_tablespaces", _("DB2 Tablespaces"),
10479 help=_("A tablespace is a container for segments (tables, indexes, etc). A "
10480 "database consists of one or more tablespaces, each made up of one or "
10481 "more data files. Tables and indexes are created within a particular "
10483 "This rule allows you to define checks on the size of tablespaces."),
10484 elements
=db_levels_common
,
10487 title
=_("Instance"),
10488 help=_("The instance name, the database name and the tablespace name combined "
10489 "like this db2wps8:WPSCOMT8.USERSPACE1")), "dict")
10491 register_check_parameters(
10492 RulespecGroupCheckParametersApplications
, "db2_connections", _("DB2 Connections"),
10494 help=_("This rule allows you to set limits for the maximum number of DB2 connections"),
10499 title
=_("Number of current connections"),
10501 Integer(title
=_("Warning at"), unit
=_("connections"), default_value
=150),
10502 Integer(title
=_("Critical at"), unit
=_("connections"), default_value
=200),
10508 title
=_("Instance"), help=_("DB2 instance followed by database name, e.g db2taddm:CMDBS1")),
10511 register_check_parameters(
10512 RulespecGroupCheckParametersApplications
,
10516 help=_("This rule allows you to configure limits for the deadlocks and lockwaits "
10517 "counters of a DB2."),
10522 title
=_("Deadlocks"),
10524 Float(title
=_("Warning at"), unit
=_("deadlocks/sec")),
10525 Float(title
=_("Critical at"), unit
=_("deadlocks/sec")),
10532 title
=_("Lockwaits"),
10534 Float(title
=_("Warning at"), unit
=_("lockwaits/sec")),
10535 Float(title
=_("Critical at"), unit
=_("lockwaits/sec")),
10541 title
=_("Instance"), help=_("DB2 instance followed by database name, e.g db2taddm:CMDBS1")),
10545 register_check_parameters(
10546 RulespecGroupCheckParametersApplications
, "db2_backup",
10547 _("DB2 Time since last database Backup"),
10550 Age(title
=_("Warning at"),
10551 display
=["days", "hours", "minutes"],
10552 default_value
=86400 * 14),
10553 Age(title
=_("Critical at"),
10554 display
=["days", "hours", "minutes"],
10555 default_value
=86400 * 28)
10557 title
=_("Specify time since last successful backup"),
10560 title
=_("Instance"),
10561 help=_("DB2 instance followed by database name, e.g db2taddm:CMDBS1")), "first")
10563 register_check_parameters(
10564 RulespecGroupCheckParametersApplications
, "db2_mem", _("Memory levels for DB2 memory usage"),
10567 Percentage(title
=_("Warning if less than"), unit
=_("% memory left")),
10568 Percentage(title
=_("Critical if less than"), unit
=_("% memory left")),
10569 ],), TextAscii(title
=_("Instance name"), allow_empty
=True), "first")
10571 register_check_parameters(
10572 RulespecGroupCheckParametersApplications
, "windows_updates", _("WSUS (Windows Updates)"),
10574 title
=_("Parameters for the Windows Update Check with WSUS"),
10575 help=_("Set the according numbers to 0 if you want to disable alerting."),
10577 Integer(title
=_("Warning if at least this number of important updates are pending")),
10578 Integer(title
=_("Critical if at least this number of important updates are pending")),
10579 Integer(title
=_("Warning if at least this number of optional updates are pending")),
10580 Integer(title
=_("Critical if at least this number of optional updates are pending")),
10581 Age(title
=_("Warning if time until forced reboot is less then"), default_value
=604800),
10582 Age(title
=_("Critical if time time until forced reboot is less then"),
10583 default_value
=172800),
10584 Checkbox(title
=_("display all important updates verbosely"), default_value
=True),
10588 synology_update_states
= [
10590 (2, "Unavailable"),
10591 (4, "Disconnected"),
10595 register_check_parameters(
10596 RulespecGroupCheckParametersApplications
,
10598 _("Synology Updates"),
10600 title
=_("Update State"),
10604 title
=_("States which result in OK"),
10605 choices
=synology_update_states
,
10606 default_value
=[2])),
10609 title
=_("States which result in Warning"),
10610 choices
=synology_update_states
,
10611 default_value
=[5])),
10614 title
=_("States which result in Critical"),
10615 choices
=synology_update_states
,
10616 default_value
=[1, 4])),
10618 optional_keys
=None,
10624 register_check_parameters(
10625 RulespecGroupCheckParametersApplications
, "antivir_update_age",
10626 _("Age of last AntiVirus update"),
10628 title
=_("Age of last AntiVirus update"),
10630 Age(title
=_("Warning level for time since last update")),
10631 Age(title
=_("Critical level for time since last update")),
10634 register_check_parameters(RulespecGroupCheckParametersApplications
,
10636 _('Logwatch Event Console Forwarding'),
10638 title
= _("Forwarding"),
10639 help = _("Instead of using the regular logwatch check all lines received by logwatch can "
10640 "be forwarded to a Check_MK event console daemon to be processed. The target event "
10641 "console can be configured for each host in a separate rule."),
10642 style
= "dropdown",
10646 totext
= _("Messages are handled by logwatch."),
10647 title
= _("No forwarding"),
10650 title
= _('Forward Messages to Event Console'),
10652 ('method', Transform(
10653 # TODO: Clean this up to some CascadingDropdown()
10655 style
= "dropdown",
10656 title
= _("Forwarding Method"),
10660 title
= _("Local: Send events to local Event Console in same OMD site"),
10661 totext
= _("Directly forward to Event Console"),
10664 title
= _("Local: Send events to local Event Console into unix socket"),
10665 allow_empty
= False,
10670 title
= _("Local: Spooling - Send events to local event console in same OMD site"),
10671 totext
= _("Spool to Event Console"),
10675 title
= _("Local: Spooling - Send events to local Event Console into given spool directory"),
10676 allow_empty
= False,
10677 forth
= lambda x
: x
[6:], # remove prefix
10678 back
= lambda x
: "spool:" + x
, # add prefix
10681 title
= _("Remote: Send events to remote syslog host"),
10683 ("tcp", _("Send via TCP"), Dictionary(
10685 ("address", TextAscii(
10686 title
= _("Address"),
10687 allow_empty
= False,
10691 allow_empty
= False,
10692 default_value
= 514,
10697 ("spool", Dictionary(
10698 title
= _("Spool messages that could not be sent"),
10699 help = _("Messages that can not be forwarded, e.g. when the target Event Console is "
10700 "not running, can temporarily be stored locally. Forwarding is tried again "
10701 "on next execution. When messages are spooled, the check will go into WARNING "
10702 "state. In case messages are dropped by the rules below, the check will shortly "
10703 "go into CRITICAL state for this execution."),
10706 title
= _("Maximum spool duration"),
10707 help = _("Messages that are spooled longer than this time will be thrown away."),
10708 default_value
= 60*60*24*7, # 1 week should be fine (if size is not exceeded)
10710 ("max_size", Filesize(
10711 title
= _("Maximum spool size"),
10712 help = _("When the total size of spooled messages exceeds this number, the oldest "
10713 "messages of the currently spooled messages is thrown away until the left "
10714 "messages have the half of the maximum size."),
10715 default_value
= 500000, # do not save more than 500k of message
10718 optional_keys
= [],
10721 optional_keys
= [ "spool" ],
10723 ("udp", _("Send via UDP"), Dictionary(
10725 ("address", TextAscii(
10726 title
= _("Address"),
10727 allow_empty
= False,
10731 allow_empty
= False,
10732 default_value
= 514,
10738 optional_keys
= [],
10743 match
= lambda x
: 4 if isinstance(x
, tuple) else (0 if not x
else (2 if x
== 'spool:' else (3 if x
.startswith('spool:') else 1)))
10745 # migrate old (tcp, address, port) tuple to new dict
10746 forth
= lambda v
: (v
[0], {"address": v
[1], "port": v
[2]}) if (isinstance(v
, tuple) and not isinstance(v
[1], dict)) else v
,
10748 ('facility', DropdownChoice(
10749 title
= _("Syslog facility for forwarded messages"),
10750 help = _("When forwarding messages and no facility can be extracted from the "
10751 "message this facility is used."),
10752 choices
= mkeventd
.syslog_facilities
,
10753 default_value
= 17, # local1
10755 ('restrict_logfiles',
10757 title
= _('Restrict Logfiles (Prefix matching regular expressions)'),
10758 help = _("Put the item names of the logfiles here. For example \"System$\" "
10759 "to select the service \"LOG System\". You can use regular expressions "
10760 "which must match the beginning of the logfile name."),
10763 ('monitor_logfilelist',
10765 title
= _("Monitoring of forwarded logfiles"),
10766 label
= _("Warn if list of forwarded logfiles changes"),
10767 help = _("If this option is enabled, the check monitors the list of forwarded "
10768 "logfiles and will warn you if at any time a logfile is missing or exceeding "
10769 "when compared to the initial list that was snapshotted during service detection. "
10770 "Reinventorize this check in order to make it OK again."),
10773 ('expected_logfiles',
10775 title
= _("List of expected logfiles"),
10776 help = _("When the monitoring of forwarded logfiles is enabled, the check verifies that "
10777 "all of the logfiles listed here are reported by the monitored system."),
10780 ('logwatch_reclassify',
10782 title
= _("Reclassify messages before forwarding them to the EC"),
10783 label
= _("Apply logwatch patterns"),
10784 help = _("If this option is enabled, the logwatch lines are first reclassified by the logwatch "
10785 "patterns before they are sent to the event console. If you reclassify specific lines to "
10786 "IGNORE they are not forwarded to the event console. This takes the burden from the "
10787 "event console to process the message itself through all of its rulesets. The reclassifcation "
10788 "of each line takes into account from which logfile the message originates. So you can create "
10789 "logwatch reclassification rules specifically designed for a logfile <i>access.log</i>, "
10790 "which do not apply to other logfiles."),
10793 ('separate_checks',
10795 title
= _("Create a separate check for each logfile"),
10796 label
= _("Separate check"),
10797 help = _("If this option is enabled, there will be one separate check for each logfile found during "
10798 "the service discovery. This option also changes the behaviour for unknown logfiles. "
10799 "The default logwatch check forwards all logfiles to the event console, even logfiles "
10800 "which were not known during the service discovery. Creating one check per logfile changes "
10801 "this behaviour so that any data from unknown logfiles is discarded."),
10805 optional_keys
= ['restrict_logfiles', 'expected_logfiles', 'logwatch_reclassify', 'separate_checks'],
10808 default_value
= '',
10815 RulespecGroupCheckParametersApplications
,
10816 varname
="logwatch_groups",
10817 title
=_('Logfile Grouping Patterns'),
10818 help=_('The check <tt>logwatch</tt> normally creates one service for each logfile. '
10819 'By defining grouping patterns you can switch to the check <tt>logwatch.groups</tt>. '
10820 'If the pattern begins with a tilde then this pattern is interpreted as a regular '
10821 'expression instead of as a filename globbing pattern and <tt>*</tt> and <tt>?</tt> '
10822 'are treated differently. '
10823 'That check monitors a list of logfiles at once. This is useful if you have '
10824 'e.g. a folder with rotated logfiles where the name of the current logfile'
10825 'also changes with each rotation'),
10828 help=_("This defines one logfile grouping pattern"),
10830 orientation
="horizontal",
10832 TextAscii(title
=_("Name of group"),),
10835 orientation
="vertical",
10837 TextAscii(title
=_("Include Pattern")),
10838 TextAscii(title
=_("Exclude Pattern"))
10843 add_label
=_("Add pattern group"),
10849 RulespecGroupCheckParametersNetworking
,
10850 "if_disable_if64_hosts",
10851 title
=_("Hosts forced to use <tt>if</tt> instead of <tt>if64</tt>"),
10852 help=_("A couple of switches with broken firmware report that they "
10853 "support 64 bit counters but do not output any actual data "
10854 "in those counters. Listing those hosts in this rule forces "
10855 "them to use the interface check with 32 bit counters instead."))
10857 # wmic_process does not support inventory at the moment
10858 register_check_parameters(
10859 RulespecGroupCheckParametersApplications
, "wmic_process",
10860 _("Memory and CPU of processes on Windows"),
10864 title
=_("Name of the process"),
10867 Integer(title
=_("Memory warning at"), unit
="MB"),
10868 Integer(title
=_("Memory critical at"), unit
="MB"),
10869 Integer(title
=_("Pagefile warning at"), unit
="MB"),
10870 Integer(title
=_("Pagefile critical at"), unit
="MB"),
10871 Percentage(title
=_("CPU usage warning at")),
10872 Percentage(title
=_("CPU usage critical at")),
10875 title
=_("Process name for usage in the Nagios service description"), allow_empty
=False),
10878 register_check_parameters(
10879 RulespecGroupCheckParametersOperatingSystem
,
10881 _("Zypper Updates"),
10884 match_type
="first",
10887 register_check_parameters(
10888 RulespecGroupCheckParametersOperatingSystem
,
10891 Dictionary(elements
=[
10894 title
=_("State when normal updates are pending"),
10899 title
=_("State when security updates are pending"),
10907 register_check_parameters(
10908 RulespecGroupCheckParametersEnvironment
, "airflow_deviation", _("Airflow Deviation in Percent"),
10910 help=_("Levels for Airflow Deviation measured at airflow sensors "),
10912 Float(title
=_("critical if below or equal"), unit
=u
"%", default_value
=-20),
10913 Float(title
=_("warning if below or equal"), unit
=u
"%", default_value
=-20),
10914 Float(title
=_("warning if above or equal"), unit
=u
"%", default_value
=20),
10915 Float(title
=_("critical if above or equal"), unit
=u
"%", default_value
=20),
10916 ]), TextAscii(title
=_("Detector ID"), help=_("The identifier of the detector.")), "first")
10918 register_check_parameters(
10919 RulespecGroupCheckParametersApplications
,
10921 _("Load of Citrix Server"),
10924 title
=_("Citrix Server load"),
10926 Percentage(title
=_("Warning at"), default_value
=85.0, unit
="percent"),
10927 Percentage(title
=_("Critical at"), default_value
=95.0, unit
="percent"),
10929 forth
=lambda x
: (x
[0] / 100.0, x
[1] / 100.0),
10930 back
=lambda x
: (int(x
[0] * 100), int(x
[1] * 100))),
10932 match_type
="first",
10935 register_check_parameters(
10936 RulespecGroupCheckParametersNetworking
, "adva_ifs", _("Adva Optical Transport Laser Power"),
10937 Dictionary(elements
=[
10938 ("limits_output_power",
10940 title
=_("Sending Power"),
10942 Float(title
=_("lower limit"), unit
="dBm"),
10943 Float(title
=_("upper limit"), unit
="dBm"),
10945 ("limits_input_power",
10947 title
=_("Received Power"),
10949 Float(title
=_("lower limit"), unit
="dBm"),
10950 Float(title
=_("upper limit"), unit
="dBm"),
10953 title
=_("Interface"),
10957 bluecat_operstates
= [
10958 (1, "running normally"),
10959 (2, "not running"),
10960 (3, "currently starting"),
10961 (4, "currently stopping"),
10965 register_check_parameters(
10966 RulespecGroupCheckParametersNetworking
,
10968 _("Bluecat NTP Settings"),
10969 Dictionary(elements
=[
10972 title
=_("Operations States"),
10976 title
=_("States treated as warning"),
10977 choices
=bluecat_operstates
,
10978 default_value
=[2, 3, 4],
10982 title
=_("States treated as critical"),
10983 choices
=bluecat_operstates
,
10987 required_keys
=['warning', 'critical'],
10991 title
=_("Levels for Stratum "),
10993 Integer(title
=_("Warning at")),
10994 Integer(title
=_("Critical at")),
11001 register_check_parameters(
11002 RulespecGroupCheckParametersNetworking
,
11004 _("Bluecat DHCP Settings"),
11009 title
=_("Operations States"),
11013 title
=_("States treated as warning"),
11014 choices
=bluecat_operstates
,
11015 default_value
=[2, 3, 4],
11019 title
=_("States treated as critical"),
11020 choices
=bluecat_operstates
,
11024 required_keys
=['warning', 'critical'],
11027 required_keys
=['oper_states'], # There is only one value, so its required
11033 register_check_parameters(
11034 RulespecGroupCheckParametersNetworking
,
11035 "bluecat_command_server",
11036 _("Bluecat Command Server Settings"),
11041 title
=_("Operations States"),
11045 title
=_("States treated as warning"),
11046 choices
=bluecat_operstates
,
11047 default_value
=[2, 3, 4],
11051 title
=_("States treated as critical"),
11052 choices
=bluecat_operstates
,
11056 required_keys
=['warning', 'critical'],
11059 required_keys
=['oper_states'], # There is only one value, so its required
11065 register_check_parameters(
11066 RulespecGroupCheckParametersNetworking
,
11068 _("Bluecat DNS Settings"),
11073 title
=_("Operations States"),
11077 title
=_("States treated as warning"),
11078 choices
=bluecat_operstates
,
11079 default_value
=[2, 3, 4],
11083 title
=_("States treated as critical"),
11084 choices
=bluecat_operstates
,
11088 required_keys
=['warning', 'critical'],
11091 required_keys
=['oper_states'], # There is only one value, so its required
11097 bluecat_ha_operstates
= [
11103 (6, "becoming active"),
11104 (7, "becomming passive"),
11108 register_check_parameters(
11109 RulespecGroupCheckParametersNetworking
,
11111 _("Bluecat HA Settings"),
11116 title
=_("Operations States"),
11121 title
=_("States treated as warning"),
11122 choices
=bluecat_ha_operstates
,
11123 default_value
=[5, 6, 7],
11129 title
=_("States treated as critical"),
11130 choices
=bluecat_ha_operstates
,
11131 default_value
=[8, 4],
11135 required_keys
=['warning', 'critical'],
11138 required_keys
=['oper_states'], # There is only one value, so its required
11144 register_check_parameters(
11145 RulespecGroupCheckParametersNetworking
,
11146 "steelhead_connections",
11147 _("Steelhead connections"),
11152 title
=_("Levels for total amount of connections"),
11154 Integer(title
=_("Warning at")),
11155 Integer(title
=_("Critical at")),
11160 title
=_("Levels for optimized connections"),
11162 Integer(title
=_("Warning at")),
11163 Integer(title
=_("Critical at")),
11168 title
=_("Levels for passthrough connections"),
11170 Integer(title
=_("Warning at")),
11171 Integer(title
=_("Critical at")),
11176 title
=_("Levels for half opened connections"),
11178 Integer(title
=_("Warning at")),
11179 Integer(title
=_("Critical at")),
11184 title
=_("Levels for half closed connections"),
11186 Integer(title
=_("Warning at")),
11187 Integer(title
=_("Critical at")),
11192 title
=_("Levels for established connections"),
11194 Integer(title
=_("Warning at")),
11195 Integer(title
=_("Critical at")),
11200 title
=_("Levels for active connections"),
11202 Integer(title
=_("Warning at")),
11203 Integer(title
=_("Critical at")),
11211 register_check_parameters(
11212 RulespecGroupCheckParametersStorage
,
11214 _("FibreChannel Ports (FCMGMT MIB)"),
11215 Dictionary(elements
=[
11218 title
=_("Throughput levels"),
11219 help=_("Please note: in a few cases the automatic detection of the link speed "
11220 "does not work. In these cases you have to set the link speed manually "
11221 "below if you want to monitor percentage values"),
11224 title
=_("Used bandwidth of port relative to the link speed"),
11226 Percentage(title
=_("Warning at"), unit
=_("percent")),
11227 Percentage(title
=_("Critical at"), unit
=_("percent")),
11230 title
=_("Used Bandwidth of port in megabyte/s"),
11232 Integer(title
=_("Warning at"), unit
=_("MByte/s")),
11233 Integer(title
=_("Critical at"), unit
=_("MByte/s")),
11238 title
=_("Assumed link speed"),
11239 help=_("If the automatic detection of the link speed does "
11240 "not work you can set the link speed here."),
11241 unit
=_("Gbit/s"))),
11244 title
=_("CRC errors rate"),
11246 Percentage(title
=_("Warning at"), unit
=_("percent")),
11247 Percentage(title
=_("Critical at"), unit
=_("percent")),
11251 title
=_("Enc-Out frames rate"),
11253 Percentage(title
=_("Warning at"), unit
=_("percent")),
11254 Percentage(title
=_("Critical at"), unit
=_("percent")),
11258 title
=_("No-TxCredits errors"),
11260 Percentage(title
=_("Warning at"), unit
=_("percent")),
11261 Percentage(title
=_("Critical at"), unit
=_("percent")),
11265 title
=_("C3 discards"),
11267 Percentage(title
=_("Warning at"), unit
=_("percent")),
11268 Percentage(title
=_("Critical at"), unit
=_("percent")),
11272 title
=_("Averaging"),
11273 help=_("If this parameter is set, all throughputs will be averaged "
11274 "over the specified time interval before levels are being applied. Per "
11275 "default, averaging is turned off. "),
11283 # title = _("Allowed states (otherwise check will be critical)"),
11284 # choices = [ (1, _("unknown") ),
11285 # (2, _("failed") ),
11286 # (3, _("bypassed") ),
11287 # (4, _("active") ),
11288 # (5, _("loopback") ),
11289 # (6, _("txfault") ),
11290 # (7, _("nomedia") ),
11291 # (8, _("linkdown") ),
11294 # title = _("Physical state of port") ,
11296 # label = _("ignore physical state"),
11302 # title = _("Allowed states (otherwise check will be critical)"),
11303 # choices = [ (1, _("unknown") ),
11304 # (2, _("unused") ),
11305 # (3, _("ready") ),
11306 # (4, _("warning") ),
11307 # (5, _("failure") ),
11308 # (6, _("not participating") ),
11309 # (7, _("initializing") ),
11310 # (8, _("bypass") ),
11314 # title = _("Operational state") ,
11316 # label = _("ignore operational state"),
11322 # title = _("Allowed states (otherwise check will be critical)"),
11323 # choices = [ (1, _("unknown") ),
11324 # (2, _("online") ),
11325 # (3, _("offline") ),
11326 # (4, _("bypassed") ),
11327 # (5, _("diagnostics") ),
11330 # title = _("Administrative state") ,
11332 # label = _("ignore administrative state"),
11337 title
=_("port name"),
11338 help=_("The name of the FC port"),
11343 register_check_parameters(
11344 RulespecGroupCheckParametersEnvironment
, "plug_count", _("Number of active Plugs"),
11346 help=_("Levels for the number of active plugs in a device."),
11348 Integer(title
=_("critical if below or equal"), default_value
=30),
11349 Integer(title
=_("warning if below or equal"), default_value
=32),
11350 Integer(title
=_("warning if above or equal"), default_value
=38),
11351 Integer(title
=_("critical if above or equal"), default_value
=40),
11354 # Rules for configuring parameters of checks (services)
11355 register_check_parameters(
11356 RulespecGroupCheckParametersEnvironment
, "ucs_bladecenter_chassis_voltage",
11357 _("UCS Bladecenter Chassis Voltage Levels"),
11359 help=_("Here you can configure the 3.3V and 12V voltage levels for each chassis."),
11361 ("levels_3v_lower",
11363 title
=_("3.3 Volt Output Lower Levels"),
11365 Float(title
=_("warning if below or equal"), unit
="V", default_value
=3.25),
11366 Float(title
=_("critical if below or equal"), unit
="V", default_value
=3.20),
11368 ("levels_3v_upper",
11370 title
=_("3.3 Volt Output Upper Levels"),
11372 Float(title
=_("warning if above or equal"), unit
="V", default_value
=3.4),
11373 Float(title
=_("critical if above or equal"), unit
="V", default_value
=3.45),
11375 ("levels_12v_lower",
11377 title
=_("12 Volt Output Lower Levels"),
11379 Float(title
=_("warning if below or equal"), unit
="V", default_value
=11.9),
11380 Float(title
=_("critical if below or equal"), unit
="V", default_value
=11.8),
11382 ("levels_12v_upper",
11384 title
=_("12 Volt Output Upper Levels"),
11386 Float(title
=_("warning if above or equal"), unit
="V", default_value
=12.1),
11387 Float(title
=_("critical if above or equal"), unit
="V", default_value
=12.2),
11389 ]), TextAscii(title
=_("Chassis"), help=_("The identifier of the chassis.")), "dict")
11391 register_check_parameters(
11392 RulespecGroupCheckParametersEnvironment
, "hp_msa_psu_voltage",
11393 _("HP MSA Power Supply Voltage Levels"),
11395 help=_("Here you can configure the 3.3V and 12V voltage levels for each power supply."),
11397 ("levels_33v_lower",
11399 title
=_("3.3 Volt Output Lower Levels"),
11401 Float(title
=_("warning if below or equal"), unit
="V", default_value
=3.25),
11402 Float(title
=_("critical if below or equal"), unit
="V", default_value
=3.20),
11404 ("levels_33v_upper",
11406 title
=_("3.3 Volt Output Upper Levels"),
11408 Float(title
=_("warning if above or equal"), unit
="V", default_value
=3.4),
11409 Float(title
=_("critical if above or equal"), unit
="V", default_value
=3.45),
11411 ("levels_5v_lower",
11413 title
=_("5 Volt Output Lower Levels"),
11415 Float(title
=_("warning if below or equal"), unit
="V", default_value
=3.25),
11416 Float(title
=_("critical if below or equal"), unit
="V", default_value
=3.20),
11418 ("levels_5v_upper",
11420 title
=_("5 Volt Output Upper Levels"),
11422 Float(title
=_("warning if above or equal"), unit
="V", default_value
=3.4),
11423 Float(title
=_("critical if above or equal"), unit
="V", default_value
=3.45),
11425 ("levels_12v_lower",
11427 title
=_("12 Volt Output Lower Levels"),
11429 Float(title
=_("warning if below or equal"), unit
="V", default_value
=11.9),
11430 Float(title
=_("critical if below or equal"), unit
="V", default_value
=11.8),
11432 ("levels_12v_upper",
11434 title
=_("12 Volt Output Upper Levels"),
11436 Float(title
=_("warning if above or equal"), unit
="V", default_value
=12.1),
11437 Float(title
=_("critical if above or equal"), unit
="V", default_value
=12.2),
11439 ]), TextAscii(title
=_("Power Supply name"), help=_("The identifier of the power supply.")),
11442 register_check_parameters(
11443 RulespecGroupCheckParametersApplications
, "jvm_gc", _("JVM garbage collection levels"),
11445 help=_("This ruleset also covers Tomcat, Jolokia and JMX. "),
11449 title
=_("Collection time levels"),
11452 title
=_("Time of garbage collection in ms per minute"),
11454 Integer(title
=_("Warning at"), unit
=_("ms"), allow_empty
=False),
11455 Integer(title
=_("Critical at"), unit
=_("ms"), allow_empty
=False),
11458 ("CollectionCount",
11460 title
=_("Collection count levels"),
11463 title
=_("Count of garbage collection per minute"),
11465 Integer(title
=_("Warning at"), allow_empty
=False),
11466 Integer(title
=_("Critical at"), allow_empty
=False),
11471 title
=_("Name of the virtual machine and/or<br>garbage collection type"),
11472 help=_("The name of the application server"),
11476 register_check_parameters(
11477 RulespecGroupCheckParametersApplications
, "jvm_tp", _("JVM tomcat threadpool levels"),
11479 help=_("This ruleset also covers Tomcat, Jolokia and JMX. "),
11481 ("currentThreadCount",
11483 title
=_("Current thread count levels"),
11486 title
=_("Percentage levels of current thread count in threadpool"),
11488 Integer(title
=_("Warning at"), unit
=_(u
"%"), allow_empty
=False),
11489 Integer(title
=_("Critical at"), unit
=_(u
"%"), allow_empty
=False),
11492 ("currentThreadsBusy",
11494 title
=_("Current threads busy levels"),
11497 title
=_("Percentage of current threads busy in threadpool"),
11499 Integer(title
=_("Warning at"), unit
=_(u
"%"), allow_empty
=False),
11500 Integer(title
=_("Critical at"), unit
=_(u
"%"), allow_empty
=False),
11505 title
=_("Name of the virtual machine and/or<br>threadpool"),
11506 help=_("The name of the application server"),
11510 register_check_parameters(
11511 RulespecGroupCheckParametersApplications
, "docker_node_containers",
11512 _("Docker node container levels"),
11515 "Allows to define absolute levels for all, running, paused, and stopped containers."),
11519 title
=_("Containers upper levels"),
11521 Integer(title
=_("Warning at"), allow_empty
=False),
11522 Integer(title
=_("Critical at"), allow_empty
=False),
11526 title
=_("Containers lower levels"),
11528 Integer(title
=_("Warning at"), allow_empty
=False),
11529 Integer(title
=_("Critical at"), allow_empty
=False),
11531 ("running_upper_levels",
11533 title
=_("Running containers upper levels"),
11535 Integer(title
=_("Warning at"), allow_empty
=False),
11536 Integer(title
=_("Critical at"), allow_empty
=False),
11538 ("running_lower_levels",
11540 title
=_("Running containers lower levels"),
11542 Integer(title
=_("Warning at"), allow_empty
=False),
11543 Integer(title
=_("Critical at"), allow_empty
=False),
11545 ("paused_upper_levels",
11547 title
=_("Paused containers upper levels"),
11549 Integer(title
=_("Warning at"), allow_empty
=False),
11550 Integer(title
=_("Critical at"), allow_empty
=False),
11552 ("paused_lower_levels",
11554 title
=_("Paused containers lower levels"),
11556 Integer(title
=_("Warning at"), allow_empty
=False),
11557 Integer(title
=_("Critical at"), allow_empty
=False),
11559 ("stopped_upper_levels",
11561 title
=_("Stopped containers upper levels"),
11563 Integer(title
=_("Warning at"), allow_empty
=False),
11564 Integer(title
=_("Critical at"), allow_empty
=False),
11566 ("stopped_lower_levels",
11568 title
=_("Stopped containers lower levels"),
11570 Integer(title
=_("Warning at"), allow_empty
=False),
11571 Integer(title
=_("Critical at"), allow_empty
=False),
11575 register_check_parameters(
11576 RulespecGroupCheckParametersApplications
, "docker_node_disk_usage", _("Docker node disk usage"),
11579 _("Allows to define levels for the counts and size of Docker Containers, Images, Local Volumes, and the Build Cache."
11586 Filesize(title
=_("Warning at"), allow_empty
=False),
11587 Filesize(title
=_("Critical at"), allow_empty
=False),
11591 title
=_("Reclaimable"),
11593 Filesize(title
=_("Warning at"), allow_empty
=False),
11594 Filesize(title
=_("Critical at"), allow_empty
=False),
11598 title
=_("Total count"),
11600 Integer(title
=_("Warning at"), allow_empty
=False),
11601 Integer(title
=_("Critical at"), allow_empty
=False),
11607 Integer(title
=_("Warning at"), allow_empty
=False),
11608 Integer(title
=_("Critical at"), allow_empty
=False),
11613 help=_("Either Containers, Images, Local Volumes or Build Cache"),
11617 register_check_parameters(
11618 RulespecGroupCheckParametersStorage
,
11620 _("Heartbeat CRM general status"),
11623 title
=_("Maximum age"),
11624 help=_("Maximum accepted age of the reported data in seconds"),
11629 TextAscii(allow_empty
=False),
11630 title
=_("Expected DC"),
11631 help=_("The hostname of the expected distinguished controller of the cluster"),
11634 Integer(min_value
=2, default_value
=2),
11635 title
=_("Number of Nodes"),
11636 help=_("The expected number of nodes in the cluster"),
11639 Integer(min_value
=0,),
11640 title
=_("Number of Resources"),
11641 help=_("The expected number of resources in the cluster"),
11645 match_type
="first",
11648 register_check_parameters(
11649 RulespecGroupCheckParametersStorage
, "heartbeat_crm_resources",
11650 _("Heartbeat CRM resource status"),
11652 TextAscii(allow_empty
=False),
11653 title
=_("Expected node"),
11654 help=_("The hostname of the expected node to hold this resource."),
11655 none_label
=_("Do not enforce the resource to be hold by a specific node."),
11658 title
=_("Resource Name"),
11659 help=_("The name of the cluster resource as shown in the service description."),
11663 register_check_parameters(
11664 RulespecGroupCheckParametersApplications
,
11666 _("Lotus Domino Tasks"),
11672 title
=_("Name of the task"),
11676 title
=_("Exact name of the task"),
11682 mode
=RegExp
.prefix
,
11684 title
=_("Regular expression matching tasks"),
11685 help=_("This regex must match the <i>beginning</i> of the complete "
11686 "command line of the task including arguments"),
11687 forth
=lambda x
: x
[1:], # remove ~
11688 back
=lambda x
: "~" + x
, # prefix ~
11693 title
=_("Match all tasks"),
11696 match
=lambda x
: (not x
and 2) or (x
[0] == '~' and 1 or 0))),
11699 title
=_("Minimum number of matched tasks for WARNING state"),
11704 title
=_("Minimum number of matched tasks for OK state"),
11709 title
=_("Maximum number of matched tasks for OK state"),
11710 default_value
=99999,
11714 title
=_("Maximum number of matched tasks for WARNING state"),
11715 default_value
=99999,
11718 required_keys
=['warnmin', 'okmin', 'okmax', 'warnmax', 'process'],
11721 title
=_("Name of service"),
11722 help=_("This name will be used in the description of the service"),
11724 regex
="^[a-zA-Z_0-9 _.-]*$",
11725 regex_error
=_("Please use only a-z, A-Z, 0-9, space, underscore, "
11726 "dot and hyphen for your service description"),
11729 has_inventory
=False)
11731 register_check_parameters(
11732 RulespecGroupCheckParametersApplications
,
11733 "domino_mailqueues",
11734 _("Lotus Domino Mail Queues"),
11739 title
=_("Number of Mails in Queue"),
11741 Integer(title
=_("warning at"), default_value
=300),
11742 Integer(title
=_("critical at"), default_value
=350),
11745 required_keys
=['queue_length'],
11749 ('lnDeadMail', _('Mails in Dead Queue')),
11750 ('lnWaitingMail', _('Mails in Waiting Queue')),
11751 ('lnMailHold', _('Mails in Hold Queue')),
11752 ('lnMailTotalPending', _('Total Pending Mails')),
11753 ('InMailWaitingforDNS', _('Mails Waiting for DNS Queue')),
11755 title
=_("Domino Mail Queue Names"),
11760 register_check_parameters(
11761 RulespecGroupCheckParametersApplications
,
11763 _("Lotus Domino Users"),
11765 title
=_("Number of Lotus Domino Users"),
11767 Integer(title
=_("warning at"), default_value
=1000),
11768 Integer(title
=_("critical at"), default_value
=1500),
11771 match_type
="first",
11774 register_check_parameters(
11775 RulespecGroupCheckParametersApplications
,
11776 "domino_transactions",
11777 _("Lotus Domino Transactions"),
11779 title
=_("Number of Transactions per Minute on a Lotus Domino Server"),
11781 Integer(title
=_("warning at"), default_value
=30000),
11782 Integer(title
=_("critical at"), default_value
=35000),
11785 match_type
="first",
11788 register_check_parameters(
11789 RulespecGroupCheckParametersApplications
, "netscaler_dnsrates",
11790 _("Citrix Netscaler DNS counter rates"),
11792 help=_("Counter rates of DNS parameters for Citrix Netscaler Loadbalancer "
11798 title
=_("Upper Levels for Total Number of DNS queries"),
11800 Float(title
=_("Warning at"), default_value
=1500.0, unit
="/sec"),
11801 Float(title
=_("Critical at"), default_value
=2000.0, unit
="/sec")
11808 title
=_("Upper Levels for Total Number of DNS replies"),
11810 Float(title
=_("Warning at"), default_value
=1500.0, unit
="/sec"),
11811 Float(title
=_("Critical at"), default_value
=2000.0, unit
="/sec")
11817 register_check_parameters(
11818 RulespecGroupCheckParametersApplications
, "netscaler_tcp_conns",
11819 _("Citrix Netscaler Loadbalancer TCP Connections"),
11820 Dictionary(elements
=[
11824 title
=_("Max. number of client connections"),
11827 title
=_("Warning at"),
11828 default_value
=25000,
11831 title
=_("Critical at"),
11832 default_value
=30000,
11839 title
=_("Max. number of server connections"),
11842 title
=_("Warning at"),
11843 default_value
=25000,
11846 title
=_("Critical at"),
11847 default_value
=30000,
11853 register_check_parameters(
11854 RulespecGroupCheckParametersApplications
,
11855 "netscaler_sslcerts",
11856 _("Citrix Netscaler SSL certificates"),
11862 title
=_("Remaining days of validity"),
11864 Integer(title
=_("Warning below"), default_value
=30, min_value
=0),
11865 Integer(title
=_("Critical below"), default_value
=10, min_value
=0),
11870 TextAscii(title
=_("Name of Certificate"),),
11873 register_check_parameters(
11874 RulespecGroupCheckParametersEnvironment
,
11875 "siemens_plc_flag",
11876 _("State of Siemens PLC Flags"),
11878 help=_("This rule sets the expected state, the one which should result in an OK state, "
11879 "of the monitored flags of Siemens PLC devices."),
11880 title
=_("Expected flag state"),
11882 (True, _("Expect the flag to be: On")),
11883 (False, _("Expect the flag to be: Off")),
11885 default_value
=True),
11887 title
=_("Device Name and Value Ident"),
11888 help=_("You need to concatenate the device name which is configured in the special agent "
11889 "for the PLC device separated by a space with the ident of the value which is also "
11890 "configured in the special agent."),
11892 match_type
="first",
11895 register_check_parameters(
11896 RulespecGroupCheckParametersEnvironment
,
11897 "siemens_plc_duration",
11898 _("Siemens PLC Duration"),
11903 title
=_("Duration"),
11905 Age(title
=_("Warning at"),),
11906 Age(title
=_("Critical at"),),
11909 help=_("This rule is used to configure thresholds for duration values read from "
11910 "Siemens PLC devices."),
11911 title
=_("Duration levels"),
11914 title
=_("Device Name and Value Ident"),
11915 help=_("You need to concatenate the device name which is configured in the special agent "
11916 "for the PLC device separated by a space with the ident of the value which is also "
11917 "configured in the special agent."),
11922 register_check_parameters(
11923 RulespecGroupCheckParametersEnvironment
,
11924 "siemens_plc_counter",
11925 _("Siemens PLC Counter"),
11930 title
=_("Counter level"),
11932 Integer(title
=_("Warning at"),),
11933 Integer(title
=_("Critical at"),),
11936 help=_("This rule is used to configure thresholds for counter values read from "
11937 "Siemens PLC devices."),
11938 title
=_("Counter levels"),
11941 title
=_("Device Name and Value Ident"),
11942 help=_("You need to concatenate the device name which is configured in the special agent "
11943 "for the PLC device separated by a space with the ident of the value which is also "
11944 "configured in the special agent."),
11949 register_check_parameters(
11950 RulespecGroupCheckParametersStorage
, "bossock_fibers", _("Number of Running Bossock Fibers"),
11952 title
=_("Number of fibers"),
11954 Integer(title
=_("Warning at"), unit
=_("fibers")),
11955 Integer(title
=_("Critical at"), unit
=_("fibers")),
11956 ]), TextAscii(title
=_("Node ID")), "first")
11958 register_check_parameters(
11959 RulespecGroupCheckParametersEnvironment
, "carbon_monoxide", ("Carbon monoxide"),
11960 Dictionary(elements
=[
11963 title
="Levels in parts per million",
11965 Integer(title
=_("Warning at"), unit
=_("ppm"), default
=10),
11966 Integer(title
=_("Critical at"), unit
=_("ppm"), default
=25),