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 from cmk
.gui
.plugins
.wato
import (
62 RulespecGroupCheckParametersApplications
,
63 RulespecGroupCheckParametersDiscovery
,
64 RulespecGroupCheckParametersEnvironment
,
65 RulespecGroupCheckParametersHardware
,
66 RulespecGroupCheckParametersNetworking
,
67 RulespecGroupCheckParametersOperatingSystem
,
68 RulespecGroupCheckParametersStorage
,
69 RulespecGroupCheckParametersVirtualization
,
71 register_check_parameters
,
75 from cmk
.gui
.plugins
.wato
.check_parameters
.ps
import process_level_elements
76 from cmk
.gui
.plugins
.wato
.check_parameters
.utils
import (
77 match_dual_level_type
,
78 get_free_used_dynamic_valuespec
,
79 transform_filesystem_free
,
83 # TODO: Sort all rules and check parameters into the figlet header sections.
84 # Beware: there are dependencies, so sometimes the order matters. All rules
85 # that are not yet handles are in the last section: in "Unsorted". Move rules
86 # from there into their appropriate sections until "Unsorted" is empty.
87 # Create new rules directly in the correct secions.
89 # .--Networking----------------------------------------------------------.
91 # | | \ | | ___| |___ _____ _ __| | _(_)_ __ __ _ |
92 # | | \| |/ _ \ __\ \ /\ / / _ \| '__| |/ / | '_ \ / _` | |
93 # | | |\ | __/ |_ \ V V / (_) | | | <| | | | | (_| | |
94 # | |_| \_|\___|\__| \_/\_/ \___/|_| |_|\_\_|_| |_|\__, | |
96 # '----------------------------------------------------------------------'
99 RulespecGroupCheckParametersNetworking
,
102 title
=_("PING and host check parameters"),
103 help=_("This rule sets the parameters for the host checks (via <tt>check_icmp</tt>) "
104 "and also for PING checks on ping-only-hosts. For the host checks only the "
105 "critical state is relevant, the warning levels are ignored."),
106 elements
=check_icmp_params
,
111 # .--Inventory-----------------------------------------------------------.
113 # | |_ _|_ ____ _____ _ __ | |_ ___ _ __ _ _ |
114 # | | || '_ \ \ / / _ \ '_ \| __/ _ \| '__| | | | |
115 # | | || | | \ V / __/ | | | || (_) | | | |_| | |
116 # | |___|_| |_|\_/ \___|_| |_|\__\___/|_| \__, | |
118 # '----------------------------------------------------------------------'
121 def transform_ipmi_inventory_rules(p
):
122 if not isinstance(p
, dict):
124 if p
.get("summarize", True):
126 if p
.get('ignored_sensors', []):
127 return ('single', {'ignored_sensors': p
["ignored_sensors"]})
128 return ('single', {})
132 RulespecGroupCheckParametersDiscovery
,
133 varname
="inventory_ipmi_rules",
134 title
=_("Discovery of IPMI sensors"),
137 orientation
="vertical",
139 [("summarize", _("Summary")),
140 ("single", _("Single"),
146 title
=_("Ignore the following IPMI sensors"),
147 help=_("Names of IPMI sensors that should be ignored during inventory "
148 "and when summarizing."
149 "The pattern specified here must match exactly the beginning of "
150 "the actual sensor name (case sensitive)."),
151 orientation
="horizontal")),
152 ("ignored_sensorstates",
154 title
=_("Ignore the following IPMI sensor states"),
156 "IPMI sensors with these states that should be ignored during inventory "
157 "and when summarizing."
158 "The pattern specified here must match exactly the beginning of "
159 "the actual sensor name (case sensitive)."),
160 orientation
="horizontal",
163 forth
=transform_ipmi_inventory_rules
),
167 RulespecGroupCheckParametersDiscovery
,
168 varname
="ewon_discovery_rules",
169 title
=_("eWON Discovery"),
170 help=_("The ewon vpn routers can rely data from a secondary device via snmp. "
171 "It doesn't however allow discovery of the device type relayed this way. "
172 "To allow interpretation of the data you need to pick the device manually."),
173 valuespec
=DropdownChoice(
174 title
=_("Device Type"),
175 label
=_("Select device type"),
177 (None, _("None selected")),
178 ("oxyreduct", _("Wagner OxyReduct")),
185 RulespecGroupCheckParametersDiscovery
,
186 varname
="mssql_transactionlogs_discovery",
187 title
=_("MSSQL Datafile and Transactionlog Discovery"),
188 valuespec
=Dictionary(
190 ("summarize_datafiles",
192 title
=_("Display only a summary of all Datafiles"),
193 label
=_("Summarize Datafiles"),
195 ("summarize_transactionlogs",
197 title
=_("Display only a summary of all Transactionlogs"),
198 label
=_("Summarize Transactionlogs"),
205 RulespecGroupCheckParametersDiscovery
,
206 varname
="inventory_services_rules",
207 title
=_("Windows Service Discovery"),
208 valuespec
=Dictionary(
212 title
=_("Services (Regular Expressions)"),
213 help=_('Regular expressions matching the begining of the internal name '
214 'or the description of the service. '
215 'If no name is given then this rule will match all services. The '
216 'match is done on the <i>beginning</i> of the service name. It '
217 'is done <i>case sensitive</i>. You can do a case insensitive match '
218 'by prefixing the regular expression with <tt>(?i)</tt>. Example: '
219 '<tt>(?i).*mssql</tt> matches all services which contain <tt>MSSQL</tt> '
220 'or <tt>MsSQL</tt> or <tt>mssql</tt> or...'),
221 orientation
="horizontal",
226 ('running', _('Running')),
227 ('stopped', _('Stopped')),
229 title
=_("Create check if service is in state"),
234 ('auto', _('Automatic')),
235 ('demand', _('Manual')),
236 ('disabled', _('Disabled')),
238 title
=_("Create check if service is in start mode"),
242 'This rule can be used to configure the inventory of the windows services check. '
243 'You can configure specific windows services to be monitored by the windows check by '
244 'selecting them by name, current state during the inventory, or start mode.'),
250 RulespecGroupCheckParametersDiscovery
,
251 varname
="inventory_solaris_services_rules",
252 title
=_("Solaris Service Discovery"),
253 valuespec
=Dictionary(
255 ('descriptions', ListOfStrings(title
=_("Descriptions"))),
256 ('categories', ListOfStrings(title
=_("Categories"))),
257 ('names', ListOfStrings(title
=_("Names"))),
258 ('instances', ListOfStrings(title
=_("Instances"))),
263 ("online", _("online")),
264 ("disabled", _("disabled")),
265 ("maintenance", _("maintenance")),
266 ("legacy_run", _("legacy run")),
272 title
=_("Service name"),
275 FixedValue("full_descr", title
=_("Full Description"), totext
=""),
277 "descr_without_prefix",
278 title
=_("Description without type prefix"),
284 'This rule can be used to configure the discovery of the Solaris services check. '
285 'You can configure specific Solaris services to be monitored by the Solaris check by '
286 'selecting them by description, category, name, or current state during the discovery.'
293 RulespecGroupCheckParametersDiscovery
,
294 varname
="discovery_systemd_units_services_rules",
295 title
=_("Systemd Service Discovery"),
296 valuespec
=Dictionary(
298 ('descriptions', ListOfStrings(title
=_("Descriptions"))),
299 ('names', ListOfStrings(title
=_("Service unit names"))),
304 ("active", "active"),
305 ("inactive", "inactive"),
306 ("failed", "failed"),
311 help=_('This rule can be used to configure the discovery of the Linux services check. '
312 'You can configure specific Linux services to be monitored by the Linux check by '
313 'selecting them by description, unit name, or current state during the discovery.'),
319 RulespecGroupCheckParametersDiscovery
,
320 varname
="discovery_win_dhcp_pools",
321 title
=_("Discovery of Windows DHCP Pools"),
322 valuespec
=Dictionary(elements
=[
325 title
=_("Discovery of empty DHCP pools"),
326 label
=_("Include empty pools into the monitoring"),
327 help=_("You can activate the creation of services for "
328 "DHCP pools, which contain no IP addresses."),
335 RulespecGroupCheckParametersDiscovery
,
336 varname
="inventory_if_rules",
337 title
=_("Network Interface and Switch Port Discovery"),
338 valuespec
=Dictionary(
343 (True, _('Use description')),
344 (False, _('Do not use description')),
346 title
=_("Description as service name for network interface checks"),
348 "This option lets Check_MK use the interface description as item instead "
349 "of the port number. If no description is available then the port number is "
354 (True, _('Use alias')),
355 (False, _('Do not use alias')),
357 title
=_("Alias as service name for network interface checks"),
359 "This option lets Check_MK use the alias of the port (ifAlias) as item instead "
360 "of the port number. If no alias is available then the port number is used "
365 (True, _('Pad port numbers with zeros')),
366 (False, _('Do not pad')),
368 title
=_("Port numbers"),
369 help=_("If this option is activated then Check_MK will pad port numbers of "
370 "network interfaces with zeroes so that all port descriptions from "
371 "all ports of a host or switch have the same length and thus sort "
372 "currectly in the GUI. In versions prior to 1.1.13i3 there was no "
373 "padding. You can switch back to the old behaviour by disabling this "
374 "option. This will retain the old service descriptions and the old "
375 "performance data."),
379 title
=_("Match interface alias (regex)"),
380 help=_("Only discover interfaces whose alias matches one of the configured "
381 "regular expressions. The match is done on the beginning of the alias. "
382 "This allows you to select interfaces based on the alias without having "
383 "the alias be part of the service description."),
384 orientation
="horizontal",
392 title
=_("Match interface description (regex)"),
394 "Only discover interfaces whose the description matches one of the configured "
395 "regular expressions. The match is done on the beginning of the description. "
396 "This allows you to select interfaces based on the description without having "
397 "the alias be part of the service description."),
398 orientation
="horizontal",
406 title
=_("Network interface port states to discover"),
408 _("When doing discovery on switches or other devices with network interfaces "
409 "then only ports found in one of the configured port states will be added to the monitoring. "
410 "Note: the state <i>admin down</i> is in fact not an <tt>ifOperStatus</tt> but represents the "
411 "<tt>ifAdminStatus</tt> of <tt>down</tt> - a port administratively switched off. If you check this option "
412 "then an alternate version of the check is being used that fetches the <tt>ifAdminState</tt> in addition. "
413 "This will add about 5% of additional SNMP traffic."),
414 choices
=defines
.interface_oper_states(),
420 title
=_("Network interface port types to discover"),
421 help=_("When doing discovery on switches or other devices with network interfaces "
422 "then only ports of the specified types will be created services for."),
423 choices
=defines
.interface_port_types(),
428 '6', '32', '62', '117', '127', '128', '129', '180', '181', '182', '205', '229'
435 _("Create extra service with RMON statistics data (if available for the device)"
437 (False, _('Do not create extra services')),
439 title
=_("Collect RMON statistics data"),
441 _("If you enable this option, for every RMON capable switch port an additional service will "
442 "be created which is always OK and collects RMON data. This will give you detailed information "
443 "about the distribution of packet sizes transferred over the port. Note: currently "
444 "this extra RMON check does not honor the inventory settings for switch ports. In a future "
445 "version of Check_MK RMON data may be added to the normal interface service and not add "
446 "an additional service."),
449 help=_('This rule can be used to control the inventory for network ports. '
450 'You can configure the port types and port states for inventory'
451 'and the use of alias or description as service name.'),
456 _brocade_fcport_adm_choices
= [
463 _brocade_fcport_op_choices
= [
471 _brocade_fcport_phy_choices
= [
473 (2, 'noTransceiver(2)'),
474 (3, 'laserFault(3)'),
481 (10, 'validating(10)'),
482 (11, 'invalidModule(11)'),
483 (14, 'noSigDet(14)'),
484 (255, 'unkown(255)'),
488 RulespecGroupCheckParametersDiscovery
,
489 varname
="brocade_fcport_inventory",
490 title
=_("Brocade Port Discovery"),
491 valuespec
=Dictionary(
495 title
=_("Use port name as service name"),
496 label
=_("use port name"),
498 help=_("This option lets Check_MK use the port name as item instead of the "
499 "port number. If no description is available then the port number is "
503 title
=_("add \"ISL\" to service description for interswitch links"),
506 help=_("This option lets Check_MK add the string \"ISL\" to the service "
507 "description for interswitch links."))),
510 title
=_("Administrative port states to discover"),
512 "When doing service discovery on brocade switches only ports with the given administrative "
513 "states will be added to the monitoring system."),
514 choices
=_brocade_fcport_adm_choices
,
517 default_value
=['1', '3', '4'],
521 title
=_("Physical port states to discover"),
523 "When doing service discovery on brocade switches only ports with the given physical "
524 "states will be added to the monitoring system."),
525 choices
=_brocade_fcport_phy_choices
,
528 default_value
=[3, 4, 5, 6, 7, 8, 9, 10])),
531 title
=_("Operational port states to discover"),
533 "When doing service discovery on brocade switches only ports with the given operational "
534 "states will be added to the monitoring system."),
535 choices
=_brocade_fcport_op_choices
,
538 default_value
=[1, 2, 3, 4])),
540 help=_('This rule can be used to control the service discovery for brocade ports. '
541 'You can configure the port states for inventory '
542 'and the use of the description as service name.'),
548 # In version 1.2.4 the check parameters for the resulting ps check
549 # where defined in the dicovery rule. We moved that to an own rule
550 # in the classical check parameter style. In order to support old
551 # configuration we allow reading old discovery rules and ship these
552 # settings in an optional sub-dictionary.
553 def convert_inventory_processes(old_dict
):
554 new_dict
= {"default_params": {}}
555 for key
, value
in old_dict
.items():
564 new_dict
["default_params"][key
] = value
565 elif key
!= "perfdata":
566 new_dict
[key
] = value
568 # New cpu rescaling load rule
569 if old_dict
.get('cpu_rescale_max') is None:
570 new_dict
['cpu_rescale_max'] = True
575 def forbid_re_delimiters_inside_groups(pattern
, varprefix
):
576 # Used as input validation in PS check wato config
577 group_re
= r
'\(.*?\)'
578 for match
in re
.findall(group_re
, pattern
):
579 for char
in ['\\b', '$', '^']:
583 _('"%s" is not allowed inside the regular expression group %s. '
584 'Bounding characters inside groups will vanish after discovery, '
585 'because processes are instanced for every matching group. '
586 'Thus enforce delimiters outside the group.') % (char
, match
))
590 RulespecGroupCheckParametersDiscovery
,
591 varname
="inventory_processes_rules",
592 title
=_('Process Discovery'),
594 "This ruleset defines criteria for automatically creating checks for running processes "
595 "based upon what is running when the service discovery is done. These services will be "
596 "created with default parameters. They will get critical when no process is running and "
597 "OK otherwise. You can parameterize the check with the ruleset <i>State and count of processes</i>."
604 title
=_('Process Name'),
608 _('<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 '
609 'expression and be prefixed with ~. For each <tt>%s</tt> in the description, the expression has to contain one "group". A group '
610 '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 '
611 'matching the pattern, it will substitute all such groups with the actual values when creating the check. That way one '
612 'rule can create several checks on a host.</p>'
613 '<p>If the pattern contains more groups then occurrances of <tt>%s</tt> in the service description then only the first matching '
614 'subexpressions are used for the service descriptions. The matched substrings corresponding to the remaining groups '
615 'are copied into the regular expression, nevertheless.</p>'
616 '<p>As an alternative to <tt>%s</tt> you may also use <tt>%1</tt>, <tt>%2</tt>, etc. '
617 'These will be replaced by the first, second, ... matching group. This allows you to reorder things.</p>'
623 title
=_("Process Matching"),
627 title
=_("Exact name of the process without argments"),
628 label
=_("Executable:"),
635 validate
=forbid_re_delimiters_inside_groups
,
637 title
=_("Regular expression matching command line"),
638 label
=_("Command line:"),
640 _("This regex must match the <i>beginning</i> of the complete "
641 "command line of the process including arguments.<br>"
642 "When using groups, matches will be instantiated "
643 "during process discovery. e.g. (py.*) will match python, python_dev "
644 "and python_test and discover 3 services. At check time, because "
645 "python is a substring of python_test and python_dev it will aggregate"
646 "all process that start with python. If that is not the intended behavior "
647 "please use a delimiter like '$' or '\\b' around the group, e.g. (py.*)$"
649 forth
=lambda x
: x
[1:], # remove ~
650 back
=lambda x
: "~" + x
, # prefix ~
655 title
=_("Match all processes"),
658 match
=lambda x
: (not x
and 2) or (x
[0] == '~' and 1 or 0),
659 default_value
='/usr/sbin/foo')),
662 title
=_('Name of the User'),
668 title
=_("Match all users"),
671 title
=_('Exact name of the user'),
676 title
=_('Grab user from found processess'),
681 _('<p>The user specification can either be a user name (string). The inventory will then trigger only if that user matches '
682 'the user the process is running as and the resulting check will require that user. Alternatively you can specify '
683 '"grab user". If user is not selected the created check will not check for a specific user.</p>'
684 '<p>Specifying "grab user" makes the created check expect the process to run as the same user as during inventory: the user '
685 'name will be hardcoded into the check. In that case if you put %u into the service description, that will be replaced '
686 'by the actual user name during inventory. You need that if your rule might match for more than one user - your would '
687 'create duplicate services with the same description otherwise.</p><p>Windows users are specified by the namespace followed by '
688 'the actual user name. For example "\\\\NT AUTHORITY\\NETWORK SERVICE" or "\\\\CHKMKTEST\\Administrator".</p>'
693 title
=_("Add custom icon or action"),
695 "You can assign icons or actions to the found services in the status GUI."
700 title
=_("CPU rescale maximum load"),
701 help=_("CPU utilization is delivered by the Operating "
702 "System as a per CPU core basis. Thus each core contributes "
703 "with a 100% at full utilization, producing a maximum load "
704 "of N*100% (N=number of cores). For simplicity this maximum "
705 "can be rescaled down, making 100% the maximum and thinking "
706 "in terms of total CPU utilization."),
708 orientation
="vertical",
710 (True, _("100% is all cores at full load")),
712 _("<b>N</b> * 100% as each core contributes with 100% at full load")),
716 title
=_("Default parameters for detected services"),
718 _("Here you can select default parameters that are being set "
719 "for detected services. Note: the preferred way for setting parameters is to use "
720 "the rule set <a href='wato.py?varname=checkgroup_parameters%3Apsmode=edit_ruleset'> "
721 "State and Count of Processes</a> instead. "
722 "A change there will immediately be active, while a change in this rule "
723 "requires a re-discovery of the services."),
724 elements
=process_level_elements
,
727 required_keys
=["descr", "cpu_rescale_max"],
729 forth
=convert_inventory_processes
,
735 RulespecGroupCheckParametersDiscovery
,
736 varname
="inv_domino_tasks_rules",
737 title
=_('Lotus Domino Task Discovery'),
738 help=_("This rule controls the discovery of tasks on Lotus Domino systems. "
739 "Any changes later on require a host re-discovery"),
740 valuespec
=Dictionary(
744 title
=_('Service Description'),
747 _('<p>The service description may contain one or more occurances of <tt>%s</tt>. In this '
748 'case, the pattern must be a regular expression prefixed with ~. For each '
749 '<tt>%s</tt> in the description, the expression has to contain one "group". A group '
750 'is a subexpression enclosed in brackets, for example <tt>(.*)</tt> or '
751 '<tt>([a-zA-Z]+)</tt> or <tt>(...)</tt>. When the inventory finds a task '
752 'matching the pattern, it will substitute all such groups with the actual values when '
753 'creating the check. In this way one rule can create several checks on a host.</p>'
754 '<p>If the pattern contains more groups than occurrences of <tt>%s</tt> in the service '
755 'description, only the first matching subexpressions are used for the service '
756 'descriptions. The matched substrings corresponding to the remaining groups '
757 'are nevertheless copied into the regular expression.</p>'
758 '<p>As an alternative to <tt>%s</tt> you may also use <tt>%1</tt>, <tt>%2</tt>, etc. '
759 'These expressions will be replaced by the first, second, ... matching group, allowing '
760 'you to reorder things.</p>'),
765 title
=_("Task Matching"),
768 title
=_("Exact name of the task"),
776 title
=_("Regular expression matching command line"),
777 help=_("This regex must match the <i>beginning</i> of the task"),
778 forth
=lambda x
: x
[1:], # remove ~
779 back
=lambda x
: "~" + x
, # prefix ~
784 title
=_("Match all tasks"),
787 match
=lambda x
: (not x
and 2) or (x
[0] == '~' and 1 or 0),
788 default_value
='foo')),
793 _("Please note that if you specify and also if you modify levels here, the change is "
794 "activated only during an inventory. Saving this rule is not enough. This is due to "
795 "the nature of inventory rules."),
798 title
=_("Critical below"),
803 title
=_("Warning below"),
808 title
=_("Warning above"),
813 title
=_("Critical above"),
820 required_keys
=['match', 'levels', 'descr'],
826 RulespecGroupCheckParametersDiscovery
,
827 varname
="inventory_sap_values",
828 title
=_('SAP R/3 Single Value Inventory'),
829 valuespec
=Dictionary(
834 title
=_("Node Path Matching"),
837 title
=_("Exact path of the node"),
845 title
=_("Regular expression matching the path"),
846 help=_("This regex must match the <i>beginning</i> of the complete "
847 "path of the node as reported by the agent"),
848 forth
=lambda x
: x
[1:], # remove ~
849 back
=lambda x
: "~" + x
, # prefix ~
854 title
=_("Match all nodes"),
857 match
=lambda x
: (not x
and 2) or (x
[0] == '~' and 1 or 0),
859 'SAP CCMS Monitor Templates/Dialog Overview/Dialog Response Time/ResponseTime')
861 ('limit_item_levels',
863 title
=_("Limit Path Levels for Service Names"),
864 unit
=_('path levels'),
867 _("The service descriptions of the inventorized services are named like the paths "
868 "in SAP. You can use this option to let the inventory function only use the last "
869 "x path levels for naming."),
872 optional_keys
=['limit_item_levels'],
878 RulespecGroupCheckParametersDiscovery
,
879 varname
="sap_value_groups",
880 title
=_('SAP Value Grouping Patterns'),
881 help=_('The check <tt>sap.value</tt> normally creates one service for each SAP value. '
882 'By defining grouping patterns, you can switch to the check <tt>sap.value-groups</tt>. '
883 'That check monitors a list of SAP values at once.'),
886 help=_("This defines one value grouping pattern"),
888 orientation
="horizontal",
890 TextAscii(title
=_("Name of group"),),
893 orientation
="vertical",
896 title
=_("Include Pattern"),
900 title
=_("Exclude Pattern"),
907 add_label
=_("Add pattern group"),
913 RulespecGroupCheckParametersDiscovery
,
914 varname
="inventory_heartbeat_crm_rules",
915 title
=_("Heartbeat CRM Discovery"),
916 valuespec
=Dictionary(
920 title
=_("Naildown the DC"),
921 label
=_("Mark the currently distinguished controller as preferred one"),
923 "Nails down the DC to the node which is the DC during discovery. The check "
924 "will report CRITICAL when another node becomes the DC during later checks."))
926 ("naildown_resources",
928 title
=_("Naildown the resources"),
929 label
=_("Mark the nodes of the resources as preferred one"),
931 "Nails down the resources to the node which is holding them during discovery. "
932 "The check will report CRITICAL when another holds the resource during later checks."
935 help=_('This rule can be used to control the discovery for Heartbeat CRM checks.'),
942 RulespecGroupCheckParametersDiscovery
,
943 varname
="inventory_df_rules",
944 title
=_("Discovery parameters for filesystem checks"),
945 valuespec
=Dictionary(
947 ("include_volume_name", Checkbox(title
=_("Include Volume name in item"))),
950 title
=_("Filesystem types to ignore"),
956 ("iso9660", "iso9660"),
958 default_value
=["tmpfs", "nfs", "smbfs", "cifs", "iso9660"])),
959 ("never_ignore_mountpoints",
962 title
=_(u
"Mountpoints to never ignore"),
964 u
"Regardless of filesystem type, these mountpoints will always be discovered."
965 u
"Globbing or regular expressions are currently not supported."),
972 RulespecGroupCheckParametersDiscovery
,
973 varname
="inventory_mssql_counters_rules",
974 title
=_("Include MSSQL Counters services"),
975 valuespec
=Dictionary(
977 ("add_zero_based_services", Checkbox(title
=_("Include service with zero base."))),
984 RulespecGroupCheckParametersDiscovery
,
985 varname
="inventory_fujitsu_ca_ports",
986 title
=_("Discovery of Fujtsu storage CA ports"),
987 valuespec
=Dictionary(
989 ("indices", ListOfStrings(title
=_("CA port indices"))),
992 title
=_("CA port modes"),
997 ("Initiator", _("Initiator")),
1007 RulespecGroupCheckParametersDiscovery
,
1008 varname
="discovery_mssql_backup",
1009 title
=_("Discovery of MSSQL backup"),
1010 valuespec
=Dictionary(
1014 title
=_("Backup modes"),
1016 ("summary", _("Create a service for each instance")),
1017 ("per_type", _("Create a service for each instance and backup type")),
1024 # .--Applications--------------------------------------------------------.
1026 # | / \ _ __ _ __ | (_) ___ __ _| |_(_) ___ _ __ ___ |
1027 # | / _ \ | '_ \| '_ \| | |/ __/ _` | __| |/ _ \| '_ \/ __| |
1028 # | / ___ \| |_) | |_) | | | (_| (_| | |_| | (_) | | | \__ \ |
1029 # | /_/ \_\ .__/| .__/|_|_|\___\__,_|\__|_|\___/|_| |_|___/ |
1031 # '----------------------------------------------------------------------'
1034 RulespecGroupCheckParametersApplications
,
1035 varname
="logwatch_rules",
1036 title
=_('Logwatch Patterns'),
1037 valuespec
=Transform(
1040 ("reclassify_patterns",
1043 help=_("This defines one logfile pattern rule"),
1045 orientation
="horizontal",
1050 ('C', _('CRITICAL')),
1051 ('W', _('WARNING')),
1057 title
=_("Pattern (Regex)"),
1066 title
=_("Reclassify state matching regex pattern"),
1068 _('<p>You can define one or several patterns (regular expressions) in each logfile pattern rule. '
1069 'These patterns are applied to the selected logfiles to reclassify the '
1070 'matching log messages. The first pattern which matches a line will '
1071 'be used for reclassifying a message. You can use the '
1072 '<a href="wato.py?mode=pattern_editor">Logfile Pattern Analyzer</a> '
1073 'to test the rules you defined here.</p>'
1074 '<p>Select "Ignore" as state to get the matching logs deleted. Other states will keep the '
1075 'log entries but reclassify the state of them.</p>'),
1076 add_label
=_("Add pattern"),
1078 ("reclassify_states",
1080 title
=_("Reclassify complete state"),
1082 "This setting allows you to convert all incoming states to another state. "
1083 "The option is applied before the state conversion via regexes. So the regex values can "
1084 "modify the state even further."),
1088 title
=_("Change CRITICAL State to"),
1090 ('C', _('CRITICAL')),
1091 ('W', _('WARNING')),
1094 ('.', _('Context Info')),
1100 title
=_("Change WARNING State to"),
1102 ('C', _('CRITICAL')),
1103 ('W', _('WARNING')),
1106 ('.', _('Context Info')),
1112 title
=_("Change OK State to"),
1114 ('C', _('CRITICAL')),
1115 ('W', _('WARNING')),
1118 ('.', _('Context Info')),
1124 title
=_("Change Context Info to"),
1126 ('C', _('CRITICAL')),
1127 ('W', _('WARNING')),
1130 ('.', _('Context Info')),
1135 optional_keys
=False,
1138 optional_keys
=["reclassify_states"],
1140 forth
=lambda x
: isinstance(x
, dict) and x
or {"reclassify_patterns": x
}),
1143 itemhelp
=_("Put the item names of the logfiles here. For example \"System$\" "
1144 "to select the service \"LOG System\". You can use regular "
1145 "expressions which must match the beginning of the logfile name."),
1150 # .--Unsorted--(Don't create new stuff here!)----------------------------.
1152 # | | | | |_ __ ___ ___ _ __| |_ ___ __| | |
1153 # | | | | | '_ \/ __|/ _ \| '__| __/ _ \/ _` | |
1154 # | | |_| | | | \__ \ (_) | | | || __/ (_| | |
1155 # | \___/|_| |_|___/\___/|_| \__\___|\__,_| |
1157 # +----------------------------------------------------------------------+
1158 # | All these rules have not been moved into their according sections. |
1159 # | Please move them as you come along - but beware of dependecies! |
1160 # | Remove this section as soon as it's empty. |
1161 # '----------------------------------------------------------------------'
1164 RulespecGroupCheckParametersStorage
,
1165 varname
="filesystem_groups",
1166 title
=_('Filesystem grouping patterns'),
1167 help=_('Normally the filesystem checks (<tt>df</tt>, <tt>hr_fs</tt> and others) '
1168 'will create a single service for each filesystem. '
1169 'By defining grouping '
1170 'patterns you can handle groups of filesystems like one filesystem. '
1171 'For each group you can define one or several patterns. '
1172 'The filesystems matching one of the patterns '
1173 'will be monitored like one big filesystem in a single service.'),
1177 orientation
="horizontal",
1179 TextAscii(title
=_("Name of group"),),
1181 title
=_("Pattern for mount point (using * and ?)"),
1182 help=_("You can specify one or several patterns containing "
1183 "<tt>*</tt> and <tt>?</tt>, for example <tt>/spool/tmpspace*</tt>. "
1184 "The filesystems matching the patterns will be monitored "
1185 "like one big filesystem in a single service."),
1188 add_label
=_("Add pattern"),
1194 RulespecGroupCheckParametersStorage
,
1195 varname
="fileinfo_groups",
1196 title
=_('File Grouping Patterns'),
1197 help=_('The check <tt>fileinfo</tt> monitors the age and size of '
1198 'a single file. Each file information that is sent '
1199 'by the agent will create one service. By defining grouping '
1200 'patterns you can switch to the check <tt>fileinfo.groups</tt>. '
1201 'That check monitors a list of files at once. You can set levels '
1202 'not only for the total size and the age of the oldest/youngest '
1203 'file but also on the count. You can define one or several '
1204 'patterns for a group containing <tt>*</tt> and <tt>?</tt>, for example '
1205 '<tt>/var/log/apache/*.log</tt>. Please see Python\'s fnmatch for more '
1206 'information regarding globbing patterns and special characters. '
1207 'If the pattern begins with a tilde then this pattern is interpreted as '
1208 'a regular expression instead of as a filename globbing pattern and '
1209 '<tt>*</tt> and <tt>?</tt> are treated differently. '
1210 'For files contained in a group '
1211 'the discovery will automatically create a group service instead '
1212 'of single services for each file. This rule also applies when '
1213 'you use manually configured checks instead of inventorized ones. '
1214 'Furthermore, the current time/date in a configurable format '
1215 'may be included in the include pattern. The syntax is as follows: '
1216 '$DATE:format-spec$ or $YESTERDAY:format-spec$, where format-spec '
1217 'is a list of time format directives of the unix date command. '
1218 'Example: $DATE:%Y%m%d$ is todays date, e.g. 20140127. A pattern '
1219 'of /var/tmp/backups/$DATE:%Y%m%d$.txt would search for .txt files '
1220 'with todays date as name in the directory /var/tmp/backups. '
1221 'The YESTERDAY syntax simply subtracts one day from the reference time.'),
1224 help=_("This defines one file grouping pattern."),
1226 orientation
="horizontal",
1229 title
=_("Name of group"),
1235 orientation
="vertical",
1237 TextAscii(title
=_("Include Pattern"), size
=40),
1238 TextAscii(title
=_("Exclude Pattern"), size
=40),
1241 forth
=lambda params
: isinstance(params
, str) and (params
, '') or params
),
1244 add_label
=_("Add pattern group"),
1249 register_check_parameters(
1250 RulespecGroupCheckParametersOperatingSystem
,
1252 _("CPU load (not utilization!)"),
1254 help=_("The CPU load of a system is the number of processes currently being "
1255 "in the state <u>running</u>, i.e. either they occupy a CPU or wait "
1256 "for one. The <u>load average</u> is the averaged CPU load over the last 1, "
1257 "5 or 15 minutes. The following levels will be applied on the average "
1258 "load. On Linux system the 15-minute average load is used when applying "
1259 "those levels. The configured levels are multiplied with the number of "
1260 "CPUs, so you should configure the levels based on the value you want to "
1261 "be warned \"per CPU\"."),
1263 default_difference
=(2.0, 4.0),
1264 default_levels
=(5.0, 10.0),
1270 register_check_parameters(
1271 RulespecGroupCheckParametersOperatingSystem
,
1273 _("CPU utilization for Appliances"),
1276 Percentage(title
=_("Warning at a utilization of")),
1277 Percentage(title
=_("Critical at a utilization of"))
1279 label
=_("Alert on too high CPU utilization"),
1280 help=_("The CPU utilization sums up the percentages of CPU time that is used "
1281 "for user processes and kernel routines over all available cores within "
1282 "the last check interval. The possible range is from 0% to 100%"),
1283 default_value
=(90.0, 95.0)),
1288 register_check_parameters(
1289 RulespecGroupCheckParametersOperatingSystem
,
1290 "cpu_utilization_multiitem",
1291 _("CPU utilization of Devices with Modules"),
1293 help=_("The CPU utilization sums up the percentages of CPU time that is used "
1294 "for user processes and kernel routines over all available cores within "
1295 "the last check interval. The possible range is from 0% to 100%"),
1300 title
=_("Alert on too high CPU utilization"),
1302 Percentage(title
=_("Warning at a utilization of"), default_value
=90.0),
1303 Percentage(title
=_("Critical at a utilization of"), default_value
=95.0)
1308 TextAscii(title
=_("Module name"), allow_empty
=False),
1312 register_check_parameters(
1313 RulespecGroupCheckParametersOperatingSystem
,
1315 _("FPGA utilization"),
1317 help=_("Give FPGA utilization levels in percent. The possible range is from 0% to 100%."),
1322 title
=_("Alert on too high FPGA utilization"),
1324 Percentage(title
=_("Warning at a utilization of"), default_value
=80.0),
1325 Percentage(title
=_("Critical at a utilization of"), default_value
=90.0)
1330 TextAscii(title
=_("FPGA"), allow_empty
=False),
1335 def transform_humidity(p
):
1336 if isinstance(p
, (list, tuple)):
1338 "levels_lower": (float(p
[1]), float(p
[0])),
1339 "levels": (float(p
[2]), float(p
[3])),
1344 register_check_parameters(
1345 RulespecGroupCheckParametersEnvironment
,
1347 _("Humidity Levels"),
1350 help=_("This Ruleset sets the threshold limits for humidity sensors"),
1354 title
=_("Upper levels"),
1356 Percentage(title
=_("Warning at")),
1357 Percentage(title
=_("Critical at")),
1361 title
=_("Lower levels"),
1363 Percentage(title
=_("Warning below")),
1364 Percentage(title
=_("Critical below")),
1367 forth
=transform_humidity
,
1370 title
=_("Sensor name"),
1371 help=_("The identifier of the sensor."),
1376 register_check_parameters(
1377 RulespecGroupCheckParametersEnvironment
,
1379 _("Humidity Levels for devices with a single sensor"),
1381 help=_("This Ruleset sets the threshold limits for humidity sensors"),
1383 Integer(title
=_("Critical at or below"), unit
="%"),
1384 Integer(title
=_("Warning at or below"), unit
="%"),
1385 Integer(title
=_("Warning at or above"), unit
="%"),
1386 Integer(title
=_("Critical at or above"), unit
="%"),
1392 db_levels_common
= [
1395 title
=_("Levels for the Tablespace usage"),
1396 default_value
=(10.0, 5.0),
1399 title
=_("Percentage free space"),
1401 Percentage(title
=_("Warning if below"), unit
=_("% free")),
1402 Percentage(title
=_("Critical if below"), unit
=_("% free")),
1405 title
=_("Absolute free space"),
1407 Integer(title
=_("Warning if below"), unit
=_("MB"), default_value
=1000),
1408 Integer(title
=_("Critical if below"), unit
=_("MB"), default_value
=500),
1412 orientation
="horizontal",
1414 Filesize(title
=_("Tablespace larger than")),
1416 title
=_("Levels for the Tablespace size"),
1419 title
=_("Percentage free space"),
1421 Percentage(title
=_("Warning if below"), unit
=_("% free")),
1422 Percentage(title
=_("Critical if below"), unit
=_("% free")),
1425 title
=_("Absolute free space"),
1427 Integer(title
=_("Warning if below"), unit
=_("MB")),
1428 Integer(title
=_("Critical if below"), unit
=_("MB")),
1433 title
=_('Dynamic levels'),
1438 title
=_("Magic factor (automatic level adaptation for large tablespaces)"),
1439 help=_("This is only be used in case of percentual levels"),
1442 default_value
=0.9)),
1445 title
=_("Reference size for magic factor"), minvalue
=1, default_value
=1000, unit
=_("MB"))),
1448 title
=_("Maximum levels if using magic factor"),
1449 help=_("The tablespace levels will never be raise above these values, when using "
1450 "the magic factor and the tablespace is very small."),
1453 title
=_("Maximum warning level"),
1456 default_value
=60.0),
1458 title
=_("Maximum critical level"),
1465 register_check_parameters(
1466 RulespecGroupCheckParametersApplications
,
1467 "oracle_tablespaces",
1468 _("Oracle Tablespaces"),
1470 help=_("A tablespace is a container for segments (tables, indexes, etc). A "
1471 "database consists of one or more tablespaces, each made up of one or "
1472 "more data files. Tables and indexes are created within a particular "
1474 "This rule allows you to define checks on the size of tablespaces."),
1475 elements
=db_levels_common
+ [
1478 title
=_("Expected autoextend setting"),
1480 (True, _("Autoextend is expected to be ON")),
1481 (False, _("Autoextend is expected to be OFF")),
1482 (None, _("Autoextend will be ignored")),
1484 ("autoextend_severity",
1486 title
=_("Severity of invalid autoextend setting"),
1489 ("defaultincrement",
1491 title
=_("Default Increment"),
1493 (True, _("State is WARNING in case the next extent has the default size.")),
1494 (False, _("Ignore default increment")),
1496 ("map_file_online_states",
1499 orientation
="horizontal",
1501 DropdownChoice(choices
=[
1502 ("RECOVER", _("Recover")),
1503 ("OFFLINE", _("Offline")),
1507 title
=_('Map file online states'),
1511 title
=_("Monitor temporary Tablespace"),
1513 (False, _("Ignore temporary Tablespaces (Default)")),
1514 (True, _("Apply rule to temporary Tablespaces")),
1519 title
=_("Explicit tablespaces"),
1521 _("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>"
1528 register_check_parameters(
1529 RulespecGroupCheckParametersApplications
,
1531 _("Oracle Processes"),
1534 "Here you can override the default levels for the ORACLE Processes check. The levels "
1535 "are applied on the number of used processes in percentage of the configured limit."),
1539 title
=_("Levels for used processes"),
1541 Percentage(title
=_("Warning if more than"), default_value
=70.0),
1542 Percentage(title
=_("Critical if more than"), default_value
=90.0)
1545 optional_keys
=False,
1547 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
1551 register_check_parameters(
1552 RulespecGroupCheckParametersApplications
,
1553 "oracle_recovery_area",
1554 _("Oracle Recovery Area"),
1555 Dictionary(elements
=[("levels",
1557 title
=_("Levels for used space (reclaimable is considered as free)"),
1559 Percentage(title
=_("warning at"), default_value
=70.0),
1560 Percentage(title
=_("critical at"), default_value
=90.0),
1562 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
1566 register_check_parameters(
1567 RulespecGroupCheckParametersApplications
,
1568 "oracle_dataguard_stats",
1569 _("Oracle Data-Guard Stats"),
1572 _("The Data-Guard statistics are available in Oracle Enterprise Edition with enabled Data-Guard. "
1573 "The <tt>init.ora</tt> parameter <tt>dg_broker_start</tt> must be <tt>TRUE</tt> for this check. "
1574 "The apply and transport lag can be configured with this rule."),
1578 title
=_("Apply Lag Maximum Time"),
1579 help=_("The maximum limit for the apply lag in <tt>v$dataguard_stats</tt>."),
1580 elements
=[Age(title
=_("Warning at"),),
1581 Age(title
=_("Critical at"),)])),
1584 title
=_("Apply Lag Minimum Time"),
1586 "The minimum limit for the apply lag in <tt>v$dataguard_stats</tt>. "
1587 "This is only useful if also <i>Apply Lag Maximum Time</i> has been configured."
1589 elements
=[Age(title
=_("Warning at"),),
1590 Age(title
=_("Critical at"),)])),
1593 title
=_("Transport Lag"),
1594 help=_("The limit for the transport lag in <tt>v$dataguard_stats</tt>"),
1595 elements
=[Age(title
=_("Warning at"),),
1596 Age(title
=_("Critical at"),)])),
1598 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
1602 register_check_parameters(
1603 RulespecGroupCheckParametersApplications
,
1605 _("Oracle Undo Retention"),
1606 Dictionary(elements
=[
1609 title
=_("Levels for remaining undo retention"),
1611 Age(title
=_("warning if less then"), default_value
=600),
1612 Age(title
=_("critical if less then"), default_value
=300),
1615 'nospaceerrcnt_state',
1618 title
=_("State in case of non space error count is greater then 0: "),
1622 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
1626 register_check_parameters(
1627 RulespecGroupCheckParametersApplications
,
1629 _("Oracle RMAN Backups"),
1630 Dictionary(elements
=[("levels",
1632 title
=_("Maximum Age for RMAN backups"),
1634 Age(title
=_("warning if older than"), default_value
=1800),
1635 Age(title
=_("critical if older than"), default_value
=3600),
1637 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
1641 register_check_parameters(
1642 RulespecGroupCheckParametersApplications
,
1643 "oracle_recovery_status",
1644 _("Oracle Recovery Status"),
1645 Dictionary(elements
=[("levels",
1647 title
=_("Levels for checkpoint time"),
1649 Age(title
=_("warning if higher then"), default_value
=1800),
1650 Age(title
=_("critical if higher then"), default_value
=3600),
1654 title
=_("Levels for user managed backup files"),
1655 help=_("Important! This checks is only for monitoring of datafiles "
1656 "who were left in backup mode. "
1657 "(alter database datafile ... begin backup;) "),
1659 Age(title
=_("warning if higher then"), default_value
=1800),
1660 Age(title
=_("critical if higher then"), default_value
=3600),
1662 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
1666 register_check_parameters(
1667 RulespecGroupCheckParametersApplications
,
1669 _("Oracle Scheduler Job"),
1671 help=_("A scheduler job is an object in an ORACLE database which could be "
1672 "compared to a cron job on Unix. "),
1676 title
=_("Maximum run duration for last execution"),
1677 help=_("Here you can define an upper limit for the run duration of "
1678 "last execution of the job."),
1680 Age(title
=_("warning at")),
1681 Age(title
=_("critical at")),
1685 title
=_("Job State"),
1686 help=_("The state of the job is ignored per default."),
1689 (True, _("Ignore the state of the Job")),
1690 (False, _("Consider the state of the job")),
1693 ("status_disabled_jobs",
1694 MonitoringState(title
="Status of service in case of disabled job", default_value
=0)),
1695 ("status_missing_jobs",
1697 title
=_("Status of service in case of missing job."),
1702 title
=_("Scheduler Job Name"),
1703 help=_("Here you can set explicit Scheduler-Jobs by defining them via SID, Job-Owner "
1704 "and Job-Name, separated by a dot, for example <tt>TUX12C.SYS.PURGE_LOG</tt>"),
1710 register_check_parameters(
1711 RulespecGroupCheckParametersApplications
,
1713 _("Oracle Instance"),
1715 title
=_("Consider state of Archivelogmode: "),
1720 title
=_("State in case of Archivelogmode is enabled: "),
1726 title
=_("State in case of Archivelogmode is disabled: "),
1733 title
=_("State in case of Force Logging is enabled: "),
1740 title
=_("State in case of Force Logging is disabled: "),
1747 title
=_("State in case of logins are not possible: "),
1754 title
=_("State in case of Database is PRIMARY and not OPEN: "),
1759 title
=_("Minimum required uptime"),
1761 Age(title
=_("Warning if below")),
1762 Age(title
=_("Critical if below")),
1764 ('ignore_noarchivelog',
1766 title
=_("Ignore state of no-archive log"),
1768 help=_("If active, only a single summary item is displayed. The summary "
1769 "will explicitly mention sensors in warn/crit state but the "
1770 "sensors that are ok are aggregated."),
1771 default_value
=False)),
1774 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
1778 register_check_parameters(
1779 RulespecGroupCheckParametersApplications
, "asm_diskgroup",
1780 _("ASM Disk Group (used space and growth)"),
1782 elements
=filesystem_elements
+ [
1785 title
=_("Handling for required mirror space"),
1788 (False, _("Do not regard required mirror space as free space")),
1789 (True, _("Regard required mirror space as free space")),
1792 "ASM calculates the free space depending on free_mb or required mirror "
1793 "free space. Enable this option to set the check against required "
1794 "mirror free space. This only works for normal or high redundancy Disk Groups."
1797 hidden_keys
=["flex_levels"],
1800 title
=_("ASM Disk Group"),
1801 help=_("Specify the name of the ASM Disk Group "),
1802 allow_empty
=False), "dict")
1805 def _vs_mssql_backup_age(title
):
1807 title
=_("%s" % title
),
1811 title
=_("Set levels"),
1813 Age(title
=_("Warning if older than")),
1814 Age(title
=_("Critical if older than")),
1817 title
=_("No levels"),
1819 FixedValue(None, totext
=""),
1820 FixedValue(None, totext
=""),
1824 register_check_parameters(
1825 RulespecGroupCheckParametersApplications
,
1827 _("MSSQL Backup summary"),
1830 help = _("This rule allows you to set limits on the age of backups for "
1831 "different backup types. If your agent does not support "
1832 "backup types (e.g. <i>Log Backup</i>, <i>Database Diff "
1833 "Backup</i>, etc.) you can use the option <i>Database Backup"
1834 "</i> to set a general limit"),
1836 ("database", _vs_mssql_backup_age("Database backup")),
1837 ("database_diff", _vs_mssql_backup_age("Database diff backup")),
1838 ("log", _vs_mssql_backup_age("Log backup")),
1839 ("file_or_filegroup", _vs_mssql_backup_age("File or filegroup backup")),
1840 ("file_diff", _vs_mssql_backup_age("File diff backup")),
1841 ("partial", _vs_mssql_backup_age("Partial backup")),
1842 ("partial_diff", _vs_mssql_backup_age("Partial diff backup")),
1843 ("unspecific", _vs_mssql_backup_age("Unspecific backup")),
1844 ("not_found", MonitoringState(title
=_("State if no backup found"))),
1847 forth
= lambda params
: (params
if isinstance(params
, dict)
1848 else {'database': (params
[0], params
[1])})
1851 title
= _("Service descriptions"),
1852 allow_empty
= False),
1856 register_check_parameters(
1857 RulespecGroupCheckParametersApplications
,
1858 "mssql_backup_per_type",
1860 Dictionary(elements
=[
1861 ("levels", _vs_mssql_backup_age("Upper levels for the backup age")),
1863 TextAscii(title
=_("Backup name"), allow_empty
=False),
1867 register_check_parameters(
1868 RulespecGroupCheckParametersApplications
, "mssql_file_sizes",
1869 _("MSSQL Log and Data File Sizes"),
1871 title
=_("File Size Levels"),
1875 title
=_("Levels for Datafiles"),
1877 Filesize(title
=_("Warning at")),
1878 Filesize(title
=_("Critical at")),
1882 title
=_("Log files: Absolute upper thresholds"),
1883 elements
=[Filesize(title
=_("Warning at")),
1884 Filesize(title
=_("Critical at"))])),
1887 title
=_("Levels for log files used"),
1890 title
=_("Upper absolute levels"),
1892 Filesize(title
=_("Warning at")),
1893 Filesize(title
=_("Critical at"))
1896 title
=_("Upper percentage levels"),
1898 Percentage(title
=_("Warning at")),
1899 Percentage(title
=_("Critical at"))
1902 ]), TextAscii(title
=_("Service descriptions"), allow_empty
=False), "dict")
1904 register_check_parameters(
1905 RulespecGroupCheckParametersApplications
,
1906 "mssql_tablespaces",
1907 _("MSSQL Size of Tablespace"),
1912 title
=_("Upper levels for size"),
1913 elements
=[Filesize(title
=_("Warning at")),
1914 Filesize(title
=_("Critical at"))])),
1917 title
=_("Upper levels for reserved space"),
1920 title
=_("Absolute levels"),
1922 Filesize(title
=_("Warning at")),
1923 Filesize(title
=_("Critical at"))
1926 title
=_("Percentage levels"),
1928 Percentage(title
=_("Warning at")),
1929 Percentage(title
=_("Critical at"))
1934 title
=_("Upper levels for data"),
1937 title
=_("Absolute levels"),
1939 Filesize(title
=_("Warning at")),
1940 Filesize(title
=_("Critical at"))
1943 title
=_("Percentage levels"),
1945 Percentage(title
=_("Warning at")),
1946 Percentage(title
=_("Critical at"))
1951 title
=_("Upper levels for indexes"),
1954 title
=_("Absolute levels"),
1956 Filesize(title
=_("Warning at")),
1957 Filesize(title
=_("Critical at"))
1960 title
=_("Percentage levels"),
1962 Percentage(title
=_("Warning at")),
1963 Percentage(title
=_("Critical at"))
1968 title
=_("Upper levels for unused space"),
1971 title
=_("Absolute levels"),
1973 Filesize(title
=_("Warning at")),
1974 Filesize(title
=_("Critical at"))
1977 title
=_("Percentage levels"),
1979 Percentage(title
=_("Warning at")),
1980 Percentage(title
=_("Critical at"))
1985 title
=_("Lower levels for unallocated space"),
1988 title
=_("Absolute levels"),
1990 Filesize(title
=_("Warning below")),
1991 Filesize(title
=_("Critical below"))
1994 title
=_("Percentage levels"),
1996 Percentage(title
=_("Warning below")),
1997 Percentage(title
=_("Critical below"))
2001 TextAscii(title
=_("Tablespace name"), allow_empty
=False),
2005 register_check_parameters(
2006 RulespecGroupCheckParametersApplications
,
2007 "mssql_page_activity",
2008 _("MSSQL Page Activity"),
2010 title
=_("Page Activity Levels"),
2014 title
=_("Reads/sec"),
2016 Float(title
=_("warning at"), unit
=_("/sec")),
2017 Float(title
=_("critical at"), unit
=_("/sec")),
2021 title
=_("Writes/sec"),
2023 Float(title
=_("warning at"), unit
=_("/sec")),
2024 Float(title
=_("critical at"), unit
=_("/sec")),
2026 ("page_lookups/sec",
2028 title
=_("Lookups/sec"),
2030 Float(title
=_("warning at"), unit
=_("/sec")),
2031 Float(title
=_("critical at"), unit
=_("/sec")),
2034 TextAscii(title
=_("Service descriptions"), allow_empty
=False),
2038 def levels_absolute_or_dynamic(name
, value
):
2040 title
=_("Levels of %s %s") % (name
, value
),
2041 default_value
=(80.0, 90.0),
2044 title
=_("Percentage %s space") % value
,
2046 Percentage(title
=_("Warning at"), unit
=_("% used")),
2047 Percentage(title
=_("Critical at"), unit
=_("% used")),
2050 title
=_("Absolute %s space") % value
,
2052 Integer(title
=_("Warning at"), unit
=_("MB"), default_value
=500),
2053 Integer(title
=_("Critical at"), unit
=_("MB"), default_value
=1000),
2057 orientation
="horizontal",
2059 Filesize(title
=_(" larger than")),
2061 title
=_("Levels for the %s %s size") % (name
, value
),
2064 title
=_("Percentage %s space") % value
,
2066 Percentage(title
=_("Warning at"), unit
=_("% used")),
2067 Percentage(title
=_("Critical at"), unit
=_("% used")),
2070 title
=_("Absolute free space"),
2072 Integer(title
=_("Warning at"), unit
=_("MB")),
2073 Integer(title
=_("Critical at"), unit
=_("MB")),
2078 title
=_('Dynamic levels'),
2083 register_check_parameters(
2084 RulespecGroupCheckParametersApplications
, "mssql_transactionlogs",
2085 _("MSSQL Transactionlog Sizes"),
2087 title
=_("File Size Levels"),
2088 help=_("Specify levels for transactionlogs of a database. Please note that relative "
2089 "levels will only work if there is a max_size set for the file on the database "
2092 ("used_levels", levels_absolute_or_dynamic(_("Transactionlog"), _("used"))),
2093 ("allocated_used_levels",
2094 levels_absolute_or_dynamic(_("Transactionlog"), _("used of allocation"))),
2095 ("allocated_levels", levels_absolute_or_dynamic(_("Transactionlog"), _("allocated"))),
2096 ]), TextAscii(title
=_("Database Name"), allow_empty
=False), "dict")
2098 register_check_parameters(
2099 RulespecGroupCheckParametersApplications
, "mssql_datafiles", _("MSSQL Datafile Sizes"),
2101 title
=_("File Size Levels"),
2102 help=_("Specify levels for datafiles of a database. Please note that relative "
2103 "levels will only work if there is a max_size set for the file on the database "
2106 ("used_levels", levels_absolute_or_dynamic(_("Datafile"), _("used"))),
2107 ("allocated_used_levels",
2108 levels_absolute_or_dynamic(_("Datafile"), _("used of allocation"))),
2109 ("allocated_levels", levels_absolute_or_dynamic(_("Datafile"), _("allocated"))),
2110 ]), TextAscii(title
=_("Database Name"), allow_empty
=False), "dict")
2112 register_check_parameters(
2113 RulespecGroupCheckParametersApplications
,
2115 _("Virtual Machine Snapshots"),
2116 Dictionary(elements
=[
2119 title
=_("Age of the last snapshot"),
2121 Age(title
=_("Warning if older than")),
2122 Age(title
=_("Critical if older than"))
2126 title
=_("Age of the oldest snapshot"),
2128 Age(title
=_("Warning if older than")),
2129 Age(title
=_("Critical if older than"))
2136 register_check_parameters(
2137 RulespecGroupCheckParametersApplications
,
2139 _("Veeam: Time since last Backup"),
2140 Dictionary(elements
=[("age",
2142 title
=_("Time since end of last backup"),
2144 Age(title
=_("Warning if older than"), default_value
=108000),
2145 Age(title
=_("Critical if older than"), default_value
=172800)
2147 TextAscii(title
=_("Job name")),
2151 register_check_parameters(
2152 RulespecGroupCheckParametersApplications
,
2153 "backup_timemachine",
2154 _("Age of timemachine backup"),
2155 Dictionary(elements
=[("age",
2157 title
=_("Maximum age of latest timemachine backup"),
2159 Age(title
=_("Warning if older than"), default_value
=86400),
2160 Age(title
=_("Critical if older than"), default_value
=172800)
2166 register_check_parameters(
2167 RulespecGroupCheckParametersApplications
,
2169 _("Age of jobs controlled by mk-job"),
2170 Dictionary(elements
=[
2173 title
=_("Maximum time since last start of job execution"),
2175 Age(title
=_("Warning at"), default_value
=0),
2176 Age(title
=_("Critical at"), default_value
=0)
2178 ("outcome_on_cluster",
2180 title
=_("Clusters: Prefered check result of local checks"),
2181 help=_("If you're running local checks on clusters via clustered services rule "
2182 "you can influence the check result with this rule. You can choose between "
2183 "best or worst state. Default setting is worst state."),
2185 ("worst", _("Worst state")),
2186 ("best", _("Best state")),
2188 default_value
="worst")),
2190 TextAscii(title
=_("Job name"),),
2194 register_check_parameters(
2195 RulespecGroupCheckParametersApplications
,
2196 "mssql_counters_locks",
2199 help=_("This check monitors locking related information of MSSQL tablespaces."),
2202 "lock_requests/sec",
2204 title
=_("Lock Requests / sec"),
2206 _("Number of new locks and lock conversions per second requested from the lock manager."
2209 Float(title
=_("Warning at"), unit
=_("requests/sec")),
2210 Float(title
=_("Critical at"), unit
=_("requests/sec")),
2215 "lock_timeouts/sec",
2217 title
=_("Lock Timeouts / sec"),
2219 _("Number of lock requests per second that timed out, including requests for NOWAIT locks."
2222 Float(title
=_("Warning at"), unit
=_("timeouts/sec")),
2223 Float(title
=_("Critical at"), unit
=_("timeouts/sec")),
2228 "number_of_deadlocks/sec",
2230 title
=_("Number of Deadlocks / sec"),
2231 help=_("Number of lock requests per second that resulted in a deadlock."),
2233 Float(title
=_("Warning at"), unit
=_("deadlocks/sec")),
2234 Float(title
=_("Critical at"), unit
=_("deadlocks/sec")),
2241 title
=_("Lock Waits / sec"),
2242 help=_("Number of lock requests per second that required the caller to wait."),
2244 Float(title
=_("Warning at"), unit
=_("waits/sec")),
2245 Float(title
=_("Critical at"), unit
=_("waits/sec")),
2250 TextAscii(title
=_("Service descriptions"), allow_empty
=False),
2257 "ASYNC_DISKPOOL_LOCK",
2258 "ASYNC_IO_COMPLETION",
2260 "AUDIT_GROUPCACHE_LOCK",
2261 "AUDIT_LOGINCACHE_LOCK",
2262 "AUDIT_ON_DEMAND_TARGET_LOCK",
2263 "AUDIT_XE_SESSION_MGR",
2270 "BROKER_CONNECTION_RECEIVE_TASK",
2271 "BROKER_ENDPOINT_STATE_MUTEX",
2272 "BROKER_EVENTHANDLER",
2274 "BROKER_MASTERSTART",
2275 "BROKER_RECEIVE_WAITFOR",
2276 "BROKER_REGISTERALLENDPOINTS",
2281 "BROKER_TRANSMITTER",
2282 "BUILTIN_HASHKEY_MUTEX",
2283 "CHECK_PRINT_RECORD",
2293 "CLR_RWLOCK_READER",
2294 "CLR_RWLOCK_WRITER",
2297 "CLRHOST_STATE_ACCESS",
2303 "DBMIRROR_DBM_EVENT",
2304 "DBMIRROR_DBM_MUTEX",
2305 "DBMIRROR_EVENTS_QUEUE",
2307 "DBMIRROR_WORKER_QUEUE",
2309 "DEADLOCK_ENUM_MUTEX",
2310 "DEADLOCK_TASK_SEARCH",
2312 "DISABLE_VERSIONING",
2314 "DISPATCHER_QUEUE_SEMAPHORE",
2315 "DLL_LOADING_MUTEX",
2318 "DTC_ABORT_REQUEST",
2321 "DTC_TMDOWN_REQUEST",
2322 "DTC_WAITFOR_OUTCOME",
2323 "DUMP_LOG_COORDINATOR",
2327 "EE_SPECPROC_MAP_INIT",
2328 "ENABLE_VERSIONING",
2329 "ERROR_REPORTING_MANAGER",
2332 "EXECUTION_PIPE_EVENT_INTERNAL",
2335 "FCB_REPLICA_WRITE",
2337 "FS_GARBAGE_COLLECTOR_SHUTDOWN",
2339 "FS_LOGTRUNC_RWLOCK",
2340 "FSA_FORCE_OWN_XACT",
2342 "FSTR_CONFIG_MUTEX",
2343 "FSTR_CONFIG_RWLOCK",
2344 "FT_COMPROWSET_RWLOCK",
2346 "FT_IFTS_SCHEDULER_IDLE_WAIT",
2350 "FT_METADATA_MUTEX",
2355 "HADR_AR_CRITICAL_SECTION_ENTRY",
2356 "HADR_AR_MANAGER_MUTEX",
2357 "HADR_ARCONTROLLER_NOTIFICATIONS_SUBSCRIBER_LIST",
2358 "HADR_BACKUP_BULK_LOCK",
2359 "HADR_BACKUP_QUEUE",
2360 "HADR_CLUSAPI_CALL",
2361 "HADR_COMPRESSED_CACHE_SYNC",
2362 "HADR_DATABASE_FLOW_CONTROL",
2363 "HADR_DATABASE_VERSIONING_STATE",
2364 "HADR_DATABASE_WAIT_FOR_RESTART",
2365 "HADR_DATABASE_WAIT_FOR_TRANSITION_TO_VERSIONING",
2367 "HADR_DB_OP_COMPLETION_SYNC",
2368 "HADR_DB_OP_START_SYNC",
2369 "HADR_DBR_SUBSCRIBER",
2370 "HADR_DBR_SUBSCRIBER_FILTER_LIST",
2371 "HADR_DBSTATECHANGE_SYNC",
2372 "HADR_FILESTREAM_BLOCK_FLUSH",
2373 "HADR_FILESTREAM_FILE_CLOSE",
2374 "HADR_FILESTREAM_FILE_REQUEST",
2375 "HADR_FILESTREAM_IOMGR",
2376 "HADR_FILESTREAM_IOMGR_IOCOMPLETION",
2377 "HADR_FILESTREAM_MANAGER",
2378 "HADR_GROUP_COMMIT",
2379 "HADR_LOGCAPTURE_SYNC",
2380 "HADR_LOGCAPTURE_WAIT",
2381 "HADR_LOGPROGRESS_SYNC",
2382 "HADR_NOTIFICATION_DEQUEUE",
2383 "HADR_NOTIFICATION_WORKER_EXCLUSIVE_ACCESS",
2384 "HADR_NOTIFICATION_WORKER_STARTUP_SYNC",
2385 "HADR_NOTIFICATION_WORKER_TERMINATION_SYNC",
2386 "HADR_PARTNER_SYNC",
2387 "HADR_READ_ALL_NETWORKS",
2388 "HADR_RECOVERY_WAIT_FOR_CONNECTION",
2389 "HADR_RECOVERY_WAIT_FOR_UNDO",
2390 "HADR_REPLICAINFO_SYNC",
2392 "HADR_SYNCHRONIZING_THROTTLE",
2393 "HADR_TDS_LISTENER_SYNC",
2394 "HADR_TDS_LISTENER_SYNC_PROCESSING",
2396 "HADR_TRANSPORT_DBRLIST",
2397 "HADR_TRANSPORT_FLOW_CONTROL",
2398 "HADR_TRANSPORT_SESSION",
2401 "HADR_XRF_STACK_ACCESS",
2409 "IOAFF_RANGE_QUEUE",
2412 "KTM_RECOVERY_MANAGER",
2413 "KTM_RECOVERY_RESOLUTION",
2422 "LCK_M_BU_ABORT_BLOCKERS",
2423 "LCK_M_BU_LOW_PRIORITY",
2425 "LCK_M_IS_ABORT_BLOCKERS",
2426 "LCK_M_IS_LOW_PRIORITY",
2428 "LCK_M_IU_ABORT_BLOCKERS",
2429 "LCK_M_IU_LOW_PRIORITY",
2431 "LCK_M_IX_ABORT_BLOCKERS",
2432 "LCK_M_IX_LOW_PRIORITY",
2434 "LCK_M_RIn_NL_ABORT_BLOCKERS",
2435 "LCK_M_RIn_NL_LOW_PRIORITY",
2437 "LCK_M_RIn_S_ABORT_BLOCKERS",
2438 "LCK_M_RIn_S_LOW_PRIORITY",
2440 "LCK_M_RIn_U_ABORT_BLOCKERS",
2441 "LCK_M_RIn_U_LOW_PRIORITY",
2443 "LCK_M_RIn_X_ABORT_BLOCKERS",
2444 "LCK_M_RIn_X_LOW_PRIORITY",
2446 "LCK_M_RS_S_ABORT_BLOCKERS",
2447 "LCK_M_RS_S_LOW_PRIORITY",
2449 "LCK_M_RS_U_ABORT_BLOCKERS",
2450 "LCK_M_RS_U_LOW_PRIORITY",
2452 "LCK_M_RX_S_ABORT_BLOCKERS",
2453 "LCK_M_RX_S_LOW_PRIORITY",
2455 "LCK_M_RX_U_ABORT_BLOCKERS",
2456 "LCK_M_RX_U_LOW_PRIORITY",
2458 "LCK_M_RX_X_ABORT_BLOCKERS",
2459 "LCK_M_RX_X_LOW_PRIORITY",
2461 "LCK_M_S_ABORT_BLOCKERS",
2462 "LCK_M_S_LOW_PRIORITY",
2464 "LCK_M_SCH_M_ABORT_BLOCKERS",
2465 "LCK_M_SCH_M_LOW_PRIORITY",
2467 "LCK_M_SCH_S_ABORT_BLOCKERS",
2468 "LCK_M_SCH_S_LOW_PRIORITY",
2470 "LCK_M_SIU_ABORT_BLOCKERS",
2471 "LCK_M_SIU_LOW_PRIORITY",
2473 "LCK_M_SIX_ABORT_BLOCKERS",
2474 "LCK_M_SIX_LOW_PRIORITY",
2476 "LCK_M_U_ABORT_BLOCKERS",
2477 "LCK_M_U_LOW_PRIORITY",
2479 "LCK_M_UIX_ABORT_BLOCKERS",
2480 "LCK_M_UIX_LOW_PRIORITY",
2482 "LCK_M_X_ABORT_BLOCKERS",
2483 "LCK_M_X_LOW_PRIORITY",
2489 "LOGMGR_RESERVE_APPEND",
2490 "LOWFAIL_MEMMGR_QUEUE",
2491 "MEMORY_ALLOCATION_EXT",
2494 "MSQL_XACT_MGR_MUTEX",
2498 "NET_WAITFOR_PACKET",
2500 "ONDEMAND_TASK_QUEUE",
2513 "PARALLEL_BACKUP_QUEUE",
2515 "PREEMPTIVE_AUDIT_ACCESS_EVENTLOG",
2516 "PREEMPTIVE_AUDIT_ACCESS_SECLOG",
2517 "PREEMPTIVE_CLOSEBACKUPMEDIA",
2518 "PREEMPTIVE_CLOSEBACKUPTAPE",
2519 "PREEMPTIVE_CLOSEBACKUPVDIDEVICE",
2520 "PREEMPTIVE_CLUSAPI_CLUSTERRESOURCECONTROL",
2521 "PREEMPTIVE_COM_COCREATEINSTANCE",
2522 "PREEMPTIVE_HADR_LEASE_MECHANISM",
2523 "PREEMPTIVE_SOSTESTING",
2524 "PREEMPTIVE_STRESSDRIVER",
2525 "PREEMPTIVE_TESTING",
2526 "PREEMPTIVE_XETESTING",
2527 "PRINT_ROLLBACK_PROGRESS",
2528 "PWAIT_HADR_CHANGE_NOTIFIER_TERMINATION_SYNC",
2529 "PWAIT_HADR_CLUSTER_INTEGRATION",
2530 "PWAIT_HADR_OFFLINE_COMPLETED",
2531 "PWAIT_HADR_ONLINE_COMPLETED",
2532 "PWAIT_HADR_POST_ONLINE_COMPLETED",
2533 "PWAIT_HADR_WORKITEM_COMPLETED",
2534 "PWAIT_MD_LOGIN_STATS",
2535 "PWAIT_MD_RELATION_CACHE",
2536 "PWAIT_MD_SERVER_CACHE",
2537 "PWAIT_MD_UPGRADE_CONFIG",
2538 "PWAIT_METADATA_LAZYCACHE_RWLOCk",
2540 "QPJOB_WAITFOR_ABORT",
2541 "QRY_MEM_GRANT_INFO_MUTEX",
2542 "QUERY_ERRHDL_SERVICE_DONE",
2543 "QUERY_EXECUTION_INDEX_SORT_EVENT_OPEN",
2544 "QUERY_NOTIFICATION_MGR_MUTEX",
2545 "QUERY_NOTIFICATION_SUBSCRIPTION_MUTEX",
2546 "QUERY_NOTIFICATION_TABLE_MGR_MUTEX",
2547 "QUERY_NOTIFICATION_UNITTEST_MUTEX",
2548 "QUERY_OPTIMIZER_PRINT_MUTEX",
2550 "QUERY_WAIT_ERRHDL_SERVICE",
2552 "REPL_CACHE_ACCESS",
2553 "REPL_SCHEMA_ACCESS",
2555 "REQUEST_DISPENSER_PAUSE",
2556 "REQUEST_FOR_DEADLOCK_SEARCH",
2559 "RESOURCE_SEMAPHORE",
2560 "RESOURCE_SEMAPHORE_MUTEX",
2561 "RESOURCE_SEMAPHORE_QUERY_COMPILE",
2562 "RESOURCE_SEMAPHORE_SMALL_QUERY",
2563 "SEC_DROP_TEMP_KEY",
2566 "SERVER_IDLE_CHECK",
2568 "SLEEP_BPOOL_FLUSH",
2570 "SLEEP_DCOMSTARTUP",
2571 "SLEEP_MSDBSTARTUP",
2574 "SLEEP_TEMPDBSTARTUP",
2575 "SNI_CRITICAL_SECTION",
2576 "SNI_HTTP_WAITFOR_",
2577 "SNI_LISTENER_ACCESS",
2578 "SNI_TASK_COMPLETION",
2581 "SOS_CALLBACK_REMOVAL",
2582 "SOS_DISPATCHER_MUTEX",
2583 "SOS_LOCALALLOCATORLIST",
2584 "SOS_MEMORY_USAGE_ADJUSTMENT",
2585 "SOS_OBJECT_STORE_DESTROY_MUTEX",
2586 "SOS_PHYS_PAGE_CACHE",
2587 "SOS_PROCESS_AFFINITY_MUTEX",
2588 "SOS_RESERVEDMEMBLOCKLIST",
2589 "SOS_SCHEDULER_YIELD",
2590 "SOS_SMALL_PAGE_ALLOC",
2591 "SOS_STACKSTORE_INIT_MUTEX",
2592 "SOS_SYNC_TASK_ENQUEUE_EVENT",
2593 "SOS_VIRTUALMEMORY_LOW",
2598 "SOSHOST_SEMAPHORE",
2600 "SOSHOST_TRACELOCK",
2601 "SOSHOST_WAITFORDONE",
2604 "SQLCLR_DEADLOCK_DETECTION",
2605 "SQLCLR_QUANTUM_PUNISHMENT",
2606 "SQLSORT_NORMMUTEX",
2607 "SQLSORT_SORTMUTEX",
2608 "SQLTRACE_BUFFER_FLUSH",
2609 "SQLTRACE_FILE_BUFFER",
2610 "SQLTRACE_SHUTDOWN",
2611 "SQLTRACE_WAIT_ENTRIES",
2615 "TIMEPRIV_TIMEPERIOD",
2617 "TRAN_MARKLATCH_DT",
2618 "TRAN_MARKLATCH_EX",
2619 "TRAN_MARKLATCH_KP",
2620 "TRAN_MARKLATCH_NL",
2621 "TRAN_MARKLATCH_SH",
2622 "TRAN_MARKLATCH_UP",
2623 "TRANSACTION_MUTEX",
2626 "VIEW_DEFINITION_MUTEX",
2628 "WAIT_XTP_CKPT_CLOSE",
2629 "WAIT_XTP_CKPT_ENABLED",
2630 "WAIT_XTP_CKPT_STATE_LOCK",
2632 "WAIT_XTP_HOST_WAIT",
2633 "WAIT_XTP_OFFLINE_CKPT_LOG_IO",
2634 "WAIT_XTP_OFFLINE_CKPT_NEW_LOG",
2635 "WAIT_XTP_PROCEDURE_ENTRY",
2636 "WAIT_XTP_RECOVERY",
2637 "WAIT_XTP_TASK_SHUTDOWN",
2638 "WAIT_XTP_TRAN_COMMIT",
2639 "WAIT_XTP_TRAN_DEPENDENCY",
2641 "WAITFOR_TASKSHUTDOWN",
2647 "XACT_OWN_TRANSACTION",
2648 "XACT_RECLAIM_SESSION",
2650 "XACTWORKSPACE_MUTEX",
2651 "XE_BUFFERMGR_ALLPROCESSED_EVENT",
2652 "XE_BUFFERMGR_FREEBUF_EVENT",
2653 "XE_DISPATCHER_CONFIG_SESSION_LIST",
2654 "XE_DISPATCHER_JOIN",
2655 "XE_DISPATCHER_WAIT",
2656 "XE_MODULEMGR_SYNC",
2658 "XE_PACKAGE_LOCK_BACKOFF",
2659 "XTPPROC_CACHE_ACCESS",
2660 "XTPPROC_PARTITIONED_STACK_CREATE",
2663 register_check_parameters(
2664 RulespecGroupCheckParametersApplications
,
2665 "mssql_blocked_sessions",
2666 _("MSSQL Blocked Sessions"),
2671 title
=_("State of MSSQL Blocked Sessions is treated as"),
2672 help=_("The default state if there is at least one "
2673 "blocked session."),
2678 title
=_("Levels for wait"),
2679 help=_("The threshholds for wait_duration_ms. Will "
2680 "overwrite the default state set above."),
2681 default_value
=(0, 0),
2683 Float(title
=_("Warning at"), unit
=_("seconds"), display_format
="%.3f"),
2684 Float(title
=_("Critical at"), unit
=_("seconds"), display_format
="%.3f"),
2686 ("ignore_waittypes",
2688 title
=_("Ignore wait types"),
2690 choices
=[(entry
, entry
) for entry
in mssql_waittypes
],
2698 register_check_parameters(
2699 RulespecGroupCheckParametersApplications
,
2700 "mssql_instance_blocked_sessions",
2701 _("MSSQL Blocked Sessions"),
2706 title
=_("State of MSSQL Blocked Sessions is treated as"),
2707 help=_("The default state if there is at least one "
2708 "blocked session."),
2713 title
=_("Levels for wait"),
2714 help=_("The threshholds for wait_duration_ms. Will "
2715 "overwrite the default state set above."),
2716 default_value
=(0, 0),
2718 Float(title
=_("Warning at"), unit
=_("seconds"), display_format
="%.3f"),
2719 Float(title
=_("Critical at"), unit
=_("seconds"), display_format
="%.3f"),
2721 ("ignore_waittypes",
2723 title
=_("Ignore wait types"),
2725 choices
=[(entry
, entry
) for entry
in mssql_waittypes
],
2728 TextAscii(title
=_("Instance identifier")),
2732 register_check_parameters(
2733 RulespecGroupCheckParametersApplications
,
2735 _("MySQL Sessions & Connections"),
2737 help=_("This check monitors the current number of active sessions to the MySQL "
2738 "database server as well as the connection rate."),
2743 title
=_("Number of current sessions"),
2745 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
2746 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
2753 title
=_("Number of currently running sessions"),
2754 help=_("Levels for the number of sessions that are currently active"),
2756 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=10),
2757 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=20),
2764 title
=_("Number of new connections per second"),
2766 Integer(title
=_("Warning at"), unit
=_("connection/sec"), default_value
=20),
2767 Integer(title
=_("Critical at"), unit
=_("connection/sec"), default_value
=40),
2773 title
=_("Instance"),
2774 help=_("Only needed if you have multiple MySQL Instances on one server"),
2779 register_check_parameters(
2780 RulespecGroupCheckParametersApplications
,
2782 _("MySQL InnoDB Throughput"),
2786 title
=_("Read throughput"),
2788 Float(title
=_("warning at"), unit
=_("MB/s")),
2789 Float(title
=_("critical at"), unit
=_("MB/s"))
2793 title
=_("Write throughput"),
2795 Float(title
=_("warning at"), unit
=_("MB/s")),
2796 Float(title
=_("critical at"), unit
=_("MB/s"))
2801 help=_("When averaging is set, a floating average value "
2802 "of the disk throughput is computed and the levels for read "
2803 "and write will be applied to the average instead of the current "
2807 unit
=_("minutes")))]),
2809 title
=_("Instance"),
2810 help=_("Only needed if you have multiple MySQL Instances on one server"),
2815 register_check_parameters(
2816 RulespecGroupCheckParametersApplications
,
2817 "mysql_connections",
2818 _("MySQL Connections"),
2819 Dictionary(elements
=[
2822 title
=_("Max. parallel connections"),
2823 help=_("Compares the maximum number of connections that have been "
2824 "in use simultaneously since the server started with the maximum simultaneous "
2825 "connections allowed by the configuration of the server. This threshold "
2826 "makes the check raise warning/critical states if the percentage is equal to "
2827 "or above the configured levels."),
2829 Percentage(title
=_("Warning at")),
2830 Percentage(title
=_("Critical at")),
2834 title
=_("Instance"),
2835 help=_("Only needed if you have multiple MySQL Instances on one server"),
2840 register_check_parameters(
2841 RulespecGroupCheckParametersApplications
,
2846 ("seconds_behind_master",
2848 title
=_("Max. time behind the master"),
2850 "Compares the time which the slave can be behind the master. "
2851 "This rule makes the check raise warning/critical states if the time is equal to "
2852 "or above the configured levels."),
2854 Age(title
=_("Warning at")),
2855 Age(title
=_("Critical at")),
2858 optional_keys
=None),
2860 title
=_("Instance"),
2861 help=_("Only needed if you have multiple MySQL Instances on one server"),
2866 register_check_parameters(
2867 RulespecGroupCheckParametersApplications
, "db_bloat", _("Database Bloat (PostgreSQL)"),
2869 help=_("This rule allows you to configure bloat levels for a databases tablespace and "
2874 title
=_("Table absolute bloat levels"),
2876 Filesize(title
=_("Warning at")),
2877 Filesize(title
=_("Critical at")),
2879 ("table_bloat_perc",
2881 title
=_("Table percentage bloat levels"),
2882 help=_("Percentage in respect to the optimal utilization. "
2883 "For example if an alarm should raise at 50% wasted space, you need "
2884 "to configure 150%"),
2886 Percentage(title
=_("Warning at"), maxvalue
=None),
2887 Percentage(title
=_("Critical at"), maxvalue
=None),
2891 title
=_("Index absolute levels"),
2893 Filesize(title
=_("Warning at")),
2894 Filesize(title
=_("Critical at")),
2896 ("index_bloat_perc",
2898 title
=_("Index percentage bloat levels"),
2899 help=_("Percentage in respect to the optimal utilization. "
2900 "For example if an alarm should raise at 50% wasted space, you need "
2901 "to configure 150%"),
2903 Percentage(title
=_("Warning at"), maxvalue
=None),
2904 Percentage(title
=_("Critical at"), maxvalue
=None),
2906 ]), TextAscii(title
=_("Name of the database"),), "dict")
2908 register_check_parameters(
2909 RulespecGroupCheckParametersApplications
, "db_connections",
2910 _("Database Connections (PostgreSQL/MongoDB)"),
2912 help=_("This rule allows you to configure the number of maximum concurrent "
2913 "connections for a given database."),
2917 title
=_("Percentage of maximum available connections"),
2919 Percentage(title
=_("Warning at"), unit
=_("% of maximum connections")),
2920 Percentage(title
=_("Critical at"), unit
=_("% of maximum connections")),
2924 title
=_("Absolute number of connections"),
2926 Integer(title
=_("Warning at"), minvalue
=0, unit
=_("connections")),
2927 Integer(title
=_("Critical at"), minvalue
=0, unit
=_("connections")),
2929 ]), TextAscii(title
=_("Name of the database"),), "dict")
2931 register_check_parameters(
2932 RulespecGroupCheckParametersApplications
, "postgres_locks", _("PostgreSQL Locks"),
2935 "This rule allows you to configure the limits for the SharedAccess and Exclusive Locks "
2936 "for a PostgreSQL database."),
2940 title
=_("Shared Access Locks"),
2942 Integer(title
=_("Warning at"), minvalue
=0),
2943 Integer(title
=_("Critical at"), minvalue
=0),
2945 ("levels_exclusive",
2947 title
=_("Exclusive Locks"),
2949 Integer(title
=_("Warning at"), minvalue
=0),
2950 Integer(title
=_("Critical at"), minvalue
=0),
2952 ]), TextAscii(title
=_("Name of the database"),), "dict")
2954 register_check_parameters(
2955 RulespecGroupCheckParametersApplications
, "postgres_maintenance",
2956 _("PostgreSQL VACUUM and ANALYZE"),
2958 help=_("With this rule you can set limits for the VACUUM and ANALYZE operation of "
2959 "a PostgreSQL database. Keep in mind that each table within a database is checked "
2960 "with this limits."),
2964 title
=_("Time since the last VACUUM"),
2966 Age(title
=_("Warning if older than"), default_value
=86400 * 7),
2967 Age(title
=_("Critical if older than"), default_value
=86400 * 14)
2971 title
=_("Time since the last ANALYZE"),
2973 Age(title
=_("Warning if older than"), default_value
=86400 * 7),
2974 Age(title
=_("Critical if older than"), default_value
=86400 * 14)
2976 ("never_analyze_vacuum",
2978 title
=_("Age of never analyzed/vacuumed tables"),
2980 Age(title
=_("Warning if older than"), default_value
=86400 * 7),
2981 Age(title
=_("Critical if older than"), default_value
=86400 * 14)
2983 ]), TextAscii(title
=_("Name of the database"),), "dict")
2985 register_check_parameters(
2986 RulespecGroupCheckParametersApplications
, "f5_connections", _("F5 Loadbalancer Connections"),
2987 Dictionary(elements
=[
2990 title
=_("Max. number of connections"),
2992 default_levels
=(25000, 30000))),
2995 title
=_("Max. number of SSL connections"),
2997 default_levels
=(25000, 30000))),
2998 ("connections_rate",
3000 title
=_("Maximum connections per second"),
3002 default_levels
=(500, 1000))),
3003 ("connections_rate_lower",
3005 title
=_("Minimum connections per second"),
3007 Integer(title
=_("Warning at")),
3008 Integer(title
=_("Critical at")),
3013 title
=_("HTTP requests per second"), default_value
=None, default_levels
=(500, 1000))),
3016 register_check_parameters(
3017 RulespecGroupCheckParametersApplications
,
3018 "cisco_fw_connections",
3019 _("Cisco ASA Firewall Connections"),
3020 Dictionary(elements
=[
3023 help=_("This rule sets limits to the current number of connections through "
3024 "a Cisco ASA firewall."),
3025 title
=_("Maximum number of firewall connections"),
3027 Integer(title
=_("Warning at")),
3028 Integer(title
=_("Critical at")),
3036 register_check_parameters(
3037 RulespecGroupCheckParametersApplications
,
3038 "checkpoint_connections",
3039 _("Checkpoint Firewall Connections"),
3041 help=_("This rule sets limits to the current number of connections through "
3042 "a Checkpoint firewall."),
3043 title
=_("Maximum number of firewall connections"),
3045 Integer(title
=_("Warning at"), default_value
=40000),
3046 Integer(title
=_("Critical at"), default_value
=50000),
3053 register_check_parameters(
3054 RulespecGroupCheckParametersApplications
, "checkpoint_packets",
3055 _("Checkpoint Firewall Packet Rates"),
3056 Dictionary(elements
=[
3059 title
=_("Maximum Rate of Accepted Packets"),
3061 default_levels
=(100000, 200000),
3065 title
=_("Maximum Rate of Rejected Packets"),
3067 default_levels
=(100000, 200000),
3071 title
=_("Maximum Rate of Dropped Packets"),
3073 default_levels
=(100000, 200000),
3077 title
=_("Maximum Rate of Logged Packets"),
3079 default_levels
=(100000, 200000),
3083 register_check_parameters(
3084 RulespecGroupCheckParametersApplications
, "f5_pools", _("F5 Loadbalancer Pools"),
3086 title
=_("Minimum number of pool members"),
3088 Integer(title
=_("Warning if below"), unit
=_("Members ")),
3089 Integer(title
=_("Critical if below"), unit
=_("Members")),
3091 ), TextAscii(title
=_("Name of pool")), "first")
3093 register_check_parameters(
3094 RulespecGroupCheckParametersApplications
, "mysql_db_size", _("Size of MySQL databases"),
3097 Filesize(title
=_("warning at")),
3098 Filesize(title
=_("critical at")),
3100 help=_("The check will trigger a warning or critical state if the size of the "
3101 "database exceeds these levels."),
3102 title
=_("Impose limits on the size of the database"),
3105 title
=_("Name of the database"),
3106 help=_("Don't forget the instance: instance:dbname"),
3109 register_check_parameters(
3110 RulespecGroupCheckParametersApplications
,
3111 "postgres_sessions",
3112 _("PostgreSQL Sessions"),
3114 help=_("This check monitors the current number of active and idle sessions on PostgreSQL"),
3119 title
=_("Number of current sessions"),
3121 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
3122 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
3129 title
=_("Number of currently running sessions"),
3130 help=_("Levels for the number of sessions that are currently active"),
3132 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=10),
3133 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=20),
3143 register_check_parameters(
3144 RulespecGroupCheckParametersApplications
,
3145 "postgres_instance_sessions",
3146 _("PostgreSQL Sessions"),
3148 help=_("This check monitors the current number of active and idle sessions on PostgreSQL"),
3153 title
=_("Number of current sessions"),
3155 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
3156 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
3163 title
=_("Number of currently running sessions"),
3164 help=_("Levels for the number of sessions that are currently active"),
3166 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=10),
3167 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=20),
3172 TextAscii(title
=_("Instance")),
3176 register_check_parameters(
3177 RulespecGroupCheckParametersApplications
,
3179 _("Cisco SSl VPN Client Sessions"),
3181 title
=_("Number of active sessions"),
3182 help=_("This check monitors the current number of active sessions"),
3184 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
3185 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
3193 def convert_oracle_sessions(value
):
3194 if isinstance(value
, tuple):
3195 return {'sessions_abs': value
}
3196 if 'sessions_abs' not in value
:
3197 value
['sessions_abs'] = (100, 200)
3201 register_check_parameters(
3202 RulespecGroupCheckParametersApplications
,
3204 _("Oracle Sessions"),
3210 title
=_("Absolute levels of active sessions"),
3212 help=_("This check monitors the current number of active sessions on Oracle"),
3214 FixedValue(None, title
=_("Do not use absolute levels"), totext
=""),
3216 title
=_("Number of active sessions"),
3219 title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
3221 title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
3229 title
=_("Relative levels of active sessions."),
3231 _("Set upper levels of active sessions relative to max. number of sessions. This is optional."
3234 Percentage(title
=_("Warning at")),
3235 Percentage(title
=_("Critical at")),
3240 optional_keys
=["sessions_perc"],
3242 forth
=convert_oracle_sessions
),
3243 TextAscii(title
=_("Database name"), allow_empty
=False),
3247 register_check_parameters(
3248 RulespecGroupCheckParametersApplications
,
3251 Dictionary(elements
=[("levels",
3253 title
=_("Levels for minimum wait time for a lock"),
3255 Age(title
=_("warning if higher then"), default_value
=1800),
3256 Age(title
=_("critical if higher then"), default_value
=3600),
3258 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
3262 register_check_parameters(
3263 RulespecGroupCheckParametersApplications
,
3264 "oracle_longactivesessions",
3265 _("Oracle Long Active Sessions"),
3266 Dictionary(elements
=[("levels",
3268 title
=_("Levels of active sessions"),
3270 Integer(title
=_("Warning if more than"), unit
=_("sessions")),
3271 Integer(title
=_("Critical if more than"), unit
=_("sessions")),
3273 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
3277 register_check_parameters(
3278 RulespecGroupCheckParametersApplications
,
3279 "postgres_stat_database",
3280 _("PostgreSQL Database Statistics"),
3283 "This check monitors how often database objects in a PostgreSQL Database are accessed"),
3288 title
=_("Blocks read"),
3290 Float(title
=_("Warning at"), unit
=_("blocks/s")),
3291 Float(title
=_("Critical at"), unit
=_("blocks/s")),
3300 Float(title
=_("Warning at"), unit
=_("/s")),
3301 Float(title
=_("Critical at"), unit
=_("/s")),
3310 Float(title
=_("Warning at"), unit
=_("/s")),
3311 Float(title
=_("Critical at"), unit
=_("/s")),
3320 Float(title
=_("Warning at"), unit
=_("/s")),
3321 Float(title
=_("Critical at"), unit
=_("/s")),
3330 Float(title
=_("Warning at"), unit
=_("/s")),
3331 Float(title
=_("Critical at"), unit
=_("/s")),
3340 Float(title
=_("Warning at"), unit
=_("/s")),
3341 Float(title
=_("Critical at"), unit
=_("/s")),
3347 TextAscii(title
=_("Database name"), allow_empty
=False),
3351 register_check_parameters(
3352 RulespecGroupCheckParametersApplications
,
3354 _("DHCP Pools for Windows and Linux"),
3360 title
= _("Free leases levels"),
3363 title
= _("Free leases levels in percent"),
3365 Percentage(title
= _("Warning if below"), default_value
= 10.0),
3366 Percentage(title
= _("Critical if below"), default_value
= 5.0)
3370 title
= _("Absolute free leases levels"),
3372 Integer(title
= _("Warning if below"), unit
= _("free leases")),
3373 Integer(title
= _("Critical if below"), unit
= _("free leases"))
3381 title
= _("Used leases levels"),
3384 title
= _("Used leases levels in percent"),
3386 Percentage(title
= _("Warning if below")),
3387 Percentage(title
= _("Critical if below"))
3391 title
= _("Absolute used leases levels"),
3393 Integer(title
= _("Warning if below"), unit
= _("used leases")),
3394 Integer(title
= _("Critical if below"), unit
= _("used leases"))
3402 forth
= lambda params
: isinstance(params
, tuple) and {"free_leases" : (float(params
[0]), float(params
[1]))} or params
,
3405 title
= _("Pool name"),
3406 allow_empty
= False,
3408 match_type
= "first",
3411 register_check_parameters(
3412 RulespecGroupCheckParametersOperatingSystem
,
3414 _("Number of threads"),
3417 "These levels check the number of currently existing threads on the system. Each process has at "
3418 "least one thread."),
3420 Integer(title
=_("Warning at"), unit
=_("threads"), default_value
=1000),
3421 Integer(title
=_("Critical at"), unit
=_("threads"), default_value
=2000)
3427 register_check_parameters(
3428 RulespecGroupCheckParametersOperatingSystem
,
3430 _("Number of Logins on System"),
3432 help=_("This rule defines upper limits for the number of logins on a system."),
3434 Integer(title
=_("Warning at"), unit
=_("users"), default_value
=20),
3435 Integer(title
=_("Critical at"), unit
=_("users"), default_value
=30)
3441 register_check_parameters(
3442 RulespecGroupCheckParametersApplications
,
3444 _("Number of processes on OpenVMS"),
3447 Integer(title
=_("Warning at"), unit
=_("processes"), default_value
=100),
3448 Integer(title
=_("Critical at"), unit
=_("processes"), default_value
=200)
3450 title
=_("Impose levels on number of processes"),
3456 register_check_parameters(
3457 RulespecGroupCheckParametersOperatingSystem
, "vm_counter",
3458 _("Number of kernel events per second"),
3460 help=_("This ruleset applies to several similar checks measing various kernel "
3461 "events like context switches, process creations and major page faults. "
3462 "Please create separate rules for each type of kernel counter you "
3463 "want to set levels for."),
3464 unit
=_("events per second"),
3465 default_levels
=(1000, 5000),
3466 default_difference
=(500.0, 1000.0),
3470 title
=_("kernel counter"),
3471 choices
=[("Context Switches", _("Context Switches")),
3472 ("Process Creations", _("Process Creations")),
3473 ("Major Page Faults", _("Major Page Faults"))]), "first")
3475 register_check_parameters(
3476 RulespecGroupCheckParametersStorage
,
3477 "ibm_svc_total_latency",
3478 _("IBM SVC: Levels for total disk latency"),
3479 Dictionary(elements
=[
3482 title
=_("Read latency"),
3485 default_levels
=(50.0, 100.0))),
3488 title
=_("Write latency"),
3491 default_levels
=(50.0, 100.0))),
3495 ("Drives", _("Total latency for all drives")),
3496 ("MDisks", _("Total latency for all MDisks")),
3497 ("VDisks", _("Total latency for all VDisks")),
3499 title
=_("Disk/Drive type"),
3500 help=_("Please enter <tt>Drives</tt>, <tt>Mdisks</tt> or <tt>VDisks</tt> here.")),
3505 def transform_ibm_svc_host(params
):
3507 # Old inventory rule until version 1.2.7
3508 # params were None instead of emtpy dictionary
3509 params
= {'always_ok': False}
3511 if 'always_ok' in params
:
3512 if params
['always_ok'] is False:
3513 params
= {'degraded_hosts': (1, 1), 'offline_hosts': (1, 1), 'other_hosts': (1, 1)}
3519 register_check_parameters(
3520 RulespecGroupCheckParametersStorage
,
3522 _("IBM SVC: Options for SVC Hosts Check"),
3524 Dictionary(elements
=[
3528 title
=_("Count of active hosts"),
3530 Integer(title
=_("Warning at or below"), minvalue
=0, unit
=_("active hosts")),
3532 title
=_("Critical at or below"), minvalue
=0, unit
=_("active hosts")),
3538 title
=_("Count of inactive hosts"),
3541 title
=_("Warning at or above"), minvalue
=0, unit
=_("inactive hosts")),
3543 title
=_("Critical at or above"), minvalue
=0, unit
=_("inactive hosts")),
3549 title
=_("Count of degraded hosts"),
3552 title
=_("Warning at or above"), minvalue
=0, unit
=_("degraded hosts")),
3554 title
=_("Critical at or above"), minvalue
=0, unit
=_("degraded hosts")),
3560 title
=_("Count of offline hosts"),
3563 title
=_("Warning at or above"), minvalue
=0, unit
=_("offline hosts")),
3565 title
=_("Critical at or above"), minvalue
=0, unit
=_("offline hosts")),
3571 title
=_("Count of other hosts"),
3573 Integer(title
=_("Warning at or above"), minvalue
=0, unit
=_("other hosts")),
3574 Integer(title
=_("Critical at or above"), minvalue
=0, unit
=_("other hosts")),
3578 forth
=transform_ibm_svc_host
,
3584 register_check_parameters(
3585 RulespecGroupCheckParametersStorage
,
3587 _("IBM SVC: Options for SVC Disk Check"),
3589 optional_keys
=False,
3594 title
=_("Resulting state if disk is online"),
3601 title
=_("Resulting state if disk is degraded"),
3608 title
=_("Resulting state if disk is offline"),
3615 title
=_("Resulting state if disk is excluded"),
3622 title
=_("Resulting state if disk is in managed mode"),
3629 title
=_("Resulting state if disk is in array mode"),
3636 title
=_("Resulting state if disk is in image mode"),
3643 title
=_("Resulting state if disk is in unmanaged mode"),
3649 title
=_("IBM SVC disk"),
3650 help=_("Name of the disk, e.g. mdisk0"),
3655 register_check_parameters(
3656 RulespecGroupCheckParametersStorage
,
3658 _("Levels for disk IO"),
3661 "With this rule you can set limits for various disk IO statistics. "
3662 "Keep in mind that not all of these settings may be applicable for the actual "
3663 "check. For example, if the check doesn't provide a <i>Read wait</i> information in its "
3664 "output, any configuration setting referring to <i>Read wait</i> will have no effect."),
3668 title
=_("Read throughput"),
3670 default_levels
=(50.0, 100.0),
3674 title
=_("Write throughput"),
3676 default_levels
=(50.0, 100.0),
3680 title
=_("Disk Utilization"),
3682 default_levels
=(80.0, 90.0),
3685 title
=_("Disk Latency"),
3687 default_levels
=(80.0, 160.0),
3689 ("read_wait", Levels(title
=_("Read wait"), unit
=_("ms"), default_levels
=(30.0, 50.0))),
3690 ("write_wait", Levels(title
=_("Write wait"), unit
=_("ms"), default_levels
=(30.0,
3694 title
=_("Averaging"),
3696 "When averaging is set, then all of the disk's metrics are averaged "
3697 "over the selected interval - rather then the check interval. This allows "
3698 "you to make your monitoring less reactive to short peaks. But it will also "
3699 "introduce a loss of accuracy in your graphs. "),
3703 Levels(title
=_("Read operations"), unit
=_("1/s"), default_levels
=(400.0, 600.0))),
3705 Levels(title
=_("Write operations"), unit
=_("1/s"), default_levels
=(300.0, 400.0))),
3710 "For a summarized throughput of all disks, specify <tt>SUMMARY</tt>, "
3711 "a per-disk IO is specified by the drive letter, a colon and a slash on Windows "
3712 "(e.g. <tt>C:/</tt>) or by the device name on Linux/UNIX (e.g. <tt>/dev/sda</tt>).")),
3716 register_check_parameters(
3717 RulespecGroupCheckParametersStorage
, "disk_io", _("Levels on disk IO (old style checks)"),
3718 Dictionary(elements
=[
3721 title
=_("Read throughput"),
3724 default_levels
=(50.0, 100.0))),
3727 title
=_("Write throughput"),
3730 default_levels
=(50.0, 100.0))),
3734 help=_("When averaging is set, a floating average value "
3735 "of the disk throughput is computed and the levels for read "
3736 "and write will be applied to the average instead of the current "
3740 unit
=_("minutes"))),
3743 title
=_("IO Latency"),
3745 Float(title
=_("warning at"), unit
=_("ms"), default_value
=80.0),
3746 Float(title
=_("critical at"), unit
=_("ms"), default_value
=160.0),
3751 title
=_("Performance Data for Latency"),
3752 label
=_("Collect performance data for disk latency"),
3753 help=_("Note: enabling performance data for the latency might "
3754 "cause incompatibilities with existing historical data "
3755 "if you are running PNP4Nagios in SINGLE mode.")),
3759 title
=_("Read Queue-Length"),
3761 Float(title
=_("warning at"), default_value
=80.0),
3762 Float(title
=_("critical at"), default_value
=90.0),
3766 title
=_("Write Queue-Length"),
3768 Float(title
=_("warning at"), default_value
=80.0),
3769 Float(title
=_("critical at"), default_value
=90.0),
3774 title
=_("Performance Data for Queue Length"),
3775 label
=_("Collect performance data for disk latency"),
3776 help=_("Note: enabling performance data for the latency might "
3777 "cause incompatibilities with existing historical data "
3778 "if you are running PNP4Nagios in SINGLE mode.")),
3784 "For a summarized throughput of all disks, specify <tt>SUMMARY</tt>, for a "
3785 "sum of read or write throughput write <tt>read</tt> or <tt>write</tt> resp. "
3786 "A per-disk IO is specified by the drive letter, a colon and a slash on Windows "
3787 "(e.g. <tt>C:/</tt>) or by the device name on Linux/UNIX (e.g. <tt>/dev/sda</tt>).")),
3791 RulespecGroupCheckParametersStorage
,
3792 "diskstat_inventory",
3794 title
=_("Discovery mode for Disk IO check"),
3795 help=_("This rule controls which and how many checks will be created "
3796 "for monitoring individual physical and logical disks. "
3797 "Note: the option <i>Create a summary for all read, one for "
3798 "write</i> has been removed. Some checks will still support "
3799 "this settings, but it will be removed there soon."),
3801 ("summary", _("Create a summary over all physical disks")),
3802 # This option is still supported by some checks, but is deprecated and
3804 # ( "legacy", _("Create a summary for all read, one for write") ),
3805 ("physical", _("Create a separate check for each physical disk")),
3806 ("lvm", _("Create a separate check for each LVM volume (Linux)")),
3807 ("vxvm", _("Creata a separate check for each VxVM volume (Linux)")),
3808 ("diskless", _("Creata a separate check for each partition (XEN)")),
3810 default_value
=['summary'],
3815 def transform_if_groups_forth(params
):
3816 for param
in params
:
3817 if param
.get("name"):
3818 param
["group_name"] = param
["name"]
3820 if param
.get("include_items"):
3821 param
["items"] = param
["include_items"]
3822 del param
["include_items"]
3823 if param
.get("single") is not None:
3825 param
["group_presence"] = "instead"
3827 param
["group_presence"] = "separate"
3832 vs_elements_if_groups_matches
= [
3836 title
=_("Select interface port type"),
3837 choices
=defines
.interface_port_types(),
3838 help=_("Only interfaces with the given port type are put into this group. "
3839 "For example 53 (propVirtual)."),
3846 title
=_("Restrict interface items"),
3847 help=_("Only interface with these item names are put into this group."),
3851 vs_elements_if_groups_group
= [
3854 title
=_("Group name"),
3855 help=_("Name of group in service description"),
3860 title
=_("Group interface presence"),
3861 help=_("Determine whether the group interface is created as an "
3862 "separate service or not. In second case the choosen interface "
3863 "services disapear."),
3865 ("separate", _("List grouped interfaces separately")),
3866 ("instead", _("List grouped interfaces instead")),
3868 default_value
="instead",
3873 RulespecGroupCheckParametersNetworking
,
3874 varname
="if_groups",
3875 title
=_('Network interface groups'),
3877 'Normally the Interface checks create a single service for interface. '
3878 'By defining if-group patterns multiple interfaces can be combined together. '
3879 'A single service is created for this interface group showing the total traffic amount '
3880 'of its members. You can configure if interfaces which are identified as group interfaces '
3881 'should not show up as single service. You can restrict grouped interfaces by iftype and the '
3882 'item name of the single interface.'),
3883 valuespec
=Transform(
3888 title
=_("Groups on single host"),
3889 add_label
=_("Add pattern"),
3890 valuespec
=Dictionary(
3891 elements
=vs_elements_if_groups_group
+ vs_elements_if_groups_matches
,
3892 required_keys
=["group_name", "group_presence"]),
3896 title
=_("Groups on cluster"),
3897 add_label
=_("Add pattern"),
3898 valuespec
=Dictionary(
3899 elements
=vs_elements_if_groups_group
+
3902 title
=_("Patterns for each node"),
3903 add_label
=_("Add pattern"),
3904 valuespec
=Dictionary(
3905 elements
=[("node_name", TextAscii(title
=_("Node name")))] +
3906 vs_elements_if_groups_matches
,
3907 required_keys
=["node_name"]),
3913 forth
=transform_if_groups_forth
),
3918 RulespecGroupCheckParametersDiscovery
,
3919 varname
="winperf_msx_queues_inventory",
3920 title
=_('MS Exchange Message Queues Discovery'),
3922 'Per default the offsets of all Windows performance counters are preconfigured in the check. '
3923 'If the format of your counters object is not compatible then you can adapt the counter '
3924 'offsets manually.'),
3927 orientation
="horizontal",
3930 title
=_("Name of Counter"),
3931 help=_("Name of the Counter to be monitored."),
3937 help=_("The offset of the information relative to counter base"),
3942 add_label
=_("Add Counter")),
3946 mailqueue_params
= Dictionary(
3951 title
=_("Mails in outgoing mail queue/deferred mails"),
3952 help=_("This rule is applied to the number of E-Mails currently "
3953 "in the deferred mail queue, or in the general outgoing mail "
3954 "queue, if such a distinction is not available."),
3956 Integer(title
=_("Warning at"), unit
=_("mails"), default_value
=10),
3957 Integer(title
=_("Critical at"), unit
=_("mails"), default_value
=20),
3964 title
=_("Mails in active mail queue"),
3965 help=_("This rule is applied to the number of E-Mails currently "
3966 "in the active mail queue"),
3968 Integer(title
=_("Warning at"), unit
=_("mails"), default_value
=800),
3969 Integer(title
=_("Critical at"), unit
=_("mails"), default_value
=1000),
3974 optional_keys
=["active"],
3977 register_check_parameters(
3978 RulespecGroupCheckParametersApplications
,
3980 _("Number of mails in outgoing mail queue"),
3983 forth
=lambda old
: not isinstance(old
, dict) and {"deferred": old
} or old
,
3990 register_check_parameters(
3991 RulespecGroupCheckParametersApplications
,
3992 "mail_queue_length",
3993 _("Number of mails in outgoing mail queue"),
3996 forth
=lambda old
: not isinstance(old
, dict) and {"deferred": old
} or old
,
3998 TextAscii(title
=_("Mail queue name")),
4002 register_check_parameters(
4003 RulespecGroupCheckParametersApplications
, "mail_latency", _("Mail Latency"),
4005 title
=_("Upper levels for Mail Latency"),
4007 Age(title
=_("Warning at"), default_value
=40),
4008 Age(title
=_("Critical at"), default_value
=60),
4011 register_check_parameters(
4012 RulespecGroupCheckParametersStorage
,
4014 _("ZFS storage pool status"),
4020 register_check_parameters(
4021 RulespecGroupCheckParametersVirtualization
,
4023 _("Overall state of a virtual machine (for example ESX VMs)"),
4029 register_check_parameters(
4030 RulespecGroupCheckParametersHardware
,
4032 _("Simple checks for BIOS/Hardware errors"),
4038 register_check_parameters(
4039 RulespecGroupCheckParametersApplications
, "omd_status", _("OMD site status"), None,
4041 title
=_("Name of the OMD site"),
4042 help=_("The name of the OMD site to check the status for")), "first")
4044 register_check_parameters(
4045 RulespecGroupCheckParametersStorage
, "network_fs",
4046 _("Network filesystem - overall status (e.g. NFS)"),
4052 title
=_("Performance data settings"),
4054 (True, _("Enable performance data")),
4055 (False, _("Disable performance data")),
4057 default_value
=False),
4061 title
=_("Name of the mount point"), help=_("For NFS enter the name of the mount point.")),
4064 register_check_parameters(
4065 RulespecGroupCheckParametersStorage
,
4066 "windows_multipath",
4067 _("Windows Multipath Count"),
4069 help=_("This rules sets the expected number of active paths for a multipath LUN."),
4070 title
=_("Expected number of active paths"),
4072 Integer(title
=_("Expected number of active paths")),
4074 title
=_("Expected percentage of active paths"),
4076 Integer(title
=_("Expected number of active paths")),
4077 Percentage(title
=_("Warning if less then")),
4078 Percentage(title
=_("Critical if less then")),
4085 register_check_parameters(
4086 RulespecGroupCheckParametersStorage
, "multipath", _("Linux and Solaris Multipath Count"),
4088 help=_("This rules sets the expected number of active paths for a multipath LUN "
4089 "on Linux and Solaris hosts"),
4090 title
=_("Expected number of active paths"),
4092 Integer(title
=_("Expected number of active paths")),
4094 title
=_("Expected percentage of active paths"),
4096 Percentage(title
=_("Warning if less then")),
4097 Percentage(title
=_("Critical if less then")),
4101 title
=_("Name of the MP LUN"),
4102 help=_("For Linux multipathing this is either the UUID (e.g. "
4103 "60a9800043346937686f456f59386741), or the configured "
4104 "alias.")), "first")
4107 RulespecGroupCheckParametersStorage
,
4108 varname
="inventory_multipath_rules",
4109 title
=_("Linux Multipath Inventory"),
4110 valuespec
=Dictionary(
4114 title
=_("Use the multipath alias as service name, if one is set"),
4115 label
=_("use alias"),
4117 "If a multipath device has an alias then you can use it for specifying "
4118 "the device instead of the UUID. The alias will then be part of the service "
4119 "description. The UUID will be displayed in the plugin output."))),
4122 "This rule controls whether the UUID or the alias is used in the service description during "
4123 "discovery of Multipath devices on Linux."),
4128 register_check_parameters(
4129 RulespecGroupCheckParametersStorage
, "multipath_count", _("ESX Multipath Count"),
4131 help=_("This rules sets the expected number of active paths for a multipath LUN "
4133 title
=_("Match type"),
4137 title
=_("OK if standby count is zero or equals active paths."),
4141 title
=_("Custom settings"),
4148 Integer(title
=_("Critical if less than")),
4149 Integer(title
=_("Warning if less than")),
4150 Integer(title
=_("Warning if more than")),
4151 Integer(title
=_("Critical if more than")),
4153 forth
=lambda x
: len(x
) == 2 and (0, 0, x
[0], x
[1]) or x
))
4155 description
) in [("active", _("Active paths")), (
4156 "dead", _("Dead paths")), (
4157 "disabled", _("Disabled paths")), (
4158 "standby", _("Standby paths")), ("unknown",
4159 _("Unknown paths"))]
4161 ]), TextAscii(title
=_("Path ID")), "first")
4163 register_check_parameters(
4164 RulespecGroupCheckParametersStorage
, "hpux_multipath", _("HP-UX Multipath Count"),
4166 title
=_("Expected path situation"),
4167 help=_("This rules sets the expected number of various paths for a multipath LUN "
4170 Integer(title
=_("Number of active paths")),
4171 Integer(title
=_("Number of standby paths")),
4172 Integer(title
=_("Number of failed paths")),
4173 Integer(title
=_("Number of unopen paths")),
4174 ]), TextAscii(title
=_("WWID of the LUN")), "first")
4176 register_check_parameters(
4177 RulespecGroupCheckParametersStorage
,
4179 _("DR:BD roles and diskstates"),
4180 Dictionary(elements
=[(
4185 FixedValue(None, totext
="", title
=_("Do not monitor")),
4188 orientation
="horizontal",
4191 title
=_("DRBD shows up as"),
4192 default_value
="running",
4193 choices
=[("primary_secondary", _("Primary / Secondary")
4194 ), ("primary_primary", _("Primary / Primary")
4195 ), ("secondary_primary", _("Secondary / Primary")
4196 ), ("secondary_secondary",
4197 _("Secondary / Secondary"))]),
4198 MonitoringState(title
=_("Resulting state"),),
4200 default_value
=("ignore", 0)),
4201 title
=_("Set roles"),
4202 add_label
=_("Add role rule"))
4207 title
=_("Diskstates"),
4209 FixedValue(None, totext
="", title
=_("Do not monitor")),
4214 title
=_("Diskstate"),
4216 ("primary_Diskless",
4217 _("Primary - Diskless")),
4218 ("primary_Attaching",
4219 _("Primary - Attaching")),
4220 ("primary_Failed", _("Primary - Failed")),
4221 ("primary_Negotiating",
4222 _("Primary - Negotiating")),
4223 ("primary_Inconsistent",
4224 _("Primary - Inconsistent")),
4225 ("primary_Outdated",
4226 _("Primary - Outdated")),
4227 ("primary_DUnknown",
4228 _("Primary - DUnknown")),
4229 ("primary_Consistent",
4230 _("Primary - Consistent")),
4231 ("primary_UpToDate",
4232 _("Primary - UpToDate")),
4233 ("secondary_Diskless",
4234 _("Secondary - Diskless")),
4235 ("secondary_Attaching",
4236 _("Secondary - Attaching")),
4237 ("secondary_Failed",
4238 _("Secondary - Failed")),
4239 ("secondary_Negotiating",
4240 _("Secondary - Negotiating")),
4241 ("secondary_Inconsistent",
4242 _("Secondary - Inconsistent")),
4243 ("secondary_Outdated",
4244 _("Secondary - Outdated")),
4245 ("secondary_DUnknown",
4246 _("Secondary - DUnknown")),
4247 ("secondary_Consistent",
4248 _("Secondary - Consistent")),
4249 ("secondary_UpToDate",
4250 _("Secondary - UpToDate")),
4252 MonitoringState(title
=_("Resulting state"))
4254 orientation
="horizontal",
4256 title
=_("Set diskstates"),
4257 add_label
=_("Add diskstate rule"))
4260 TextAscii(title
=_("DRBD device")),
4264 register_check_parameters(
4265 RulespecGroupCheckParametersStorage
,
4267 _("NetApp Snapvaults / Snapmirror Lag Time"),
4273 title
=_("Default levels"),
4275 Age(title
=_("Warning at")),
4276 Age(title
=_("Critical at")),
4283 orientation
="horizontal",
4285 TextAscii(title
=_("Policy name")),
4287 title
=_("Maximum age"),
4289 Age(title
=_("Warning at")),
4290 Age(title
=_("Critical at")),
4294 title
=_('Policy specific levels (Clustermode only)'),
4296 "Here you can specify levels for different policies which overrule the levels "
4297 "from the <i>Default levels</i> parameter. This setting only works in NetApp Clustermode setups."
4301 TextAscii(title
=_("Source Path"), allow_empty
=False),
4305 register_check_parameters(
4306 RulespecGroupCheckParametersStorage
,
4308 _("NetApp Snapshot Reserve"),
4313 title
=_("Levels for used configured reserve"),
4315 Percentage(title
=_("Warning at or above"), unit
="%", default_value
=85.0),
4316 Percentage(title
=_("Critical at or above"), unit
="%", default_value
=90.0),
4318 ("state_noreserve", MonitoringState(title
=_("State if no reserve is configured"),)),
4320 TextAscii(title
=_("Volume name")),
4324 register_check_parameters(
4325 RulespecGroupCheckParametersStorage
,
4327 _("Filer Disk Levels (NetApp, IBM SVC)"),
4331 ("failed_spare_ratio",
4333 title
=_("Failed to spare ratio"),
4334 help=_("You can set a limit to the failed to spare disk ratio. "
4335 "The ratio is calculated with <i>spare / (failed + spare)</i>."),
4337 Percentage(title
=_("Warning at or above"), default_value
=1.0),
4338 Percentage(title
=_("Critical at or above"), default_value
=50.0),
4340 ("offline_spare_ratio",
4342 title
=_("Offline to spare ratio"),
4343 help=_("You can set a limit to the offline to spare disk ratio. "
4344 "The ratio is calculated with <i>spare / (offline + spare)</i>."),
4346 Percentage(title
=_("Warning at or above"), default_value
=1.0),
4347 Percentage(title
=_("Critical at or above"), default_value
=50.0),
4349 ("number_of_spare_disks",
4351 title
=_("Number of spare disks"),
4352 help=_("You can set a lower limit to the absolute number of spare disks."),
4354 Integer(title
=_("Warning below"), default_value
=2, min_value
=0),
4355 Integer(title
=_("Critical below"), default_value
=1, min_value
=0),
4359 lambda a
: "broken_spare_ratio" in a
and {"failed_spare_ratio": a
["broken_spare_ratio"]} or a
4365 register_check_parameters(
4366 RulespecGroupCheckParametersStorage
,
4368 _("NetApp Volumes"),
4369 Dictionary(elements
=[
4372 title
=_("Levels for volume"),
4373 show_alternative_title
=True,
4374 default_value
=(80.0, 90.0),
4375 match
=match_dual_level_type
,
4377 get_free_used_dynamic_valuespec("used", "volume"),
4379 get_free_used_dynamic_valuespec("free", "volume", default_value
=(20.0, 10.0)),
4381 forth
=transform_filesystem_free
,
4382 back
=transform_filesystem_free
)
4386 title
=_("Performance data for protocols"),
4387 help=_("Specify for which protocol performance data should get recorded."),
4389 ("", _("Summarized data of all protocols")),
4391 ("cifs", _("CIFS")),
4394 ("iscsi", _("iSCSI")),
4399 title
=_("Magic factor (automatic level adaptation for large volumes)"),
4405 title
=_("Reference size for magic factor"), default_value
=20, minvalue
=1, unit
=_("GB"))
4409 title
=_("Minimum levels if using magic factor"),
4410 help=_("The volume levels will never fall below these values, when using "
4411 "the magic factor and the volume is very small."),
4414 title
=_("Warning if above"),
4419 title
=_("Critical if above"),
4426 title
=_("Levels for Inodes"),
4427 help=_("The number of remaining inodes on the filesystem. "
4428 "Please note that this setting has no effect on some filesystem checks."),
4431 title
=_("Percentage free"),
4433 Percentage(title
=_("Warning if less than")),
4434 Percentage(title
=_("Critical if less than")),
4437 title
=_("Absolute free"),
4440 title
=_("Warning if less than"),
4444 default_value
=10000),
4446 title
=_("Critical if less than"),
4450 default_value
=5000),
4453 default_value
=(10.0, 5.0),
4457 title
=_("Display inode usage in check output..."),
4459 ("onproblem", _("Only in case of a problem")),
4460 ("onlow", _("Only in case of a problem or if inodes are below 50%")),
4461 ("always", _("Always")),
4463 default_value
="onlow",
4468 title
=_("Time Range for filesystem trend computation"),
4472 title
=_("Trend computation"),
4473 label
=_("Enable trend computation"))),
4476 title
=_("Levels on trends in MB per time range"),
4478 Integer(title
=_("Warning at"), unit
=_("MB / range"), default_value
=100),
4479 Integer(title
=_("Critical at"), unit
=_("MB / range"), default_value
=200)
4483 title
=_("Levels for the percentual growth per time range"),
4486 title
=_("Warning at"),
4487 unit
=_("% / range"),
4491 title
=_("Critical at"),
4492 unit
=_("% / range"),
4498 title
=_("Levels on the time left until the filesystem gets full"),
4501 title
=_("Warning if below"),
4506 title
=_("Critical if below"),
4511 ("trend_showtimeleft",
4513 title
=_("Display time left in check output"),
4515 help=_("Normally, the time left until the disk is full is only displayed when "
4516 "the configured levels have been breached. If you set this option "
4517 "the check always reports this information"))),
4520 title
=_("Trend performance data"),
4521 label
=_("Enable generation of performance data from trends"))),
4523 TextAscii(title
=_("Volume name")),
4527 register_check_parameters(
4528 RulespecGroupCheckParametersStorage
,
4532 title
=_("Configure levels for used space"),
4536 title
=_("Ignore used space (this option disables any other options)"),
4538 "Some luns, e.g. jfs formatted, tend to report incorrect used space values"),
4539 label
=_("Ignore used space"),
4545 title
=_("Levels for LUN"),
4546 show_alternative_title
=True,
4547 default_value
=(80.0, 90.0),
4548 match
=match_dual_level_type
,
4550 get_free_used_dynamic_valuespec("used", "LUN"),
4552 get_free_used_dynamic_valuespec("free", "LUN", default_value
=(20.0, 10.0)),
4554 forth
=transform_filesystem_free
,
4555 back
=transform_filesystem_free
,
4561 title
=_("Time Range for lun filesystem trend computation"),
4565 title
=_("Trend computation"),
4566 label
=_("Enable trend computation"))),
4569 title
=_("Levels on trends in MB per time range"),
4571 Integer(title
=_("Warning at"), unit
=_("MB / range"), default_value
=100),
4572 Integer(title
=_("Critical at"), unit
=_("MB / range"), default_value
=200)
4576 title
=_("Levels for the percentual growth per time range"),
4579 title
=_("Warning at"),
4580 unit
=_("% / range"),
4584 title
=_("Critical at"),
4585 unit
=_("% / range"),
4591 title
=_("Levels on the time left until the lun filesystem gets full"),
4594 title
=_("Warning if below"),
4599 title
=_("Critical if below"),
4604 ("trend_showtimeleft",
4606 title
=_("Display time left in check output"),
4609 "Normally, the time left until the lun filesystem is full is only displayed when "
4610 "the configured levels have been breached. If you set this option "
4611 "the check always reports this information"))),
4614 title
=_("Trend performance data"),
4615 label
=_("Enable generation of performance data from trends"))),
4618 title
=_("LUN is read-only"),
4619 help=_("Display a warning if a LUN is not read-only. Without "
4620 "this setting a warning will be displayed if a LUN is "
4622 label
=_("Enable"))),
4624 TextAscii(title
=_("LUN name")),
4628 register_check_parameters(
4629 RulespecGroupCheckParametersApplications
,
4631 _("Windows Services"),
4632 Dictionary(elements
=[
4633 ("additional_servicenames",
4635 title
=_("Alternative names for the service"),
4636 help=_("Here you can specify alternative names that the service might have. "
4637 "This helps when the exact spelling of the services can changed from "
4638 "one version to another."),
4643 orientation
="horizontal",
4646 title
=_("Expected state"),
4647 default_value
="running",
4649 _("ignore the state")), ("running",
4650 _("running")), ("stopped",
4653 title
=_("Start type"),
4654 default_value
="auto",
4656 (None, _("ignore the start type")),
4659 ("disabled", _("disabled")),
4660 ("auto", _("auto")),
4661 ("unknown", _("unknown (old agent)")),
4663 MonitoringState(title
=_("Resulting state"),),
4665 default_value
=("running", "auto", 0)),
4666 title
=_("Services states"),
4667 help=_("You can specify a separate monitoring state for each possible "
4668 "combination of service state and start type. If you do not use "
4669 "this parameter, then only running/auto will be assumed to be OK."),
4673 title
=_("State if no entry matches"),
4679 title
=_("Add custom icon or action"),
4680 help=_("You can assign icons or actions to the found services in the status GUI."),
4684 title
=_("Name of the service"),
4685 help=_("Please Please note, that the agent replaces spaces in "
4686 "the service names with underscores. If you are unsure about the "
4687 "correct spelling of the name then please look at the output of "
4688 "the agent (cmk -d HOSTNAME). The service names are in the first "
4689 "column of the section <<<services>>>. Please "
4690 "do not mix up the service name with the display name of the service."
4691 "The latter one is just being displayed as a further information."),
4696 register_check_parameters(
4697 RulespecGroupCheckParametersApplications
,
4699 _("Solaris Services"),
4702 ("additional_servicenames",
4704 title
=_("Alternative names for the service"),
4705 help=_("Here you can specify alternative names that the service might have. "
4706 "This helps when the exact spelling of the services can changed from "
4707 "one version to another."),
4712 orientation
="horizontal",
4715 title
=_("Expected state"),
4717 (None, _("Ignore the state")),
4718 ("online", _("Online")),
4719 ("disabled", _("Disabled")),
4720 ("maintenance", _("Maintenance")),
4721 ("legacy_run", _("Legacy run")),
4726 (None, _("Ignore")),
4727 (True, _("Has changed")),
4728 (False, _("Did not changed")),
4730 MonitoringState(title
=_("Resulting state"),),
4733 title
=_("Services states"),
4734 help=_("You can specify a separate monitoring state for each possible "
4735 "combination of service state. If you do not use this parameter, "
4736 "then only online/legacy_run will be assumed to be OK."),
4738 ("else", MonitoringState(
4739 title
=_("State if no entry matches"),
4743 TextAscii(title
=_("Name of the service"), allow_empty
=False),
4747 register_check_parameters(
4748 RulespecGroupCheckParametersApplications
,
4749 "winperf_ts_sessions",
4750 _("Windows Terminal Server Sessions"),
4752 help=_("This check monitors number of active and inactive terminal "
4753 "server sessions."),
4758 title
=_("Number of active sessions"),
4760 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
4761 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
4768 title
=_("Number of inactive sessions"),
4769 help=_("Levels for the number of sessions that are currently inactive"),
4771 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=10),
4772 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=20),
4781 register_check_parameters(
4782 RulespecGroupCheckParametersStorage
, "raid", _("RAID: overall state"), None,
4784 title
=_("Name of the device"),
4785 help=_("For Linux MD specify the device name without the "
4786 "<tt>/dev/</tt>, e.g. <tt>md0</tt>, for hardware raids "
4787 "please refer to the manual of the actual check being used.")), "first")
4789 register_check_parameters(
4790 RulespecGroupCheckParametersStorage
, "raid_summary", _("RAID: summary state"),
4791 Dictionary(elements
=[
4792 ("use_device_states",
4794 title
=_("Use device states and overwrite expected status"),
4796 (False, _("Ignore")),
4797 (True, _("Use device states")),
4803 register_check_parameters(
4804 RulespecGroupCheckParametersStorage
, "raid_disk", _("RAID: state of a single disk"),
4806 Dictionary(elements
=[
4810 title
=_("Expected state"),
4811 help=_("State the disk is expected to be in. Typical good states "
4812 "are online, host spare, OK and the like. The exact way of how "
4813 "to specify a state depends on the check and hard type being used. "
4814 "Please take examples from discovered checks for reference.")),
4816 ("use_device_states",
4818 title
=_("Use device states and overwrite expected status"),
4820 (False, _("Ignore")),
4821 (True, _("Use device states")),
4826 forth
=lambda x
: isinstance(x
, str) and {"expected_state": x
} or x
,
4829 title
=_("Number or ID of the disk"),
4830 help=_("How the disks are named depends on the type of hardware being "
4831 "used. Please look at already discovered checks for examples.")), "first")
4833 register_check_parameters(
4834 RulespecGroupCheckParametersStorage
, "pfm_health", _("PCIe flash module"),
4838 "health_lifetime_perc",
4840 title
=_("Lower levels for health lifetime"),
4842 Percentage(title
=_("Warning if below"), default_value
=10),
4843 Percentage(title
=_("Critical if below"), default_value
=5)
4849 title
=_("Number or ID of the disk"),
4850 help=_("How the disks are named depends on the type of hardware being "
4851 "used. Please look at already discovered checks for examples.")), "dict")
4853 register_check_parameters(
4854 RulespecGroupCheckParametersEnvironment
,
4856 _("Switch contact state"),
4858 help=_("This rule sets the required state of a switch contact"),
4859 label
=_("Required switch contact state"),
4861 ("open", "Switch contact is <b>open</b>"),
4862 ("closed", "Switch contact is <b>closed</b>"),
4863 ("ignore", "Ignore switch contact state"),
4866 TextAscii(title
=_("Sensor"), allow_empty
=False),
4870 register_check_parameters(
4871 RulespecGroupCheckParametersEnvironment
,
4873 _("State of PDU Plugs"),
4875 help=_("This rule sets the required state of a PDU plug. It is meant to "
4876 "be independent of the hardware manufacturer."),
4877 title
=_("Required plug state"),
4879 ("on", _("Plug is ON")),
4880 ("off", _("Plug is OFF")),
4882 default_value
="on"),
4884 title
=_("Plug item number or name"),
4886 _("Whether you need the number or the name depends on the check. Just take a look to the service description."
4892 # New temperature rule for modern temperature checks that have the
4893 # sensor type (e.g. "CPU", "Chassis", etc.) as the beginning of their
4894 # item (e.g. "CPU 1", "Chassis 17/11"). This will replace all other
4895 # temperature rulesets in future. Note: those few temperature checks
4896 # that do *not* use an item, need to be converted to use one single
4897 # item (other than None).
4898 register_check_parameters(
4899 RulespecGroupCheckParametersEnvironment
,
4903 Dictionary(elements
=[
4906 title
=_("Upper Temperature Levels"),
4908 Float(title
=_("Warning at"), unit
=u
"°C", default_value
=26),
4909 Float(title
=_("Critical at"), unit
=u
"°C", default_value
=30),
4913 title
=_("Lower Temperature Levels"),
4915 Float(title
=_("Warning below"), unit
=u
"°C", default_value
=0),
4916 Float(title
=_("Critical below"), unit
=u
"°C", default_value
=-10),
4920 title
=_("Display values in "),
4922 ("c", _("Celsius")),
4923 ("f", _("Fahrenheit")),
4928 title
=_("Override unit of sensor"),
4929 help=_("In some rare cases the unit that is signalled by the sensor "
4930 "is wrong and e.g. the sensor sends values in Fahrenheit while "
4931 "they are misinterpreted as Celsius. With this setting you can "
4932 "force the reading of the sensor to be interpreted as customized. "),
4934 ("c", _("Celsius")),
4935 ("f", _("Fahrenheit")),
4938 ("device_levels_handling",
4940 title
=_("Interpretation of the device's own temperature status"),
4942 ("usr", _("Ignore device's own levels")),
4943 ("dev", _("Only use device's levels, ignore yours")),
4944 ("best", _("Use least critical of your and device's levels")),
4945 ("worst", _("Use most critical of your and device's levels")),
4946 ("devdefault", _("Use device's levels if present, otherwise yours")),
4947 ("usrdefault", _("Use your own levels if present, otherwise the device's")),
4949 default_value
="usrdefault",
4954 title
=_("Trend computation"),
4955 label
=_("Enable trend computation"),
4959 title
=_("Observation period for temperature trend computation"),
4962 unit
=_("minutes"))),
4965 title
=_("Levels on temperature increase per period"),
4968 title
=_("Warning at"),
4969 unit
=u
"°C / " + _("period"),
4972 title
=_("Critical at"),
4973 unit
=u
"°C / " + _("period"),
4976 ("trend_levels_lower",
4978 title
=_("Levels on temperature decrease per period"),
4981 title
=_("Warning at"),
4982 unit
=u
"°C / " + _("period"),
4985 title
=_("Critical at"),
4986 unit
=u
"°C / " + _("period"),
4992 _("Levels on the time left until a critical temperature (upper or lower) is reached"
4996 title
=_("Warning if below"),
5001 title
=_("Critical if below"),
5007 optional_keys
=["trend_levels", "trend_levels_lower", "trend_timeleft"],
5011 forth
=lambda v
: isinstance(v
, tuple) and {"levels": v
} or v
,
5013 TextAscii(title
=_("Sensor ID"), help=_("The identifier of the thermal sensor.")),
5017 register_check_parameters(
5018 RulespecGroupCheckParametersEnvironment
,
5020 _("Room temperature (external thermal sensors)"),
5022 help=_("Temperature levels for external thermometers that are used "
5023 "for monitoring the temperature of a datacenter. An example "
5024 "is the webthem from W&T."),
5026 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=26),
5027 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=30),
5029 TextAscii(title
=_("Sensor ID"), help=_("The identifier of the thermal sensor.")),
5034 register_check_parameters(
5035 RulespecGroupCheckParametersEnvironment
,
5036 "hw_single_temperature",
5037 _("Host/Device temperature"),
5039 help=_("Temperature levels for hardware devices with "
5040 "a single temperature sensor."),
5042 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=35),
5043 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=40),
5050 register_check_parameters(
5051 RulespecGroupCheckParametersEnvironment
, "evolt",
5052 _("Voltage levels (UPS / PDU / Other Devices)"),
5054 help=_("Voltage Levels for devices like UPS or PDUs. "
5055 "Several phases may be addressed independently."),
5057 Integer(title
=_("warning if below"), unit
="V", default_value
=210),
5058 Integer(title
=_("critical if below"), unit
="V", default_value
=180),
5060 TextAscii(title
=_("Phase"),
5061 help=_("The identifier of the phase the power is related to.")), "first")
5063 register_check_parameters(
5064 RulespecGroupCheckParametersEnvironment
, "efreq", _("Nominal Frequencies"),
5066 help=_("Levels for the nominal frequencies of AC devices "
5067 "like UPSs or PDUs. Several phases may be addressed independently."),
5069 Integer(title
=_("warning if below"), unit
="Hz", default_value
=40),
5070 Integer(title
=_("critical if below"), unit
="Hz", default_value
=45),
5072 TextAscii(title
=_("Phase"), help=_("The identifier of the phase the power is related to.")),
5075 register_check_parameters(
5076 RulespecGroupCheckParametersEnvironment
, "epower", _("Electrical Power"),
5078 help=_("Levels for the electrical power consumption of a device "
5079 "like a UPS or a PDU. Several phases may be addressed independently."),
5081 Integer(title
=_("warning if below"), unit
="Watt", default_value
=20),
5082 Integer(title
=_("critical if below"), unit
="Watt", default_value
=1),
5084 TextAscii(title
=_("Phase"), help=_("The identifier of the phase the power is related to.")),
5087 register_check_parameters(
5088 RulespecGroupCheckParametersEnvironment
, "ups_out_load",
5089 _("Parameters for output loads of UPSs and PDUs"),
5091 Integer(title
=_("warning at"), unit
=u
"%", default_value
=85),
5092 Integer(title
=_("critical at"), unit
=u
"%", default_value
=90),
5093 ]), TextAscii(title
=_("Phase"), help=_("The identifier of the phase the power is related to.")),
5096 register_check_parameters(
5097 RulespecGroupCheckParametersEnvironment
, "epower_single",
5098 _("Electrical Power for Devices with only one phase"),
5100 help=_("Levels for the electrical power consumption of a device "),
5102 Integer(title
=_("warning if at"), unit
="Watt", default_value
=300),
5103 Integer(title
=_("critical if at"), unit
="Watt", default_value
=400),
5106 register_check_parameters(
5107 RulespecGroupCheckParametersEnvironment
,
5109 _("Hardware temperature, multiple sensors"),
5111 help=_("Temperature levels for hardware devices like "
5112 "Brocade switches with (potentially) several "
5113 "temperature sensors. Sensor IDs can be selected "
5116 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=35),
5117 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=40),
5119 TextAscii(title
=_("Sensor ID"), help=_("The identifier of the thermal sensor.")),
5124 register_check_parameters(
5125 RulespecGroupCheckParametersEnvironment
,
5126 "hw_temperature_single",
5127 _("Hardware temperature, single sensor"),
5129 help=_("Temperature levels for hardware devices like "
5130 "DELL Powerconnect that have just one temperature sensor. "),
5132 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=35),
5133 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=40),
5140 register_check_parameters(
5141 RulespecGroupCheckParametersEnvironment
,
5143 _("Harddisk temperature (e.g. via SMART)"),
5145 help=_("Temperature levels for hard disks, that is determined e.g. via SMART"),
5147 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=35),
5148 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=40),
5151 title
=_("Hard disk device"),
5152 help=_("The identificator of the hard disk device, e.g. <tt>/dev/sda</tt>.")),
5157 register_check_parameters(
5158 RulespecGroupCheckParametersEnvironment
, "eaton_enviroment",
5159 _("Temperature and Humidity for Eaton UPS"),
5160 Dictionary(elements
=[
5163 title
=_("Temperature"),
5165 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=26),
5166 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=30),
5170 title
=_("Remote Temperature"),
5172 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=26),
5173 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=30),
5177 title
=_("Humidity"),
5179 Integer(title
=_("warning at"), unit
=u
"%", default_value
=60),
5180 Integer(title
=_("critical at"), unit
=u
"%", default_value
=75),
5189 Integer(title
=_("warning if below"), unit
=u
"V", default_value
=210),
5190 Integer(title
=_("critical if below"), unit
=u
"V", default_value
=200),
5197 Integer(title
=_("warning at"), unit
=u
"W", default_value
=1000),
5198 Integer(title
=_("critical at"), unit
=u
"W", default_value
=1200),
5203 title
=_("Apparent Power"),
5205 Integer(title
=_("warning at"), unit
=u
"VA", default_value
=1100),
5206 Integer(title
=_("critical at"), unit
=u
"VA", default_value
=1300),
5213 Integer(title
=_("warning at"), unit
=u
"A", default_value
=5),
5214 Integer(title
=_("critical at"), unit
=u
"A", default_value
=10),
5219 title
=_("Frequency"),
5221 Integer(title
=_("warning if below"), unit
=u
"Hz", default_value
=45),
5222 Integer(title
=_("critical if below"), unit
=u
"Hz", default_value
=40),
5223 Integer(title
=_("warning if above"), unit
=u
"Hz", default_value
=55),
5224 Integer(title
=_("critical if above"), unit
=u
"Hz", default_value
=60),
5227 ("differential_current_ac",
5229 title
=_("Differential current AC"),
5231 Float(title
=_("warning at"), unit
=u
"mA", default_value
=3.5),
5232 Float(title
=_("critical at"), unit
=u
"mA", default_value
=30),
5235 ("differential_current_dc",
5237 title
=_("Differential current DC"),
5239 Float(title
=_("warning at"), unit
=u
"mA", default_value
=70),
5240 Float(title
=_("critical at"), unit
=u
"mA", default_value
=100),
5245 register_check_parameters(
5246 RulespecGroupCheckParametersEnvironment
, "ups_outphase",
5247 _("Parameters for output phases of UPSs and PDUs"),
5249 help=_("This rule allows you to specify levels for the voltage, current, load, power "
5250 "and apparent power of your device. The levels will only be applied if the device "
5251 "actually supplies values for these parameters."),
5252 elements
=phase_elements
+ [
5257 Integer(title
=_("warning at"), unit
=u
"%", default_value
=80),
5258 Integer(title
=_("critical at"), unit
=u
"%", default_value
=90),
5260 ("map_device_states",
5262 Tuple(elements
=[TextAscii(size
=10), MonitoringState()]),
5263 title
=_("Map device state"),
5264 help=_("Here you can enter either device state number (eg. from SNMP devices) "
5265 "or exact device state name and the related monitoring state."),
5269 title
=_("Output Name"),
5270 help=_("The name of the output, e.g. <tt>Phase 1</tt>/<tt>PDU 1</tt>")), "dict")
5272 register_check_parameters(
5273 RulespecGroupCheckParametersEnvironment
, "el_inphase",
5274 _("Parameters for input phases of UPSs and PDUs"),
5276 help=_("This rule allows you to specify levels for the voltage, current, power "
5277 "and apparent power of your device. The levels will only be applied if the device "
5278 "actually supplies values for these parameters."),
5279 elements
=phase_elements
+ [
5280 ("map_device_states",
5282 Tuple(elements
=[TextAscii(size
=10), MonitoringState()]),
5283 title
=_("Map device state"),
5284 help=_("Here you can enter either device state number (eg. from SNMP devices) "
5285 "or exact device state name and the related monitoring state."),
5288 ), TextAscii(title
=_("Input Name"), help=_("The name of the input, e.g. <tt>Phase 1</tt>")),
5291 register_check_parameters(
5292 RulespecGroupCheckParametersEnvironment
,
5294 _("FAN speed of Hardware devices"),
5300 help=_("Lower levels for the fan speed of a hardware device"),
5301 title
=_("Lower levels"),
5303 Integer(title
=_("warning if below"), unit
=u
"rpm"),
5304 Integer(title
=_("critical if below"), unit
=u
"rpm"),
5310 help=_("Upper levels for the fan speed of a hardware device"),
5311 title
=_("Upper levels"),
5313 Integer(title
=_("warning at"), unit
=u
"rpm", default_value
=8000),
5314 Integer(title
=_("critical at"), unit
=u
"rpm", default_value
=8400),
5318 Checkbox(title
=_("Performance data"), label
=_("Enable performance data"))),
5320 optional_keys
=["upper"],
5322 TextAscii(title
=_("Fan Name"), help=_("The identificator of the fan.")),
5326 register_check_parameters(
5327 RulespecGroupCheckParametersEnvironment
,
5329 _("Fan speed of hardware devices (in percent)"),
5330 Dictionary(elements
=[
5333 title
=_("Upper fan speed levels"),
5335 Percentage(title
=_("warning if at")),
5336 Percentage(title
=_("critical if at")),
5340 title
=_("Lower fan speed levels"),
5342 Percentage(title
=_("warning if below")),
5343 Percentage(title
=_("critical if below")),
5346 TextAscii(title
=_("Fan Name"), help=_("The identifier of the fan.")),
5350 register_check_parameters(
5351 RulespecGroupCheckParametersOperatingSystem
,
5353 _("Number of used states of OpenBSD PF engine"),
5359 title
=_("Limits for the number of used states"),
5361 Integer(title
=_("warning at")),
5362 Integer(title
=_("critical at")),
5366 optional_keys
=[None],
5372 register_check_parameters(
5373 RulespecGroupCheckParametersEnvironment
,
5375 _("Levels for Gude PDU Devices"),
5376 Dictionary(elements
=[
5379 title
=_("Total accumulated Active Energy of Power Channel"),
5381 Integer(title
=_("warning at"), unit
=_("kW")),
5382 Integer(title
=_("critical at"), unit
=_("kW")),
5386 title
=_("Active Power"),
5388 Integer(title
=_("warning at"), unit
=_("W")),
5389 Integer(title
=_("critical at"), unit
=_("W")),
5393 title
=_("Current on Power Channel"),
5395 Integer(title
=_("warning at"), unit
=_("A")),
5396 Integer(title
=_("critical at"), unit
=_("A")),
5400 title
=_("Voltage on Power Channel"),
5402 Integer(title
=_("warning if below"), unit
=_("V")),
5403 Integer(title
=_("critical if below"), unit
=_("V")),
5407 title
=_("Line Mean Apparent Power"),
5409 Integer(title
=_("warning at"), unit
=_("VA")),
5410 Integer(title
=_("critical at"), unit
=_("VA")),
5413 TextAscii(title
=_("Phase Number"), help=_("The Number of the power Phase.")),
5417 register_check_parameters(
5418 RulespecGroupCheckParametersEnvironment
, "hostsystem_sensors", _("Hostsystem sensor alerts"),
5421 help=_("This rule allows to override alert levels for the given sensor names."),
5423 ("name", TextAscii(title
=_("Sensor name"))),
5426 title
=_("Custom states"),
5429 title
="Sensor %s" % description
,
5430 label
=_("Set state to"),
5431 default_value
=int(element
)))
5432 for (element
, description
) in [("0", _("OK")), (
5433 "1", _("WARNING")), ("2", _("CRITICAL")), ("3", _("UNKNOWN"))]],
5436 optional_keys
=False),
5437 add_label
=_("Add sensor name")), None, "first")
5439 register_check_parameters(
5440 RulespecGroupCheckParametersEnvironment
, "netapp_instance", _("Netapp Instance State"),
5443 help=_("This rule allows you to override netapp warnings"),
5444 elements
=[("name", TextAscii(title
=_("Warning starts with"))),
5445 ("state", MonitoringState(title
="Set state to", default_value
=1))],
5446 optional_keys
=False),
5447 add_label
=_("Add warning")), None, "first")
5449 register_check_parameters(
5450 RulespecGroupCheckParametersEnvironment
,
5452 _("Temperature sensors with builtin levels"),
5454 TextAscii(title
=_("Sensor ID"), help=_("The identificator of the thermal sensor.")),
5459 register_check_parameters(
5460 RulespecGroupCheckParametersEnvironment
,
5461 "temperature_trends",
5462 _("Temperature trends for devices with builtin levels"),
5464 title
=_("Temperature Trend Analysis"),
5466 "This rule enables and configures a trend analysis and corresponding limits for devices, "
5467 "which have their own limits configured on the device. It will only work for supported "
5468 "checks, right now the <tt>adva_fsp_temp</tt> check."),
5473 title
=_("Time range for temperature trend computation"),
5477 title
=_("Trend computation"),
5478 label
=_("Enable trend computation"))),
5481 title
=_("Levels on trends in degrees Celsius per time range"),
5483 Integer(title
=_("Warning at"), unit
=u
"°C / " + _("range"), default_value
=5),
5484 Integer(title
=_("Critical at"), unit
=u
"°C / " + _("range"), default_value
=10)
5488 title
=_("Levels on the time left until limit is reached"),
5491 title
=_("Warning if below"),
5496 title
=_("Critical if below"),
5502 TextAscii(title
=_("Sensor ID"), help=_("The identifier of the thermal sensor.")),
5507 title
=_("Thresholds for quality of time"),
5510 title
=_("Critical at stratum"),
5513 "The stratum (\"distance\" to the reference clock) at which the check gets critical."
5517 title
=_("Warning at"),
5519 default_value
=200.0,
5520 help=_("The offset in ms at which a warning state is triggered."),
5523 title
=_("Critical at"),
5525 default_value
=500.0,
5526 help=_("The offset in ms at which a critical state is triggered."),
5530 register_check_parameters(
5531 RulespecGroupCheckParametersOperatingSystem
, "ntp_time", _("State of NTP time synchronisation"),
5533 Dictionary(elements
=[
5540 title
=_("Phases without synchronization"),
5543 title
=_("Warning at"),
5544 display
=["hours", "minutes"],
5548 title
=_("Critical at"),
5549 display
=["hours", "minutes"],
5554 forth
=lambda params
: isinstance(params
, tuple) and {"ntp_levels": params
} or params
), None,
5557 register_check_parameters(RulespecGroupCheckParametersOperatingSystem
, "ntp_peer",
5558 _("State of NTP peer"), ntp_params
,
5559 TextAscii(title
=_("Name of the peer")), "first")
5561 register_check_parameters(
5562 RulespecGroupCheckParametersEnvironment
,
5564 _("Smoke Detection"),
5566 help=_("For devices which measure smoke in percent"),
5568 Percentage(title
=_("Warning at"), allow_int
=True, default_value
=1),
5569 Percentage(title
=_("Critical at"), allow_int
=True, default_value
=5),
5571 TextAscii(title
=_("Sensor ID"), help=_("The identifier of the sensor.")),
5575 register_check_parameters(
5576 RulespecGroupCheckParametersEnvironment
,
5578 _("APC Automatic Transfer Switch Output"),
5580 title
=_("Levels for ATS Output parameters"),
5583 ("output_voltage_max",
5585 title
=_("Maximum Levels for Voltage"),
5587 Integer(title
=_("Warning at"), unit
="Volt"),
5588 Integer(title
=_("Critical at"), unit
="Volt"),
5590 ("output_voltage_min",
5592 title
=_("Minimum Levels for Voltage"),
5594 Integer(title
=_("Warning if below"), unit
="Volt"),
5595 Integer(title
=_("Critical if below"), unit
="Volt"),
5599 title
=_("Maximum Levels for load in percent"),
5601 Percentage(title
=_("Warning at")),
5602 Percentage(title
=_("Critical at")),
5606 title
=_("Minimum Levels for load in percent"),
5608 Percentage(title
=_("Warning if below")),
5609 Percentage(title
=_("Critical if below")),
5613 TextAscii(title
=_("ID of phase")),
5617 register_check_parameters(
5618 RulespecGroupCheckParametersEnvironment
,
5620 _("Airflow levels"),
5622 title
=_("Levels for airflow"),
5626 title
=_("Lower levels"),
5629 title
=_("Warning if below"),
5634 title
=_("Critical if below"),
5641 title
=_("Upper levels"),
5644 title
=_("Warning at"), unit
=_("l/s"), default_value
=10.0, allow_int
=True),
5646 title
=_("Critical at"), unit
=_("l/s"), default_value
=11.0, allow_int
=True)
5653 register_check_parameters(
5654 RulespecGroupCheckParametersEnvironment
,
5658 title
=_("Levels for battery parameters"),
5659 optional_keys
=False,
5663 title
=_("Battery capacity"),
5666 title
=_("Warning at"),
5668 _("The battery capacity in percent at and below which a warning state is triggered"
5674 title
=_("Critical at"),
5676 _("The battery capacity in percent at and below which a critical state is triggered"
5687 title
=_("Time left on battery"),
5690 title
=_("Warning at"),
5692 _("Time left on Battery at and below which a warning state is triggered"
5698 title
=_("Critical at"),
5700 _("Time Left on Battery at and below which a critical state is triggered"
5713 register_check_parameters(
5714 RulespecGroupCheckParametersApplications
,
5715 "mbg_lantime_state",
5716 _("Meinberg Lantime State"),
5718 title
=_("Meinberg Lantime State"),
5722 title
=_("Warning levels for Stratum"),
5725 title
=_("Warning at"),
5729 title
=_("Critical at"),
5735 title
=_("Warning levels for Time Offset"),
5738 title
=_("Warning at"),
5739 unit
=_("microseconds"),
5743 title
=_("Critical at"),
5744 unit
=_("microseconds"),
5753 register_check_parameters(
5754 RulespecGroupCheckParametersApplications
, "sansymphony_pool", _("Sansymphony: pool allocation"),
5756 help=_("This rule sets the warn and crit levels for the percentage of allocated pools"),
5759 title
=_("Warning at"),
5764 title
=_("Critical at"),
5768 ]), TextAscii(title
=_("Name of the pool"),), "first")
5770 register_check_parameters(
5771 RulespecGroupCheckParametersApplications
, "sansymphony_alerts",
5772 _("Sansymphony: Number of unacknowlegded alerts"),
5774 help=_("This rule sets the warn and crit levels for the number of unacknowlegded alerts"),
5777 title
=_("Warning at"),
5782 title
=_("Critical at"),
5788 register_check_parameters(
5789 RulespecGroupCheckParametersApplications
, "jvm_threads", _("JVM threads"),
5791 help=_("This rule sets the warn and crit levels for the number of threads "
5792 "running in a JVM."),
5795 title
=_("Warning at"),
5800 title
=_("Critical at"),
5806 title
=_("Name of the virtual machine"),
5807 help=_("The name of the application server"),
5811 register_check_parameters(
5812 RulespecGroupCheckParametersApplications
,
5813 "sym_brightmail_queues",
5814 "Symantec Brightmail Queues",
5816 help=_("This check is used to monitor successful email delivery through "
5817 "Symantec Brightmail Scanner appliances."),
5821 title
=_("Number of connections"),
5823 Integer(title
=_("Warning at")),
5824 Integer(title
=_("Critical at")),
5828 title
=_("Number of messages delivered"),
5830 Integer(title
=_("Warning at")),
5831 Integer(title
=_("Critical at")),
5835 title
=_("Amount of data processed"),
5837 Integer(title
=_("Warning at")),
5838 Integer(title
=_("Cricital at")),
5842 title
=_("Number of messages currently queued"),
5844 Integer(title
=_("Warning at")),
5845 Integer(title
=_("Critical at")),
5849 title
=_("Size of the queue"),
5851 Integer(title
=_("Warning at")),
5852 Integer(title
=_("Critical at")),
5854 ("deferredMessages",
5856 title
=_("Number of messages in deferred state"),
5858 Integer(title
=_("Warning at")),
5859 Integer(title
=_("Critical at")),
5863 TextAscii(title
=_("Instance name"), allow_empty
=True),
5867 register_check_parameters(
5868 RulespecGroupCheckParametersApplications
, "db2_logsize", _("DB2 logfile usage"),
5869 Dictionary(elements
=[(
5872 get_free_used_dynamic_valuespec("free", "logfile", default_value
=(20.0, 10.0)),
5873 title
=_("Logfile levels"),
5875 forth
=transform_filesystem_free
,
5876 back
=transform_filesystem_free
))]),
5878 title
=_("Instance"), help=_("DB2 instance followed by database name, e.g db2taddm:CMDBS1")),
5881 register_check_parameters(
5882 RulespecGroupCheckParametersApplications
,
5884 _("DB2 Sort Overflow"),
5886 help=_("This rule allows you to set percentual limits for sort overflows."),
5891 title
=_("Overflows"),
5893 Percentage(title
=_("Warning at"), unit
=_("%"), default_value
=2.0),
5894 Percentage(title
=_("Critical at"), unit
=_("%"), default_value
=4.0),
5900 title
=_("Instance"), help=_("DB2 instance followed by database name, e.g db2taddm:CMDBS1")),
5904 register_check_parameters(
5905 RulespecGroupCheckParametersApplications
, "db2_tablespaces", _("DB2 Tablespaces"),
5907 help=_("A tablespace is a container for segments (tables, indexes, etc). A "
5908 "database consists of one or more tablespaces, each made up of one or "
5909 "more data files. Tables and indexes are created within a particular "
5911 "This rule allows you to define checks on the size of tablespaces."),
5912 elements
=db_levels_common
,
5915 title
=_("Instance"),
5916 help=_("The instance name, the database name and the tablespace name combined "
5917 "like this db2wps8:WPSCOMT8.USERSPACE1")), "dict")
5919 register_check_parameters(
5920 RulespecGroupCheckParametersApplications
, "db2_connections", _("DB2 Connections"),
5922 help=_("This rule allows you to set limits for the maximum number of DB2 connections"),
5927 title
=_("Number of current connections"),
5929 Integer(title
=_("Warning at"), unit
=_("connections"), default_value
=150),
5930 Integer(title
=_("Critical at"), unit
=_("connections"), default_value
=200),
5936 title
=_("Instance"), help=_("DB2 instance followed by database name, e.g db2taddm:CMDBS1")),
5939 register_check_parameters(
5940 RulespecGroupCheckParametersApplications
,
5944 help=_("This rule allows you to configure limits for the deadlocks and lockwaits "
5945 "counters of a DB2."),
5950 title
=_("Deadlocks"),
5952 Float(title
=_("Warning at"), unit
=_("deadlocks/sec")),
5953 Float(title
=_("Critical at"), unit
=_("deadlocks/sec")),
5960 title
=_("Lockwaits"),
5962 Float(title
=_("Warning at"), unit
=_("lockwaits/sec")),
5963 Float(title
=_("Critical at"), unit
=_("lockwaits/sec")),
5969 title
=_("Instance"), help=_("DB2 instance followed by database name, e.g db2taddm:CMDBS1")),
5973 register_check_parameters(
5974 RulespecGroupCheckParametersApplications
, "db2_backup",
5975 _("DB2 Time since last database Backup"),
5978 Age(title
=_("Warning at"),
5979 display
=["days", "hours", "minutes"],
5980 default_value
=86400 * 14),
5981 Age(title
=_("Critical at"),
5982 display
=["days", "hours", "minutes"],
5983 default_value
=86400 * 28)
5985 title
=_("Specify time since last successful backup"),
5988 title
=_("Instance"),
5989 help=_("DB2 instance followed by database name, e.g db2taddm:CMDBS1")), "first")
5991 register_check_parameters(
5992 RulespecGroupCheckParametersApplications
, "db2_mem", _("Memory levels for DB2 memory usage"),
5995 Percentage(title
=_("Warning if less than"), unit
=_("% memory left")),
5996 Percentage(title
=_("Critical if less than"), unit
=_("% memory left")),
5997 ],), TextAscii(title
=_("Instance name"), allow_empty
=True), "first")
5999 register_check_parameters(
6000 RulespecGroupCheckParametersApplications
, "windows_updates", _("WSUS (Windows Updates)"),
6002 title
=_("Parameters for the Windows Update Check with WSUS"),
6003 help=_("Set the according numbers to 0 if you want to disable alerting."),
6005 Integer(title
=_("Warning if at least this number of important updates are pending")),
6006 Integer(title
=_("Critical if at least this number of important updates are pending")),
6007 Integer(title
=_("Warning if at least this number of optional updates are pending")),
6008 Integer(title
=_("Critical if at least this number of optional updates are pending")),
6009 Age(title
=_("Warning if time until forced reboot is less then"), default_value
=604800),
6010 Age(title
=_("Critical if time time until forced reboot is less then"),
6011 default_value
=172800),
6012 Checkbox(title
=_("display all important updates verbosely"), default_value
=True),
6016 synology_update_states
= [
6019 (4, "Disconnected"),
6023 register_check_parameters(
6024 RulespecGroupCheckParametersApplications
,
6026 _("Synology Updates"),
6028 title
=_("Update State"),
6032 title
=_("States which result in OK"),
6033 choices
=synology_update_states
,
6034 default_value
=[2])),
6037 title
=_("States which result in Warning"),
6038 choices
=synology_update_states
,
6039 default_value
=[5])),
6042 title
=_("States which result in Critical"),
6043 choices
=synology_update_states
,
6044 default_value
=[1, 4])),
6052 register_check_parameters(
6053 RulespecGroupCheckParametersApplications
, "antivir_update_age",
6054 _("Age of last AntiVirus update"),
6056 title
=_("Age of last AntiVirus update"),
6058 Age(title
=_("Warning level for time since last update")),
6059 Age(title
=_("Critical level for time since last update")),
6062 register_check_parameters(RulespecGroupCheckParametersApplications
,
6064 _('Logwatch Event Console Forwarding'),
6066 title
= _("Forwarding"),
6067 help = _("Instead of using the regular logwatch check all lines received by logwatch can "
6068 "be forwarded to a Check_MK event console daemon to be processed. The target event "
6069 "console can be configured for each host in a separate rule."),
6074 totext
= _("Messages are handled by logwatch."),
6075 title
= _("No forwarding"),
6078 title
= _('Forward Messages to Event Console'),
6080 ('method', Transform(
6081 # TODO: Clean this up to some CascadingDropdown()
6084 title
= _("Forwarding Method"),
6088 title
= _("Local: Send events to local Event Console in same OMD site"),
6089 totext
= _("Directly forward to Event Console"),
6092 title
= _("Local: Send events to local Event Console into unix socket"),
6093 allow_empty
= False,
6098 title
= _("Local: Spooling - Send events to local event console in same OMD site"),
6099 totext
= _("Spool to Event Console"),
6103 title
= _("Local: Spooling - Send events to local Event Console into given spool directory"),
6104 allow_empty
= False,
6105 forth
= lambda x
: x
[6:], # remove prefix
6106 back
= lambda x
: "spool:" + x
, # add prefix
6109 title
= _("Remote: Send events to remote syslog host"),
6111 ("tcp", _("Send via TCP"), Dictionary(
6113 ("address", TextAscii(
6114 title
= _("Address"),
6115 allow_empty
= False,
6119 allow_empty
= False,
6120 default_value
= 514,
6125 ("spool", Dictionary(
6126 title
= _("Spool messages that could not be sent"),
6127 help = _("Messages that can not be forwarded, e.g. when the target Event Console is "
6128 "not running, can temporarily be stored locally. Forwarding is tried again "
6129 "on next execution. When messages are spooled, the check will go into WARNING "
6130 "state. In case messages are dropped by the rules below, the check will shortly "
6131 "go into CRITICAL state for this execution."),
6134 title
= _("Maximum spool duration"),
6135 help = _("Messages that are spooled longer than this time will be thrown away."),
6136 default_value
= 60*60*24*7, # 1 week should be fine (if size is not exceeded)
6138 ("max_size", Filesize(
6139 title
= _("Maximum spool size"),
6140 help = _("When the total size of spooled messages exceeds this number, the oldest "
6141 "messages of the currently spooled messages is thrown away until the left "
6142 "messages have the half of the maximum size."),
6143 default_value
= 500000, # do not save more than 500k of message
6149 optional_keys
= [ "spool" ],
6151 ("udp", _("Send via UDP"), Dictionary(
6153 ("address", TextAscii(
6154 title
= _("Address"),
6155 allow_empty
= False,
6159 allow_empty
= False,
6160 default_value
= 514,
6171 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)))
6173 # migrate old (tcp, address, port) tuple to new dict
6174 forth
= lambda v
: (v
[0], {"address": v
[1], "port": v
[2]}) if (isinstance(v
, tuple) and not isinstance(v
[1], dict)) else v
,
6176 ('facility', DropdownChoice(
6177 title
= _("Syslog facility for forwarded messages"),
6178 help = _("When forwarding messages and no facility can be extracted from the "
6179 "message this facility is used."),
6180 choices
= mkeventd
.syslog_facilities
,
6181 default_value
= 17, # local1
6183 ('restrict_logfiles',
6185 title
= _('Restrict Logfiles (Prefix matching regular expressions)'),
6186 help = _("Put the item names of the logfiles here. For example \"System$\" "
6187 "to select the service \"LOG System\". You can use regular expressions "
6188 "which must match the beginning of the logfile name."),
6191 ('monitor_logfilelist',
6193 title
= _("Monitoring of forwarded logfiles"),
6194 label
= _("Warn if list of forwarded logfiles changes"),
6195 help = _("If this option is enabled, the check monitors the list of forwarded "
6196 "logfiles and will warn you if at any time a logfile is missing or exceeding "
6197 "when compared to the initial list that was snapshotted during service detection. "
6198 "Reinventorize this check in order to make it OK again."),
6201 ('expected_logfiles',
6203 title
= _("List of expected logfiles"),
6204 help = _("When the monitoring of forwarded logfiles is enabled, the check verifies that "
6205 "all of the logfiles listed here are reported by the monitored system."),
6208 ('logwatch_reclassify',
6210 title
= _("Reclassify messages before forwarding them to the EC"),
6211 label
= _("Apply logwatch patterns"),
6212 help = _("If this option is enabled, the logwatch lines are first reclassified by the logwatch "
6213 "patterns before they are sent to the event console. If you reclassify specific lines to "
6214 "IGNORE they are not forwarded to the event console. This takes the burden from the "
6215 "event console to process the message itself through all of its rulesets. The reclassifcation "
6216 "of each line takes into account from which logfile the message originates. So you can create "
6217 "logwatch reclassification rules specifically designed for a logfile <i>access.log</i>, "
6218 "which do not apply to other logfiles."),
6223 title
= _("Create a separate check for each logfile"),
6224 label
= _("Separate check"),
6225 help = _("If this option is enabled, there will be one separate check for each logfile found during "
6226 "the service discovery. This option also changes the behaviour for unknown logfiles. "
6227 "The default logwatch check forwards all logfiles to the event console, even logfiles "
6228 "which were not known during the service discovery. Creating one check per logfile changes "
6229 "this behaviour so that any data from unknown logfiles is discarded."),
6233 optional_keys
= ['restrict_logfiles', 'expected_logfiles', 'logwatch_reclassify', 'separate_checks'],
6243 RulespecGroupCheckParametersApplications
,
6244 varname
="logwatch_groups",
6245 title
=_('Logfile Grouping Patterns'),
6246 help=_('The check <tt>logwatch</tt> normally creates one service for each logfile. '
6247 'By defining grouping patterns you can switch to the check <tt>logwatch.groups</tt>. '
6248 'If the pattern begins with a tilde then this pattern is interpreted as a regular '
6249 'expression instead of as a filename globbing pattern and <tt>*</tt> and <tt>?</tt> '
6250 'are treated differently. '
6251 'That check monitors a list of logfiles at once. This is useful if you have '
6252 'e.g. a folder with rotated logfiles where the name of the current logfile'
6253 'also changes with each rotation'),
6256 help=_("This defines one logfile grouping pattern"),
6258 orientation
="horizontal",
6260 TextAscii(title
=_("Name of group"),),
6263 orientation
="vertical",
6265 TextAscii(title
=_("Include Pattern")),
6266 TextAscii(title
=_("Exclude Pattern"))
6271 add_label
=_("Add pattern group"),
6277 RulespecGroupCheckParametersNetworking
,
6278 "if_disable_if64_hosts",
6279 title
=_("Hosts forced to use <tt>if</tt> instead of <tt>if64</tt>"),
6280 help=_("A couple of switches with broken firmware report that they "
6281 "support 64 bit counters but do not output any actual data "
6282 "in those counters. Listing those hosts in this rule forces "
6283 "them to use the interface check with 32 bit counters instead."))
6285 # wmic_process does not support inventory at the moment
6286 register_check_parameters(
6287 RulespecGroupCheckParametersApplications
, "wmic_process",
6288 _("Memory and CPU of processes on Windows"),
6292 title
=_("Name of the process"),
6295 Integer(title
=_("Memory warning at"), unit
="MB"),
6296 Integer(title
=_("Memory critical at"), unit
="MB"),
6297 Integer(title
=_("Pagefile warning at"), unit
="MB"),
6298 Integer(title
=_("Pagefile critical at"), unit
="MB"),
6299 Percentage(title
=_("CPU usage warning at")),
6300 Percentage(title
=_("CPU usage critical at")),
6303 title
=_("Process name for usage in the Nagios service description"), allow_empty
=False),
6306 register_check_parameters(
6307 RulespecGroupCheckParametersOperatingSystem
,
6309 _("Zypper Updates"),
6315 register_check_parameters(
6316 RulespecGroupCheckParametersOperatingSystem
,
6319 Dictionary(elements
=[
6322 title
=_("State when normal updates are pending"),
6327 title
=_("State when security updates are pending"),
6335 register_check_parameters(
6336 RulespecGroupCheckParametersEnvironment
, "airflow_deviation", _("Airflow Deviation in Percent"),
6338 help=_("Levels for Airflow Deviation measured at airflow sensors "),
6340 Float(title
=_("critical if below or equal"), unit
=u
"%", default_value
=-20),
6341 Float(title
=_("warning if below or equal"), unit
=u
"%", default_value
=-20),
6342 Float(title
=_("warning if above or equal"), unit
=u
"%", default_value
=20),
6343 Float(title
=_("critical if above or equal"), unit
=u
"%", default_value
=20),
6344 ]), TextAscii(title
=_("Detector ID"), help=_("The identifier of the detector.")), "first")
6346 register_check_parameters(
6347 RulespecGroupCheckParametersApplications
,
6349 _("Load of Citrix Server"),
6352 title
=_("Citrix Server load"),
6354 Percentage(title
=_("Warning at"), default_value
=85.0, unit
="percent"),
6355 Percentage(title
=_("Critical at"), default_value
=95.0, unit
="percent"),
6357 forth
=lambda x
: (x
[0] / 100.0, x
[1] / 100.0),
6358 back
=lambda x
: (int(x
[0] * 100), int(x
[1] * 100))),
6363 register_check_parameters(
6364 RulespecGroupCheckParametersNetworking
, "adva_ifs", _("Adva Optical Transport Laser Power"),
6365 Dictionary(elements
=[
6366 ("limits_output_power",
6368 title
=_("Sending Power"),
6370 Float(title
=_("lower limit"), unit
="dBm"),
6371 Float(title
=_("upper limit"), unit
="dBm"),
6373 ("limits_input_power",
6375 title
=_("Received Power"),
6377 Float(title
=_("lower limit"), unit
="dBm"),
6378 Float(title
=_("upper limit"), unit
="dBm"),
6381 title
=_("Interface"),
6385 bluecat_operstates
= [
6386 (1, "running normally"),
6388 (3, "currently starting"),
6389 (4, "currently stopping"),
6393 register_check_parameters(
6394 RulespecGroupCheckParametersNetworking
,
6396 _("Bluecat NTP Settings"),
6397 Dictionary(elements
=[
6400 title
=_("Operations States"),
6404 title
=_("States treated as warning"),
6405 choices
=bluecat_operstates
,
6406 default_value
=[2, 3, 4],
6410 title
=_("States treated as critical"),
6411 choices
=bluecat_operstates
,
6415 required_keys
=['warning', 'critical'],
6419 title
=_("Levels for Stratum "),
6421 Integer(title
=_("Warning at")),
6422 Integer(title
=_("Critical at")),
6429 register_check_parameters(
6430 RulespecGroupCheckParametersNetworking
,
6432 _("Bluecat DHCP Settings"),
6437 title
=_("Operations States"),
6441 title
=_("States treated as warning"),
6442 choices
=bluecat_operstates
,
6443 default_value
=[2, 3, 4],
6447 title
=_("States treated as critical"),
6448 choices
=bluecat_operstates
,
6452 required_keys
=['warning', 'critical'],
6455 required_keys
=['oper_states'], # There is only one value, so its required
6461 register_check_parameters(
6462 RulespecGroupCheckParametersNetworking
,
6463 "bluecat_command_server",
6464 _("Bluecat Command Server Settings"),
6469 title
=_("Operations States"),
6473 title
=_("States treated as warning"),
6474 choices
=bluecat_operstates
,
6475 default_value
=[2, 3, 4],
6479 title
=_("States treated as critical"),
6480 choices
=bluecat_operstates
,
6484 required_keys
=['warning', 'critical'],
6487 required_keys
=['oper_states'], # There is only one value, so its required
6493 register_check_parameters(
6494 RulespecGroupCheckParametersNetworking
,
6496 _("Bluecat DNS Settings"),
6501 title
=_("Operations States"),
6505 title
=_("States treated as warning"),
6506 choices
=bluecat_operstates
,
6507 default_value
=[2, 3, 4],
6511 title
=_("States treated as critical"),
6512 choices
=bluecat_operstates
,
6516 required_keys
=['warning', 'critical'],
6519 required_keys
=['oper_states'], # There is only one value, so its required
6525 bluecat_ha_operstates
= [
6531 (6, "becoming active"),
6532 (7, "becomming passive"),
6536 register_check_parameters(
6537 RulespecGroupCheckParametersNetworking
,
6539 _("Bluecat HA Settings"),
6544 title
=_("Operations States"),
6549 title
=_("States treated as warning"),
6550 choices
=bluecat_ha_operstates
,
6551 default_value
=[5, 6, 7],
6557 title
=_("States treated as critical"),
6558 choices
=bluecat_ha_operstates
,
6559 default_value
=[8, 4],
6563 required_keys
=['warning', 'critical'],
6566 required_keys
=['oper_states'], # There is only one value, so its required
6572 register_check_parameters(
6573 RulespecGroupCheckParametersNetworking
,
6574 "steelhead_connections",
6575 _("Steelhead connections"),
6580 title
=_("Levels for total amount of connections"),
6582 Integer(title
=_("Warning at")),
6583 Integer(title
=_("Critical at")),
6588 title
=_("Levels for optimized connections"),
6590 Integer(title
=_("Warning at")),
6591 Integer(title
=_("Critical at")),
6596 title
=_("Levels for passthrough connections"),
6598 Integer(title
=_("Warning at")),
6599 Integer(title
=_("Critical at")),
6604 title
=_("Levels for half opened connections"),
6606 Integer(title
=_("Warning at")),
6607 Integer(title
=_("Critical at")),
6612 title
=_("Levels for half closed connections"),
6614 Integer(title
=_("Warning at")),
6615 Integer(title
=_("Critical at")),
6620 title
=_("Levels for established connections"),
6622 Integer(title
=_("Warning at")),
6623 Integer(title
=_("Critical at")),
6628 title
=_("Levels for active connections"),
6630 Integer(title
=_("Warning at")),
6631 Integer(title
=_("Critical at")),
6639 register_check_parameters(
6640 RulespecGroupCheckParametersStorage
,
6642 _("FibreChannel Ports (FCMGMT MIB)"),
6643 Dictionary(elements
=[
6646 title
=_("Throughput levels"),
6647 help=_("Please note: in a few cases the automatic detection of the link speed "
6648 "does not work. In these cases you have to set the link speed manually "
6649 "below if you want to monitor percentage values"),
6652 title
=_("Used bandwidth of port relative to the link speed"),
6654 Percentage(title
=_("Warning at"), unit
=_("percent")),
6655 Percentage(title
=_("Critical at"), unit
=_("percent")),
6658 title
=_("Used Bandwidth of port in megabyte/s"),
6660 Integer(title
=_("Warning at"), unit
=_("MByte/s")),
6661 Integer(title
=_("Critical at"), unit
=_("MByte/s")),
6666 title
=_("Assumed link speed"),
6667 help=_("If the automatic detection of the link speed does "
6668 "not work you can set the link speed here."),
6672 title
=_("CRC errors rate"),
6674 Percentage(title
=_("Warning at"), unit
=_("percent")),
6675 Percentage(title
=_("Critical at"), unit
=_("percent")),
6679 title
=_("Enc-Out frames rate"),
6681 Percentage(title
=_("Warning at"), unit
=_("percent")),
6682 Percentage(title
=_("Critical at"), unit
=_("percent")),
6686 title
=_("No-TxCredits errors"),
6688 Percentage(title
=_("Warning at"), unit
=_("percent")),
6689 Percentage(title
=_("Critical at"), unit
=_("percent")),
6693 title
=_("C3 discards"),
6695 Percentage(title
=_("Warning at"), unit
=_("percent")),
6696 Percentage(title
=_("Critical at"), unit
=_("percent")),
6700 title
=_("Averaging"),
6701 help=_("If this parameter is set, all throughputs will be averaged "
6702 "over the specified time interval before levels are being applied. Per "
6703 "default, averaging is turned off. "),
6711 # title = _("Allowed states (otherwise check will be critical)"),
6712 # choices = [ (1, _("unknown") ),
6713 # (2, _("failed") ),
6714 # (3, _("bypassed") ),
6715 # (4, _("active") ),
6716 # (5, _("loopback") ),
6717 # (6, _("txfault") ),
6718 # (7, _("nomedia") ),
6719 # (8, _("linkdown") ),
6722 # title = _("Physical state of port") ,
6724 # label = _("ignore physical state"),
6730 # title = _("Allowed states (otherwise check will be critical)"),
6731 # choices = [ (1, _("unknown") ),
6732 # (2, _("unused") ),
6734 # (4, _("warning") ),
6735 # (5, _("failure") ),
6736 # (6, _("not participating") ),
6737 # (7, _("initializing") ),
6738 # (8, _("bypass") ),
6742 # title = _("Operational state") ,
6744 # label = _("ignore operational state"),
6750 # title = _("Allowed states (otherwise check will be critical)"),
6751 # choices = [ (1, _("unknown") ),
6752 # (2, _("online") ),
6753 # (3, _("offline") ),
6754 # (4, _("bypassed") ),
6755 # (5, _("diagnostics") ),
6758 # title = _("Administrative state") ,
6760 # label = _("ignore administrative state"),
6765 title
=_("port name"),
6766 help=_("The name of the FC port"),
6771 register_check_parameters(
6772 RulespecGroupCheckParametersEnvironment
, "plug_count", _("Number of active Plugs"),
6774 help=_("Levels for the number of active plugs in a device."),
6776 Integer(title
=_("critical if below or equal"), default_value
=30),
6777 Integer(title
=_("warning if below or equal"), default_value
=32),
6778 Integer(title
=_("warning if above or equal"), default_value
=38),
6779 Integer(title
=_("critical if above or equal"), default_value
=40),
6782 # Rules for configuring parameters of checks (services)
6783 register_check_parameters(
6784 RulespecGroupCheckParametersEnvironment
, "ucs_bladecenter_chassis_voltage",
6785 _("UCS Bladecenter Chassis Voltage Levels"),
6787 help=_("Here you can configure the 3.3V and 12V voltage levels for each chassis."),
6791 title
=_("3.3 Volt Output Lower Levels"),
6793 Float(title
=_("warning if below or equal"), unit
="V", default_value
=3.25),
6794 Float(title
=_("critical if below or equal"), unit
="V", default_value
=3.20),
6798 title
=_("3.3 Volt Output Upper Levels"),
6800 Float(title
=_("warning if above or equal"), unit
="V", default_value
=3.4),
6801 Float(title
=_("critical if above or equal"), unit
="V", default_value
=3.45),
6803 ("levels_12v_lower",
6805 title
=_("12 Volt Output Lower Levels"),
6807 Float(title
=_("warning if below or equal"), unit
="V", default_value
=11.9),
6808 Float(title
=_("critical if below or equal"), unit
="V", default_value
=11.8),
6810 ("levels_12v_upper",
6812 title
=_("12 Volt Output Upper Levels"),
6814 Float(title
=_("warning if above or equal"), unit
="V", default_value
=12.1),
6815 Float(title
=_("critical if above or equal"), unit
="V", default_value
=12.2),
6817 ]), TextAscii(title
=_("Chassis"), help=_("The identifier of the chassis.")), "dict")
6819 register_check_parameters(
6820 RulespecGroupCheckParametersEnvironment
, "hp_msa_psu_voltage",
6821 _("HP MSA Power Supply Voltage Levels"),
6823 help=_("Here you can configure the 3.3V and 12V voltage levels for each power supply."),
6825 ("levels_33v_lower",
6827 title
=_("3.3 Volt Output Lower Levels"),
6829 Float(title
=_("warning if below or equal"), unit
="V", default_value
=3.25),
6830 Float(title
=_("critical if below or equal"), unit
="V", default_value
=3.20),
6832 ("levels_33v_upper",
6834 title
=_("3.3 Volt Output Upper Levels"),
6836 Float(title
=_("warning if above or equal"), unit
="V", default_value
=3.4),
6837 Float(title
=_("critical if above or equal"), unit
="V", default_value
=3.45),
6841 title
=_("5 Volt Output Lower Levels"),
6843 Float(title
=_("warning if below or equal"), unit
="V", default_value
=3.25),
6844 Float(title
=_("critical if below or equal"), unit
="V", default_value
=3.20),
6848 title
=_("5 Volt Output Upper Levels"),
6850 Float(title
=_("warning if above or equal"), unit
="V", default_value
=3.4),
6851 Float(title
=_("critical if above or equal"), unit
="V", default_value
=3.45),
6853 ("levels_12v_lower",
6855 title
=_("12 Volt Output Lower Levels"),
6857 Float(title
=_("warning if below or equal"), unit
="V", default_value
=11.9),
6858 Float(title
=_("critical if below or equal"), unit
="V", default_value
=11.8),
6860 ("levels_12v_upper",
6862 title
=_("12 Volt Output Upper Levels"),
6864 Float(title
=_("warning if above or equal"), unit
="V", default_value
=12.1),
6865 Float(title
=_("critical if above or equal"), unit
="V", default_value
=12.2),
6867 ]), TextAscii(title
=_("Power Supply name"), help=_("The identifier of the power supply.")),
6870 register_check_parameters(
6871 RulespecGroupCheckParametersApplications
, "jvm_gc", _("JVM garbage collection levels"),
6873 help=_("This ruleset also covers Tomcat, Jolokia and JMX. "),
6877 title
=_("Collection time levels"),
6880 title
=_("Time of garbage collection in ms per minute"),
6882 Integer(title
=_("Warning at"), unit
=_("ms"), allow_empty
=False),
6883 Integer(title
=_("Critical at"), unit
=_("ms"), allow_empty
=False),
6888 title
=_("Collection count levels"),
6891 title
=_("Count of garbage collection per minute"),
6893 Integer(title
=_("Warning at"), allow_empty
=False),
6894 Integer(title
=_("Critical at"), allow_empty
=False),
6899 title
=_("Name of the virtual machine and/or<br>garbage collection type"),
6900 help=_("The name of the application server"),
6904 register_check_parameters(
6905 RulespecGroupCheckParametersApplications
, "jvm_tp", _("JVM tomcat threadpool levels"),
6907 help=_("This ruleset also covers Tomcat, Jolokia and JMX. "),
6909 ("currentThreadCount",
6911 title
=_("Current thread count levels"),
6914 title
=_("Percentage levels of current thread count in threadpool"),
6916 Integer(title
=_("Warning at"), unit
=_(u
"%"), allow_empty
=False),
6917 Integer(title
=_("Critical at"), unit
=_(u
"%"), allow_empty
=False),
6920 ("currentThreadsBusy",
6922 title
=_("Current threads busy levels"),
6925 title
=_("Percentage of current threads busy in threadpool"),
6927 Integer(title
=_("Warning at"), unit
=_(u
"%"), allow_empty
=False),
6928 Integer(title
=_("Critical at"), unit
=_(u
"%"), allow_empty
=False),
6933 title
=_("Name of the virtual machine and/or<br>threadpool"),
6934 help=_("The name of the application server"),
6938 register_check_parameters(
6939 RulespecGroupCheckParametersApplications
, "docker_node_containers",
6940 _("Docker node container levels"),
6943 "Allows to define absolute levels for all, running, paused, and stopped containers."),
6947 title
=_("Containers upper levels"),
6949 Integer(title
=_("Warning at"), allow_empty
=False),
6950 Integer(title
=_("Critical at"), allow_empty
=False),
6954 title
=_("Containers lower levels"),
6956 Integer(title
=_("Warning at"), allow_empty
=False),
6957 Integer(title
=_("Critical at"), allow_empty
=False),
6959 ("running_upper_levels",
6961 title
=_("Running containers upper levels"),
6963 Integer(title
=_("Warning at"), allow_empty
=False),
6964 Integer(title
=_("Critical at"), allow_empty
=False),
6966 ("running_lower_levels",
6968 title
=_("Running containers lower levels"),
6970 Integer(title
=_("Warning at"), allow_empty
=False),
6971 Integer(title
=_("Critical at"), allow_empty
=False),
6973 ("paused_upper_levels",
6975 title
=_("Paused containers upper levels"),
6977 Integer(title
=_("Warning at"), allow_empty
=False),
6978 Integer(title
=_("Critical at"), allow_empty
=False),
6980 ("paused_lower_levels",
6982 title
=_("Paused containers lower levels"),
6984 Integer(title
=_("Warning at"), allow_empty
=False),
6985 Integer(title
=_("Critical at"), allow_empty
=False),
6987 ("stopped_upper_levels",
6989 title
=_("Stopped containers upper levels"),
6991 Integer(title
=_("Warning at"), allow_empty
=False),
6992 Integer(title
=_("Critical at"), allow_empty
=False),
6994 ("stopped_lower_levels",
6996 title
=_("Stopped containers lower levels"),
6998 Integer(title
=_("Warning at"), allow_empty
=False),
6999 Integer(title
=_("Critical at"), allow_empty
=False),
7003 register_check_parameters(
7004 RulespecGroupCheckParametersApplications
, "docker_node_disk_usage", _("Docker node disk usage"),
7007 _("Allows to define levels for the counts and size of Docker Containers, Images, Local Volumes, and the Build Cache."
7014 Filesize(title
=_("Warning at"), allow_empty
=False),
7015 Filesize(title
=_("Critical at"), allow_empty
=False),
7019 title
=_("Reclaimable"),
7021 Filesize(title
=_("Warning at"), allow_empty
=False),
7022 Filesize(title
=_("Critical at"), allow_empty
=False),
7026 title
=_("Total count"),
7028 Integer(title
=_("Warning at"), allow_empty
=False),
7029 Integer(title
=_("Critical at"), allow_empty
=False),
7035 Integer(title
=_("Warning at"), allow_empty
=False),
7036 Integer(title
=_("Critical at"), allow_empty
=False),
7041 help=_("Either Containers, Images, Local Volumes or Build Cache"),
7045 register_check_parameters(
7046 RulespecGroupCheckParametersStorage
,
7048 _("Heartbeat CRM general status"),
7051 title
=_("Maximum age"),
7052 help=_("Maximum accepted age of the reported data in seconds"),
7057 TextAscii(allow_empty
=False),
7058 title
=_("Expected DC"),
7059 help=_("The hostname of the expected distinguished controller of the cluster"),
7062 Integer(min_value
=2, default_value
=2),
7063 title
=_("Number of Nodes"),
7064 help=_("The expected number of nodes in the cluster"),
7067 Integer(min_value
=0,),
7068 title
=_("Number of Resources"),
7069 help=_("The expected number of resources in the cluster"),
7076 register_check_parameters(
7077 RulespecGroupCheckParametersStorage
, "heartbeat_crm_resources",
7078 _("Heartbeat CRM resource status"),
7080 TextAscii(allow_empty
=False),
7081 title
=_("Expected node"),
7082 help=_("The hostname of the expected node to hold this resource."),
7083 none_label
=_("Do not enforce the resource to be hold by a specific node."),
7086 title
=_("Resource Name"),
7087 help=_("The name of the cluster resource as shown in the service description."),
7091 register_check_parameters(
7092 RulespecGroupCheckParametersApplications
,
7094 _("Lotus Domino Tasks"),
7100 title
=_("Name of the task"),
7104 title
=_("Exact name of the task"),
7112 title
=_("Regular expression matching tasks"),
7113 help=_("This regex must match the <i>beginning</i> of the complete "
7114 "command line of the task including arguments"),
7115 forth
=lambda x
: x
[1:], # remove ~
7116 back
=lambda x
: "~" + x
, # prefix ~
7121 title
=_("Match all tasks"),
7124 match
=lambda x
: (not x
and 2) or (x
[0] == '~' and 1 or 0))),
7127 title
=_("Minimum number of matched tasks for WARNING state"),
7132 title
=_("Minimum number of matched tasks for OK state"),
7137 title
=_("Maximum number of matched tasks for OK state"),
7138 default_value
=99999,
7142 title
=_("Maximum number of matched tasks for WARNING state"),
7143 default_value
=99999,
7146 required_keys
=['warnmin', 'okmin', 'okmax', 'warnmax', 'process'],
7149 title
=_("Name of service"),
7150 help=_("This name will be used in the description of the service"),
7152 regex
="^[a-zA-Z_0-9 _.-]*$",
7153 regex_error
=_("Please use only a-z, A-Z, 0-9, space, underscore, "
7154 "dot and hyphen for your service description"),
7157 has_inventory
=False)
7159 register_check_parameters(
7160 RulespecGroupCheckParametersApplications
,
7161 "domino_mailqueues",
7162 _("Lotus Domino Mail Queues"),
7167 title
=_("Number of Mails in Queue"),
7169 Integer(title
=_("warning at"), default_value
=300),
7170 Integer(title
=_("critical at"), default_value
=350),
7173 required_keys
=['queue_length'],
7177 ('lnDeadMail', _('Mails in Dead Queue')),
7178 ('lnWaitingMail', _('Mails in Waiting Queue')),
7179 ('lnMailHold', _('Mails in Hold Queue')),
7180 ('lnMailTotalPending', _('Total Pending Mails')),
7181 ('InMailWaitingforDNS', _('Mails Waiting for DNS Queue')),
7183 title
=_("Domino Mail Queue Names"),
7188 register_check_parameters(
7189 RulespecGroupCheckParametersApplications
,
7191 _("Lotus Domino Users"),
7193 title
=_("Number of Lotus Domino Users"),
7195 Integer(title
=_("warning at"), default_value
=1000),
7196 Integer(title
=_("critical at"), default_value
=1500),
7202 register_check_parameters(
7203 RulespecGroupCheckParametersApplications
,
7204 "domino_transactions",
7205 _("Lotus Domino Transactions"),
7207 title
=_("Number of Transactions per Minute on a Lotus Domino Server"),
7209 Integer(title
=_("warning at"), default_value
=30000),
7210 Integer(title
=_("critical at"), default_value
=35000),
7216 register_check_parameters(
7217 RulespecGroupCheckParametersApplications
, "netscaler_dnsrates",
7218 _("Citrix Netscaler DNS counter rates"),
7220 help=_("Counter rates of DNS parameters for Citrix Netscaler Loadbalancer "
7226 title
=_("Upper Levels for Total Number of DNS queries"),
7228 Float(title
=_("Warning at"), default_value
=1500.0, unit
="/sec"),
7229 Float(title
=_("Critical at"), default_value
=2000.0, unit
="/sec")
7236 title
=_("Upper Levels for Total Number of DNS replies"),
7238 Float(title
=_("Warning at"), default_value
=1500.0, unit
="/sec"),
7239 Float(title
=_("Critical at"), default_value
=2000.0, unit
="/sec")
7245 register_check_parameters(
7246 RulespecGroupCheckParametersApplications
, "netscaler_tcp_conns",
7247 _("Citrix Netscaler Loadbalancer TCP Connections"),
7248 Dictionary(elements
=[
7252 title
=_("Max. number of client connections"),
7255 title
=_("Warning at"),
7256 default_value
=25000,
7259 title
=_("Critical at"),
7260 default_value
=30000,
7267 title
=_("Max. number of server connections"),
7270 title
=_("Warning at"),
7271 default_value
=25000,
7274 title
=_("Critical at"),
7275 default_value
=30000,
7281 register_check_parameters(
7282 RulespecGroupCheckParametersApplications
,
7283 "netscaler_sslcerts",
7284 _("Citrix Netscaler SSL certificates"),
7290 title
=_("Remaining days of validity"),
7292 Integer(title
=_("Warning below"), default_value
=30, min_value
=0),
7293 Integer(title
=_("Critical below"), default_value
=10, min_value
=0),
7298 TextAscii(title
=_("Name of Certificate"),),
7301 register_check_parameters(
7302 RulespecGroupCheckParametersEnvironment
,
7304 _("State of Siemens PLC Flags"),
7306 help=_("This rule sets the expected state, the one which should result in an OK state, "
7307 "of the monitored flags of Siemens PLC devices."),
7308 title
=_("Expected flag state"),
7310 (True, _("Expect the flag to be: On")),
7311 (False, _("Expect the flag to be: Off")),
7313 default_value
=True),
7315 title
=_("Device Name and Value Ident"),
7316 help=_("You need to concatenate the device name which is configured in the special agent "
7317 "for the PLC device separated by a space with the ident of the value which is also "
7318 "configured in the special agent."),
7323 register_check_parameters(
7324 RulespecGroupCheckParametersEnvironment
,
7325 "siemens_plc_duration",
7326 _("Siemens PLC Duration"),
7331 title
=_("Duration"),
7333 Age(title
=_("Warning at"),),
7334 Age(title
=_("Critical at"),),
7337 help=_("This rule is used to configure thresholds for duration values read from "
7338 "Siemens PLC devices."),
7339 title
=_("Duration levels"),
7342 title
=_("Device Name and Value Ident"),
7343 help=_("You need to concatenate the device name which is configured in the special agent "
7344 "for the PLC device separated by a space with the ident of the value which is also "
7345 "configured in the special agent."),
7350 register_check_parameters(
7351 RulespecGroupCheckParametersEnvironment
,
7352 "siemens_plc_counter",
7353 _("Siemens PLC Counter"),
7358 title
=_("Counter level"),
7360 Integer(title
=_("Warning at"),),
7361 Integer(title
=_("Critical at"),),
7364 help=_("This rule is used to configure thresholds for counter values read from "
7365 "Siemens PLC devices."),
7366 title
=_("Counter levels"),
7369 title
=_("Device Name and Value Ident"),
7370 help=_("You need to concatenate the device name which is configured in the special agent "
7371 "for the PLC device separated by a space with the ident of the value which is also "
7372 "configured in the special agent."),
7377 register_check_parameters(
7378 RulespecGroupCheckParametersStorage
, "bossock_fibers", _("Number of Running Bossock Fibers"),
7380 title
=_("Number of fibers"),
7382 Integer(title
=_("Warning at"), unit
=_("fibers")),
7383 Integer(title
=_("Critical at"), unit
=_("fibers")),
7384 ]), TextAscii(title
=_("Node ID")), "first")
7386 register_check_parameters(
7387 RulespecGroupCheckParametersEnvironment
, "carbon_monoxide", ("Carbon monoxide"),
7388 Dictionary(elements
=[
7391 title
="Levels in parts per million",
7393 Integer(title
=_("Warning at"), unit
=_("ppm"), default
=10),
7394 Integer(title
=_("Critical at"), unit
=_("ppm"), default
=25),