2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
10 # | Copyright Mathias Kettner 2014 mk@mathias-kettner.de |
11 # +------------------------------------------------------------------+
13 # This file is part of Check_MK.
14 # The official homepage is at http://mathias-kettner.de/check_mk.
16 # check_mk is free software; you can redistribute it and/or modify it
17 # under the terms of the GNU General Public License as published by
18 # the Free Software Foundation in version 2. check_mk is distributed
19 # in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
20 # out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
21 # PARTICULAR PURPOSE. See the GNU General Public License for more de-
22 # tails. You should have received a copy of the GNU General Public
23 # License along with GNU Make; see the file COPYING. If not, write
24 # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
25 # Boston, MA 02110-1301 USA.
28 import cmk
.utils
.defines
as defines
30 from cmk
.gui
.plugins
.wato
.active_checks
import check_icmp_params
32 import cmk
.gui
.mkeventd
as mkeventd
33 from cmk
.gui
.exceptions
import MKUserError
34 from cmk
.gui
.i18n
import _
35 from cmk
.gui
.valuespec
import (
61 OptionalDropdownChoice
,
64 from cmk
.gui
.plugins
.wato
import (
65 RulespecGroupCheckParametersApplications
,
66 RulespecGroupCheckParametersDiscovery
,
67 RulespecGroupCheckParametersEnvironment
,
68 RulespecGroupCheckParametersHardware
,
69 RulespecGroupCheckParametersNetworking
,
70 RulespecGroupCheckParametersOperatingSystem
,
71 RulespecGroupCheckParametersPrinters
,
72 RulespecGroupCheckParametersStorage
,
73 RulespecGroupCheckParametersVirtualization
,
75 register_check_parameters
,
81 # TODO: Sort all rules and check parameters into the figlet header sections.
82 # Beware: there are dependencies, so sometimes the order matters. All rules
83 # that are not yet handles are in the last section: in "Unsorted". Move rules
84 # from there into their appropriate sections until "Unsorted" is empty.
85 # Create new rules directly in the correct secions.
87 # .--Networking----------------------------------------------------------.
89 # | | \ | | ___| |___ _____ _ __| | _(_)_ __ __ _ |
90 # | | \| |/ _ \ __\ \ /\ / / _ \| '__| |/ / | '_ \ / _` | |
91 # | | |\ | __/ |_ \ V V / (_) | | | <| | | | | (_| | |
92 # | |_| \_|\___|\__| \_/\_/ \___/|_| |_|\_\_|_| |_|\__, | |
94 # '----------------------------------------------------------------------'
97 RulespecGroupCheckParametersNetworking
,
100 title
=_("PING and host check parameters"),
101 help=_("This rule sets the parameters for the host checks (via <tt>check_icmp</tt>) "
102 "and also for PING checks on ping-only-hosts. For the host checks only the "
103 "critical state is relevant, the warning levels are ignored."),
104 elements
=check_icmp_params
,
109 # .--Inventory-----------------------------------------------------------.
111 # | |_ _|_ ____ _____ _ __ | |_ ___ _ __ _ _ |
112 # | | || '_ \ \ / / _ \ '_ \| __/ _ \| '__| | | | |
113 # | | || | | \ V / __/ | | | || (_) | | | |_| | |
114 # | |___|_| |_|\_/ \___|_| |_|\__\___/|_| \__, | |
116 # '----------------------------------------------------------------------'
119 def transform_ipmi_inventory_rules(p
):
120 if not isinstance(p
, dict):
122 if p
.get("summarize", True):
124 if p
.get('ignored_sensors', []):
125 return ('single', {'ignored_sensors': p
["ignored_sensors"]})
126 return ('single', {})
130 RulespecGroupCheckParametersDiscovery
,
131 varname
="inventory_ipmi_rules",
132 title
=_("Discovery of IPMI sensors"),
135 orientation
="vertical",
137 [("summarize", _("Summary")),
138 ("single", _("Single"),
144 title
=_("Ignore the following IPMI sensors"),
145 help=_("Names of IPMI sensors that should be ignored during inventory "
146 "and when summarizing."
147 "The pattern specified here must match exactly the beginning of "
148 "the actual sensor name (case sensitive)."),
149 orientation
="horizontal")),
150 ("ignored_sensorstates",
152 title
=_("Ignore the following IPMI sensor states"),
154 "IPMI sensors with these states that should be ignored during inventory "
155 "and when summarizing."
156 "The pattern specified here must match exactly the beginning of "
157 "the actual sensor name (case sensitive)."),
158 orientation
="horizontal",
161 forth
=transform_ipmi_inventory_rules
),
165 RulespecGroupCheckParametersDiscovery
,
166 varname
="ewon_discovery_rules",
167 title
=_("eWON Discovery"),
168 help=_("The ewon vpn routers can rely data from a secondary device via snmp. "
169 "It doesn't however allow discovery of the device type relayed this way. "
170 "To allow interpretation of the data you need to pick the device manually."),
171 valuespec
=DropdownChoice(
172 title
=_("Device Type"),
173 label
=_("Select device type"),
175 (None, _("None selected")),
176 ("oxyreduct", _("Wagner OxyReduct")),
183 RulespecGroupCheckParametersDiscovery
,
184 varname
="mssql_transactionlogs_discovery",
185 title
=_("MSSQL Datafile and Transactionlog Discovery"),
186 valuespec
=Dictionary(
188 ("summarize_datafiles",
190 title
=_("Display only a summary of all Datafiles"),
191 label
=_("Summarize Datafiles"),
193 ("summarize_transactionlogs",
195 title
=_("Display only a summary of all Transactionlogs"),
196 label
=_("Summarize Transactionlogs"),
203 RulespecGroupCheckParametersDiscovery
,
204 varname
="inventory_services_rules",
205 title
=_("Windows Service Discovery"),
206 valuespec
=Dictionary(
210 title
=_("Services (Regular Expressions)"),
211 help=_('Regular expressions matching the begining of the internal name '
212 'or the description of the service. '
213 'If no name is given then this rule will match all services. The '
214 'match is done on the <i>beginning</i> of the service name. It '
215 'is done <i>case sensitive</i>. You can do a case insensitive match '
216 'by prefixing the regular expression with <tt>(?i)</tt>. Example: '
217 '<tt>(?i).*mssql</tt> matches all services which contain <tt>MSSQL</tt> '
218 'or <tt>MsSQL</tt> or <tt>mssql</tt> or...'),
219 orientation
="horizontal",
224 ('running', _('Running')),
225 ('stopped', _('Stopped')),
227 title
=_("Create check if service is in state"),
232 ('auto', _('Automatic')),
233 ('demand', _('Manual')),
234 ('disabled', _('Disabled')),
236 title
=_("Create check if service is in start mode"),
240 'This rule can be used to configure the inventory of the windows services check. '
241 'You can configure specific windows services to be monitored by the windows check by '
242 'selecting them by name, current state during the inventory, or start mode.'),
248 RulespecGroupCheckParametersDiscovery
,
249 varname
="inventory_solaris_services_rules",
250 title
=_("Solaris Service Discovery"),
251 valuespec
=Dictionary(
253 ('descriptions', ListOfStrings(title
=_("Descriptions"))),
254 ('categories', ListOfStrings(title
=_("Categories"))),
255 ('names', ListOfStrings(title
=_("Names"))),
256 ('instances', ListOfStrings(title
=_("Instances"))),
261 ("online", _("online")),
262 ("disabled", _("disabled")),
263 ("maintenance", _("maintenance")),
264 ("legacy_run", _("legacy run")),
270 title
=_("Service name"),
273 FixedValue("full_descr", title
=_("Full Description"), totext
=""),
275 "descr_without_prefix",
276 title
=_("Description without type prefix"),
282 'This rule can be used to configure the discovery of the Solaris services check. '
283 'You can configure specific Solaris services to be monitored by the Solaris check by '
284 'selecting them by description, category, name, or current state during the discovery.'
291 RulespecGroupCheckParametersDiscovery
,
292 varname
="discovery_systemd_units_services_rules",
293 title
=_("Systemd Service Discovery"),
294 valuespec
=Dictionary(
296 ('descriptions', ListOfStrings(title
=_("Descriptions"))),
297 ('names', ListOfStrings(title
=_("Service unit names"))),
302 ("active", "active"),
303 ("inactive", "inactive"),
304 ("failed", "failed"),
309 help=_('This rule can be used to configure the discovery of the Linux services check. '
310 'You can configure specific Linux services to be monitored by the Linux check by '
311 'selecting them by description, unit name, or current state during the discovery.'),
317 RulespecGroupCheckParametersDiscovery
,
318 varname
="discovery_win_dhcp_pools",
319 title
=_("Discovery of Windows DHCP Pools"),
320 valuespec
=Dictionary(elements
=[
323 title
=_("Discovery of empty DHCP pools"),
324 label
=_("Include empty pools into the monitoring"),
325 help=_("You can activate the creation of services for "
326 "DHCP pools, which contain no IP addresses."),
333 RulespecGroupCheckParametersDiscovery
,
334 varname
="inventory_if_rules",
335 title
=_("Network Interface and Switch Port Discovery"),
336 valuespec
=Dictionary(
341 (True, _('Use description')),
342 (False, _('Do not use description')),
344 title
=_("Description as service name for network interface checks"),
346 "This option lets Check_MK use the interface description as item instead "
347 "of the port number. If no description is available then the port number is "
352 (True, _('Use alias')),
353 (False, _('Do not use alias')),
355 title
=_("Alias as service name for network interface checks"),
357 "This option lets Check_MK use the alias of the port (ifAlias) as item instead "
358 "of the port number. If no alias is available then the port number is used "
363 (True, _('Pad port numbers with zeros')),
364 (False, _('Do not pad')),
366 title
=_("Port numbers"),
367 help=_("If this option is activated then Check_MK will pad port numbers of "
368 "network interfaces with zeroes so that all port descriptions from "
369 "all ports of a host or switch have the same length and thus sort "
370 "currectly in the GUI. In versions prior to 1.1.13i3 there was no "
371 "padding. You can switch back to the old behaviour by disabling this "
372 "option. This will retain the old service descriptions and the old "
373 "performance data."),
377 title
=_("Match interface alias (regex)"),
378 help=_("Only discover interfaces whose alias matches one of the configured "
379 "regular expressions. The match is done on the beginning of the alias. "
380 "This allows you to select interfaces based on the alias without having "
381 "the alias be part of the service description."),
382 orientation
="horizontal",
390 title
=_("Match interface description (regex)"),
392 "Only discover interfaces whose the description matches one of the configured "
393 "regular expressions. The match is done on the beginning of the description. "
394 "This allows you to select interfaces based on the description without having "
395 "the alias be part of the service description."),
396 orientation
="horizontal",
404 title
=_("Network interface port states to discover"),
406 _("When doing discovery on switches or other devices with network interfaces "
407 "then only ports found in one of the configured port states will be added to the monitoring. "
408 "Note: the state <i>admin down</i> is in fact not an <tt>ifOperStatus</tt> but represents the "
409 "<tt>ifAdminStatus</tt> of <tt>down</tt> - a port administratively switched off. If you check this option "
410 "then an alternate version of the check is being used that fetches the <tt>ifAdminState</tt> in addition. "
411 "This will add about 5% of additional SNMP traffic."),
412 choices
=defines
.interface_oper_states(),
418 title
=_("Network interface port types to discover"),
419 help=_("When doing discovery on switches or other devices with network interfaces "
420 "then only ports of the specified types will be created services for."),
421 choices
=defines
.interface_port_types(),
426 '6', '32', '62', '117', '127', '128', '129', '180', '181', '182', '205', '229'
433 _("Create extra service with RMON statistics data (if available for the device)"
435 (False, _('Do not create extra services')),
437 title
=_("Collect RMON statistics data"),
439 _("If you enable this option, for every RMON capable switch port an additional service will "
440 "be created which is always OK and collects RMON data. This will give you detailed information "
441 "about the distribution of packet sizes transferred over the port. Note: currently "
442 "this extra RMON check does not honor the inventory settings for switch ports. In a future "
443 "version of Check_MK RMON data may be added to the normal interface service and not add "
444 "an additional service."),
447 help=_('This rule can be used to control the inventory for network ports. '
448 'You can configure the port types and port states for inventory'
449 'and the use of alias or description as service name.'),
454 _brocade_fcport_adm_choices
= [
461 _brocade_fcport_op_choices
= [
469 _brocade_fcport_phy_choices
= [
471 (2, 'noTransceiver(2)'),
472 (3, 'laserFault(3)'),
479 (10, 'validating(10)'),
480 (11, 'invalidModule(11)'),
481 (14, 'noSigDet(14)'),
482 (255, 'unkown(255)'),
486 RulespecGroupCheckParametersDiscovery
,
487 varname
="brocade_fcport_inventory",
488 title
=_("Brocade Port Discovery"),
489 valuespec
=Dictionary(
493 title
=_("Use port name as service name"),
494 label
=_("use port name"),
496 help=_("This option lets Check_MK use the port name as item instead of the "
497 "port number. If no description is available then the port number is "
501 title
=_("add \"ISL\" to service description for interswitch links"),
504 help=_("This option lets Check_MK add the string \"ISL\" to the service "
505 "description for interswitch links."))),
508 title
=_("Administrative port states to discover"),
510 "When doing service discovery on brocade switches only ports with the given administrative "
511 "states will be added to the monitoring system."),
512 choices
=_brocade_fcport_adm_choices
,
515 default_value
=['1', '3', '4'],
519 title
=_("Physical port states to discover"),
521 "When doing service discovery on brocade switches only ports with the given physical "
522 "states will be added to the monitoring system."),
523 choices
=_brocade_fcport_phy_choices
,
526 default_value
=[3, 4, 5, 6, 7, 8, 9, 10])),
529 title
=_("Operational port states to discover"),
531 "When doing service discovery on brocade switches only ports with the given operational "
532 "states will be added to the monitoring system."),
533 choices
=_brocade_fcport_op_choices
,
536 default_value
=[1, 2, 3, 4])),
538 help=_('This rule can be used to control the service discovery for brocade ports. '
539 'You can configure the port states for inventory '
540 'and the use of the description as service name.'),
546 # Next step in conversion: introduce "levels"
547 def ps_convert_from_singlekeys(old_params
):
549 params
.update(ps_convert_from_tuple(old_params
))
550 if "warnmin" in params
:
552 params
.pop("warnmin", 1),
553 params
.pop("okmin", 1),
554 params
.pop("warnmax", 99999),
555 params
.pop("okmax", 99999),
560 def ps_convert_inventorized_from_singlekeys(old_params
):
561 params
= ps_convert_from_singlekeys(old_params
)
564 if 'process' in params
:
565 del params
['process']
569 process_level_elements
= [
572 title
=_('Levels for process count'),
574 _("Please note that if you specify and also if you modify levels here, the change is activated "
575 "only during an inventory. Saving this rule is not enough. This is due to the nature of inventory rules."
579 title
=_("Critical below"),
584 title
=_("Warning below"),
589 title
=_("Warning above"),
594 title
=_("Critical above"),
602 title
=_("Levels on total CPU utilization"),
603 help=_("By activating this options you can set levels on the total "
604 "CPU utilization of all included processes."),
606 Percentage(title
=_("Warning at"), default_value
=90, maxvalue
=10000),
607 Percentage(title
=_("Critical at"), default_value
=98, maxvalue
=10000),
612 title
=_("CPU Averaging"),
613 help=_("By activating averaging, Check_MK will compute the average of "
614 "the total CPU utilization over a given interval. If you have defined "
615 "alerting levels then these will automatically be applied on the "
616 "averaged value. This helps to mask out short peaks. "),
623 title
=_("Levels on CPU utilization of a single process"),
624 help=_("Here you can define levels on the CPU utilization of single "
625 "processes. For performance reasons CPU Averaging will not be "
626 "applied to to the levels of single processes."),
628 Percentage(title
=_("Warning at"), default_value
=90, maxvalue
=10000),
629 Percentage(title
=_("Critical at"), default_value
=98, maxvalue
=10000),
634 title
=_("Maximum allowed age"),
635 help=_("Alarms you if the age of the process (not the consumed CPU "
636 "time, but the real time) exceed the configured levels."),
638 Age(title
=_("Warning at"), default_value
=3600),
639 Age(title
=_("Critical at"), default_value
=7200),
643 title
=_("Virtual memory usage"),
645 Filesize(title
=_("Warning at"), default_value
=1000 * 1024 * 1024 * 1024),
646 Filesize(title
=_("Critical at"), default_value
=2000 * 1024 * 1024 * 1024),
651 title
=_("Physical memory usage"),
653 Filesize(title
=_("Warning at"), default_value
=100 * 1024 * 1024),
654 Filesize(title
=_("Critical at"), default_value
=200 * 1024 * 1024),
657 ("resident_levels_perc",
659 title
=_("Physical memory usage, in percentage of total RAM"),
661 Percentage(title
=_("Warning at"), default_value
=25.0),
662 Percentage(title
=_("Critical at"), default_value
=50.0),
666 title
=_('Handle Count (Windows only)'),
668 "The number of object handles in the processes object table. This includes open handles to "
669 "threads, files and other resources like registry keys."),
672 title
=_("Warning above"),
676 title
=_("Critical above"),
683 title
=_("Enable per-process details in long-output"),
684 label
=_("Enable per-process details"),
686 _("If active, the long output of this service will contain a list of "
687 "all the matching processes and their details (i.e. PID, CPU usage, memory usage). "
688 "Please note that HTML output will only work if \"Escape HTML codes in plugin output\" is "
689 "disabled in global settings. This might expose you to Cross-Site-Scripting (everyone "
690 "with write-access to checks could get scripts executed on the monitoring site in the context "
691 "of the user of the monitoring site) so please do this if you understand the consequences."
694 (None, _("Disable")),
695 ("text", _("Text output")),
696 ("html", _("HTML output")),
698 default_value
="disable",
703 # In version 1.2.4 the check parameters for the resulting ps check
704 # where defined in the dicovery rule. We moved that to an own rule
705 # in the classical check parameter style. In order to support old
706 # configuration we allow reading old discovery rules and ship these
707 # settings in an optional sub-dictionary.
708 def convert_inventory_processes(old_dict
):
709 new_dict
= {"default_params": {}}
710 for key
, value
in old_dict
.items():
719 new_dict
["default_params"][key
] = value
720 elif key
!= "perfdata":
721 new_dict
[key
] = value
723 # New cpu rescaling load rule
724 if old_dict
.get('cpu_rescale_max') is None:
725 new_dict
['cpu_rescale_max'] = True
730 def forbid_re_delimiters_inside_groups(pattern
, varprefix
):
731 # Used as input validation in PS check wato config
732 group_re
= r
'\(.*?\)'
733 for match
in re
.findall(group_re
, pattern
):
734 for char
in ['\\b', '$', '^']:
738 _('"%s" is not allowed inside the regular expression group %s. '
739 'Bounding characters inside groups will vanish after discovery, '
740 'because processes are instanced for every matching group. '
741 'Thus enforce delimiters outside the group.') % (char
, match
))
745 RulespecGroupCheckParametersDiscovery
,
746 varname
="inventory_processes_rules",
747 title
=_('Process Discovery'),
749 "This ruleset defines criteria for automatically creating checks for running processes "
750 "based upon what is running when the service discovery is done. These services will be "
751 "created with default parameters. They will get critical when no process is running and "
752 "OK otherwise. You can parameterize the check with the ruleset <i>State and count of processes</i>."
759 title
=_('Process Name'),
763 _('<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 '
764 'expression and be prefixed with ~. For each <tt>%s</tt> in the description, the expression has to contain one "group". A group '
765 '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 '
766 'matching the pattern, it will substitute all such groups with the actual values when creating the check. That way one '
767 'rule can create several checks on a host.</p>'
768 '<p>If the pattern contains more groups then occurrances of <tt>%s</tt> in the service description then only the first matching '
769 'subexpressions are used for the service descriptions. The matched substrings corresponding to the remaining groups '
770 'are copied into the regular expression, nevertheless.</p>'
771 '<p>As an alternative to <tt>%s</tt> you may also use <tt>%1</tt>, <tt>%2</tt>, etc. '
772 'These will be replaced by the first, second, ... matching group. This allows you to reorder things.</p>'
778 title
=_("Process Matching"),
782 title
=_("Exact name of the process without argments"),
783 label
=_("Executable:"),
790 validate
=forbid_re_delimiters_inside_groups
,
792 title
=_("Regular expression matching command line"),
793 label
=_("Command line:"),
795 _("This regex must match the <i>beginning</i> of the complete "
796 "command line of the process including arguments.<br>"
797 "When using groups, matches will be instantiated "
798 "during process discovery. e.g. (py.*) will match python, python_dev "
799 "and python_test and discover 3 services. At check time, because "
800 "python is a substring of python_test and python_dev it will aggregate"
801 "all process that start with python. If that is not the intended behavior "
802 "please use a delimiter like '$' or '\\b' around the group, e.g. (py.*)$"
804 forth
=lambda x
: x
[1:], # remove ~
805 back
=lambda x
: "~" + x
, # prefix ~
810 title
=_("Match all processes"),
813 match
=lambda x
: (not x
and 2) or (x
[0] == '~' and 1 or 0),
814 default_value
='/usr/sbin/foo')),
817 title
=_('Name of the User'),
823 title
=_("Match all users"),
826 title
=_('Exact name of the user'),
831 title
=_('Grab user from found processess'),
836 _('<p>The user specification can either be a user name (string). The inventory will then trigger only if that user matches '
837 'the user the process is running as and the resulting check will require that user. Alternatively you can specify '
838 '"grab user". If user is not selected the created check will not check for a specific user.</p>'
839 '<p>Specifying "grab user" makes the created check expect the process to run as the same user as during inventory: the user '
840 'name will be hardcoded into the check. In that case if you put %u into the service description, that will be replaced '
841 'by the actual user name during inventory. You need that if your rule might match for more than one user - your would '
842 'create duplicate services with the same description otherwise.</p><p>Windows users are specified by the namespace followed by '
843 'the actual user name. For example "\\\\NT AUTHORITY\\NETWORK SERVICE" or "\\\\CHKMKTEST\\Administrator".</p>'
848 title
=_("Add custom icon or action"),
850 "You can assign icons or actions to the found services in the status GUI."
855 title
=_("CPU rescale maximum load"),
856 help=_("CPU utilization is delivered by the Operating "
857 "System as a per CPU core basis. Thus each core contributes "
858 "with a 100% at full utilization, producing a maximum load "
859 "of N*100% (N=number of cores). For simplicity this maximum "
860 "can be rescaled down, making 100% the maximum and thinking "
861 "in terms of total CPU utilization."),
863 orientation
="vertical",
865 (True, _("100% is all cores at full load")),
867 _("<b>N</b> * 100% as each core contributes with 100% at full load")),
871 title
=_("Default parameters for detected services"),
873 _("Here you can select default parameters that are being set "
874 "for detected services. Note: the preferred way for setting parameters is to use "
875 "the rule set <a href='wato.py?varname=checkgroup_parameters%3Apsmode=edit_ruleset'> "
876 "State and Count of Processes</a> instead. "
877 "A change there will immediately be active, while a change in this rule "
878 "requires a re-discovery of the services."),
879 elements
=process_level_elements
,
882 required_keys
=["descr", "cpu_rescale_max"],
884 forth
=convert_inventory_processes
,
890 RulespecGroupCheckParametersDiscovery
,
891 varname
="inv_domino_tasks_rules",
892 title
=_('Lotus Domino Task Discovery'),
893 help=_("This rule controls the discovery of tasks on Lotus Domino systems. "
894 "Any changes later on require a host re-discovery"),
895 valuespec
=Dictionary(
899 title
=_('Service Description'),
902 _('<p>The service description may contain one or more occurances of <tt>%s</tt>. In this '
903 'case, the pattern must be a regular expression prefixed with ~. For each '
904 '<tt>%s</tt> in the description, the expression has to contain one "group". A group '
905 'is a subexpression enclosed in brackets, for example <tt>(.*)</tt> or '
906 '<tt>([a-zA-Z]+)</tt> or <tt>(...)</tt>. When the inventory finds a task '
907 'matching the pattern, it will substitute all such groups with the actual values when '
908 'creating the check. In this way one rule can create several checks on a host.</p>'
909 '<p>If the pattern contains more groups than occurrences of <tt>%s</tt> in the service '
910 'description, only the first matching subexpressions are used for the service '
911 'descriptions. The matched substrings corresponding to the remaining groups '
912 'are nevertheless copied into the regular expression.</p>'
913 '<p>As an alternative to <tt>%s</tt> you may also use <tt>%1</tt>, <tt>%2</tt>, etc. '
914 'These expressions will be replaced by the first, second, ... matching group, allowing '
915 'you to reorder things.</p>'),
920 title
=_("Task Matching"),
923 title
=_("Exact name of the task"),
931 title
=_("Regular expression matching command line"),
932 help=_("This regex must match the <i>beginning</i> of the task"),
933 forth
=lambda x
: x
[1:], # remove ~
934 back
=lambda x
: "~" + x
, # prefix ~
939 title
=_("Match all tasks"),
942 match
=lambda x
: (not x
and 2) or (x
[0] == '~' and 1 or 0),
943 default_value
='foo')),
948 _("Please note that if you specify and also if you modify levels here, the change is "
949 "activated only during an inventory. Saving this rule is not enough. This is due to "
950 "the nature of inventory rules."),
953 title
=_("Critical below"),
958 title
=_("Warning below"),
963 title
=_("Warning above"),
968 title
=_("Critical above"),
975 required_keys
=['match', 'levels', 'descr'],
981 RulespecGroupCheckParametersDiscovery
,
982 varname
="inventory_sap_values",
983 title
=_('SAP R/3 Single Value Inventory'),
984 valuespec
=Dictionary(
989 title
=_("Node Path Matching"),
992 title
=_("Exact path of the node"),
1000 title
=_("Regular expression matching the path"),
1001 help=_("This regex must match the <i>beginning</i> of the complete "
1002 "path of the node as reported by the agent"),
1003 forth
=lambda x
: x
[1:], # remove ~
1004 back
=lambda x
: "~" + x
, # prefix ~
1009 title
=_("Match all nodes"),
1012 match
=lambda x
: (not x
and 2) or (x
[0] == '~' and 1 or 0),
1014 'SAP CCMS Monitor Templates/Dialog Overview/Dialog Response Time/ResponseTime')
1016 ('limit_item_levels',
1018 title
=_("Limit Path Levels for Service Names"),
1019 unit
=_('path levels'),
1022 _("The service descriptions of the inventorized services are named like the paths "
1023 "in SAP. You can use this option to let the inventory function only use the last "
1024 "x path levels for naming."),
1027 optional_keys
=['limit_item_levels'],
1033 RulespecGroupCheckParametersDiscovery
,
1034 varname
="sap_value_groups",
1035 title
=_('SAP Value Grouping Patterns'),
1036 help=_('The check <tt>sap.value</tt> normally creates one service for each SAP value. '
1037 'By defining grouping patterns, you can switch to the check <tt>sap.value-groups</tt>. '
1038 'That check monitors a list of SAP values at once.'),
1041 help=_("This defines one value grouping pattern"),
1043 orientation
="horizontal",
1045 TextAscii(title
=_("Name of group"),),
1048 orientation
="vertical",
1051 title
=_("Include Pattern"),
1055 title
=_("Exclude Pattern"),
1062 add_label
=_("Add pattern group"),
1068 RulespecGroupCheckParametersDiscovery
,
1069 varname
="inventory_heartbeat_crm_rules",
1070 title
=_("Heartbeat CRM Discovery"),
1071 valuespec
=Dictionary(
1075 title
=_("Naildown the DC"),
1076 label
=_("Mark the currently distinguished controller as preferred one"),
1078 "Nails down the DC to the node which is the DC during discovery. The check "
1079 "will report CRITICAL when another node becomes the DC during later checks."))
1081 ("naildown_resources",
1083 title
=_("Naildown the resources"),
1084 label
=_("Mark the nodes of the resources as preferred one"),
1086 "Nails down the resources to the node which is holding them during discovery. "
1087 "The check will report CRITICAL when another holds the resource during later checks."
1090 help=_('This rule can be used to control the discovery for Heartbeat CRM checks.'),
1097 RulespecGroupCheckParametersDiscovery
,
1098 varname
="inventory_df_rules",
1099 title
=_("Discovery parameters for filesystem checks"),
1100 valuespec
=Dictionary(
1102 ("include_volume_name", Checkbox(title
=_("Include Volume name in item"))),
1105 title
=_("Filesystem types to ignore"),
1111 ("iso9660", "iso9660"),
1113 default_value
=["tmpfs", "nfs", "smbfs", "cifs", "iso9660"])),
1114 ("never_ignore_mountpoints",
1117 title
=_(u
"Mountpoints to never ignore"),
1119 u
"Regardless of filesystem type, these mountpoints will always be discovered."
1120 u
"Globbing or regular expressions are currently not supported."),
1127 RulespecGroupCheckParametersDiscovery
,
1128 varname
="inventory_mssql_counters_rules",
1129 title
=_("Include MSSQL Counters services"),
1130 valuespec
=Dictionary(
1132 ("add_zero_based_services", Checkbox(title
=_("Include service with zero base."))),
1139 RulespecGroupCheckParametersDiscovery
,
1140 varname
="inventory_fujitsu_ca_ports",
1141 title
=_("Discovery of Fujtsu storage CA ports"),
1142 valuespec
=Dictionary(
1144 ("indices", ListOfStrings(title
=_("CA port indices"))),
1147 title
=_("CA port modes"),
1151 ("CARA", _("CARA")),
1152 ("Initiator", _("Initiator")),
1162 RulespecGroupCheckParametersDiscovery
,
1163 varname
="discovery_mssql_backup",
1164 title
=_("Discovery of MSSQL backup"),
1165 valuespec
=Dictionary(
1169 title
=_("Backup modes"),
1171 ("summary", _("Create a service for each instance")),
1172 ("per_type", _("Create a service for each instance and backup type")),
1179 # .--Applications--------------------------------------------------------.
1181 # | / \ _ __ _ __ | (_) ___ __ _| |_(_) ___ _ __ ___ |
1182 # | / _ \ | '_ \| '_ \| | |/ __/ _` | __| |/ _ \| '_ \/ __| |
1183 # | / ___ \| |_) | |_) | | | (_| (_| | |_| | (_) | | | \__ \ |
1184 # | /_/ \_\ .__/| .__/|_|_|\___\__,_|\__|_|\___/|_| |_|___/ |
1186 # '----------------------------------------------------------------------'
1189 RulespecGroupCheckParametersApplications
,
1190 varname
="logwatch_rules",
1191 title
=_('Logwatch Patterns'),
1192 valuespec
=Transform(
1195 ("reclassify_patterns",
1198 help=_("This defines one logfile pattern rule"),
1200 orientation
="horizontal",
1205 ('C', _('CRITICAL')),
1206 ('W', _('WARNING')),
1212 title
=_("Pattern (Regex)"),
1221 title
=_("Reclassify state matching regex pattern"),
1223 _('<p>You can define one or several patterns (regular expressions) in each logfile pattern rule. '
1224 'These patterns are applied to the selected logfiles to reclassify the '
1225 'matching log messages. The first pattern which matches a line will '
1226 'be used for reclassifying a message. You can use the '
1227 '<a href="wato.py?mode=pattern_editor">Logfile Pattern Analyzer</a> '
1228 'to test the rules you defined here.</p>'
1229 '<p>Select "Ignore" as state to get the matching logs deleted. Other states will keep the '
1230 'log entries but reclassify the state of them.</p>'),
1231 add_label
=_("Add pattern"),
1233 ("reclassify_states",
1235 title
=_("Reclassify complete state"),
1237 "This setting allows you to convert all incoming states to another state. "
1238 "The option is applied before the state conversion via regexes. So the regex values can "
1239 "modify the state even further."),
1243 title
=_("Change CRITICAL State to"),
1245 ('C', _('CRITICAL')),
1246 ('W', _('WARNING')),
1249 ('.', _('Context Info')),
1255 title
=_("Change WARNING State to"),
1257 ('C', _('CRITICAL')),
1258 ('W', _('WARNING')),
1261 ('.', _('Context Info')),
1267 title
=_("Change OK State to"),
1269 ('C', _('CRITICAL')),
1270 ('W', _('WARNING')),
1273 ('.', _('Context Info')),
1279 title
=_("Change Context Info to"),
1281 ('C', _('CRITICAL')),
1282 ('W', _('WARNING')),
1285 ('.', _('Context Info')),
1290 optional_keys
=False,
1293 optional_keys
=["reclassify_states"],
1295 forth
=lambda x
: isinstance(x
, dict) and x
or {"reclassify_patterns": x
}),
1298 itemhelp
=_("Put the item names of the logfiles here. For example \"System$\" "
1299 "to select the service \"LOG System\". You can use regular "
1300 "expressions which must match the beginning of the logfile name."),
1304 register_check_parameters(
1305 RulespecGroupCheckParametersApplications
,
1307 _("Linux quota check"),
1312 title
=_("Monitor user quotas"),
1317 title
=_("Monitor group quotas"),
1322 title
=_("filesystem"),
1323 help=_("Name of filesystem with quotas enabled"),
1328 register_check_parameters(
1329 RulespecGroupCheckParametersApplications
, "ruckus_mac", _("Ruckus Spot Unique MAC addresses"),
1334 title
=_("Inside unique MACs"),
1338 title
=_("Upper levels"),
1340 Integer(title
=_("Warning at")),
1341 Integer(title
=_("Critical at")),
1346 title
=_("Lower levels"),
1348 Integer(title
=_("Warning if below")),
1349 Integer(title
=_("Critical if below")),
1355 title
=_("Outside unique MACs"),
1359 title
=_("Upper levels"),
1361 Integer(title
=_("Warning at")),
1362 Integer(title
=_("Critical at")),
1367 title
=_("Lower levels"),
1369 Integer(title
=_("Warning if below")),
1370 Integer(title
=_("Critical if below")),
1376 register_check_parameters(
1377 RulespecGroupCheckParametersApplications
, "ruckus_ap", _("Ruckus Spot Access Points"),
1383 Integer(title
=_("Warning at"), default_value
=1, unit
=_("devices")),
1384 Integer(title
=_("Critical at"), default_value
=1, unit
=_("devices")),
1387 label
=_("Levels for <i>device time drifted</i>"),
1388 none_label
=_("No levels set"),
1389 none_value
=(None, None)),
1393 Integer(title
=_("Warning at"), default_value
=1, unit
=_("devices")),
1394 Integer(title
=_("Critical at"), default_value
=1, unit
=_("devices")),
1397 label
=_("Levels for <i>device not responding</i>"),
1398 none_label
=_("No levels set"),
1399 none_value
=(None, None)),
1402 help=_("Name of the band, e.g. 5 GHz"),
1405 vs_license
= Alternative(
1406 title
=_("Levels for Number of Licenses"),
1411 title
=_("Absolute levels for unused licenses"),
1413 Integer(title
=_("Warning below"), default_value
=5, unit
=_("unused licenses")),
1414 Integer(title
=_("Critical below"), default_value
=0, unit
=_("unused licenses")),
1417 title
=_("Percentual levels for unused licenses"),
1419 Percentage(title
=_("Warning below"), default_value
=10.0),
1420 Percentage(title
=_("Critical below"), default_value
=0),
1424 totext
=_("Critical when all licenses are used"),
1425 title
=_("Go critical if all licenses are used"),
1429 title
=_("Always report OK"),
1430 totext
=_("Alerting depending on the number of used licenses is disabled"),
1434 register_check_parameters(
1435 RulespecGroupCheckParametersApplications
, "esx_licenses", _("Number of used VMware licenses"),
1438 title
=_("Name of the license"),
1439 help=_("For example <tt>VMware vSphere 5 Standard</tt>"),
1443 register_check_parameters(
1444 RulespecGroupCheckParametersApplications
, "ibmsvc_licenses",
1445 _("Number of used IBM SVC licenses"), vs_license
,
1447 title
=_("ID of the license, e.g. <tt>virtualization</tt>"),
1451 register_check_parameters(
1452 RulespecGroupCheckParametersApplications
, "citrix_licenses",
1453 _("Number of used Citrix licenses"), vs_license
,
1455 title
=_("ID of the license, e.g. <tt>PVSD_STD_CCS</tt>"),
1459 register_check_parameters(
1460 RulespecGroupCheckParametersApplications
, "rds_licenses",
1461 _("Number of used Remote Desktop Licenses"), vs_license
,
1463 title
=_("ID of the license, e.g. <tt>Windows Server 2008 R2</tt>"),
1467 register_check_parameters(
1468 RulespecGroupCheckParametersApplications
,
1470 _("Windows License"),
1471 Dictionary(elements
=[
1474 title
=_("Allowed license states"),
1475 help=_("Here you can specify the allowed license states for windows."),
1476 default_value
=['Licensed', 'Initial grace period'],
1480 title
=_("Time until license expiration"),
1481 help=_("Remaining days until the Windows license expires"),
1483 Age(title
=_("Warning at"), default_value
=14 * 24 * 60 * 60),
1484 Age(title
=_("Critical at"), default_value
=7 * 24 * 60 * 60)
1491 register_check_parameters(
1492 RulespecGroupCheckParametersApplications
, "citrix_sessions",
1493 _("Citrix Terminal Server Sessions"),
1494 Dictionary(elements
=[
1497 title
=_("Total number of Sessions"),
1499 Integer(title
=_("warning at"), unit
="Sessions"),
1500 Integer(title
=_("critical at"), unit
="Session"),
1504 title
=_("Number of Active Sessions"),
1506 Integer(title
=_("warning at"), unit
="Sessions"),
1507 Integer(title
=_("critical at"), unit
="Session"),
1511 title
=_("Number of Inactive Sessions"),
1513 Integer(title
=_("warning at"), unit
="Sessions"),
1514 Integer(title
=_("critical at"), unit
="Session"),
1518 register_check_parameters(
1519 RulespecGroupCheckParametersApplications
,
1521 _("State of Citrix VMs"),
1522 Dictionary(elements
=[(
1523 "registrationstate",
1525 title
=_("Interpretation of Registration States"),
1527 ("Unregistered", MonitoringState(title
=_("Unregistered"), default_value
=2)),
1528 ("Initializing", MonitoringState(title
=_("Initializing"), default_value
=1)),
1529 ("Registered", MonitoringState(title
=_("Registered"), default_value
=0)),
1530 ("AgentError", MonitoringState(title
=_("Agent Error"), default_value
=2)),
1532 optional_keys
=False,
1539 register_check_parameters(
1540 RulespecGroupCheckParametersApplications
,
1542 _("MSSQL Statistics"),
1545 ("batch_requests/sec",
1547 title
=_("Batch Requests/sec"),
1549 Float(title
=_("warning at"), unit
=_("/sec"), default_value
=100000.0),
1550 Float(title
=_("critical at"), unit
=_("/sec"), default_value
=200000.0),
1552 ("sql_compilations/sec",
1554 title
=_("SQL Compilations/sec"),
1556 Float(title
=_("warning at"), unit
=_("/sec"), default_value
=10000.0),
1557 Float(title
=_("critical at"), unit
=_("/sec"), default_value
=20000.0),
1559 ("sql_re-compilations/sec",
1561 title
=_("SQL Re-Compilations/sec"),
1563 Float(title
=_("warning at"), unit
=_("/sec"), default_value
=10000.0),
1564 Float(title
=_("critical at"), unit
=_("/sec"), default_value
=200.0),
1568 title
=_("Locks/Batch"),
1570 Float(title
=_("warning at"), default_value
=1000.0),
1571 Float(title
=_("critical at"), default_value
=3000.0),
1574 TextAscii(title
=_("Counter ID"),),
1578 register_check_parameters(
1579 RulespecGroupCheckParametersApplications
,
1581 _("MSSQL Instance"),
1583 elements
=[("map_connection_state",
1584 MonitoringState(title
=_("Connection status"), default_value
=2))],),
1585 TextAscii(title
=_("Instance identifier"),),
1589 register_check_parameters(
1590 RulespecGroupCheckParametersApplications
,
1592 _("MSSQL Databases properties"),
1593 Dictionary(elements
=[
1597 ("ONLINE", MonitoringState(title
=_("Database Online"))),
1598 ("OFFLINE", MonitoringState(title
=_("Database Offline"))),
1599 ("RESTORING", MonitoringState(title
=_("Database Files are restored"))),
1600 ("RECOVERING", MonitoringState(title
=_("Database is being recovered"))),
1601 ("RECOVERY_PENDING", MonitoringState(title
=_("Database must be recovered"))),
1602 ("SUSPECT", MonitoringState(title
=_("Database Suspect"))),
1603 ("EMERGENCY", MonitoringState(title
=_("Database changed to emergency"))),
1605 title
=_('Map Database States'),
1608 ("map_auto_close_state",
1611 ("on", MonitoringState(title
=_("Auto close on"), default_value
=1)),
1612 ("off", MonitoringState(title
=_("Auto close off"))),
1614 title
=_('Map auto close status'),
1617 ("map_auto_shrink_state",
1620 ("on", MonitoringState(title
=_("Auto shrink on"), default_value
=1)),
1621 ("off", MonitoringState(title
=_("Auto shrink off"))),
1623 title
=_('Map auto shrink status'),
1627 TextAscii(title
=_("Database identifier"),),
1631 register_check_parameters(
1632 RulespecGroupCheckParametersApplications
,
1633 "mssql_connections",
1634 _("MSSQL Connections"),
1635 Dictionary(elements
=[(
1638 title
=_("Upper levels for the number of active database connections"),
1640 Integer(title
=_("Warning if over"), default_value
=20),
1641 Integer(title
=_("Critical if over"), default_value
=50),
1644 TextAscii(title
=_("Database identifier"), allow_empty
=True),
1648 register_check_parameters(
1649 RulespecGroupCheckParametersApplications
, "varnish_cache", _("Varnish Cache"),
1654 title
=_("Upper levels for \"cache misses\" per second"),
1656 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1657 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1661 register_check_parameters(
1662 RulespecGroupCheckParametersApplications
, "varnish_client", _("Varnish Client"),
1667 title
=_("Upper levels for \"clients dropped\" per second"),
1669 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1670 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1674 title
=_("Upper levels for \"client requests\" per second"),
1676 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1677 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1681 register_check_parameters(
1682 RulespecGroupCheckParametersApplications
, "varnish_backend", _("Varnish Backend"),
1687 title
=_("Upper levels for \"backend connections busy/too many\" per second"),
1689 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1690 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1694 title
=_("Upper levels for \"backend connections failures\" per second"),
1696 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1697 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1702 "Upper levels for \"backend connections unhealthy/not attempted\" per second"),
1704 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1705 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1709 register_check_parameters(
1710 RulespecGroupCheckParametersApplications
, "varnish_fetch", _("Varnish Fetch"),
1715 title
=_("Upper levels for \"fetch no body (1xx)\" per second"),
1717 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1718 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1722 title
=_("Upper levels for \"fetch no body (204)\" per second"),
1724 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1725 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1729 title
=_("Upper levels for \"fetch no body (304)\" per second"),
1731 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1732 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1736 title
=_("Upper levels for \"fetch had bad headers\" per second"),
1738 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1739 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1743 title
=_("Upper levels for \"fetch EOF\" per second"),
1745 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1746 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1750 title
=_("Upper levels for \"fetch failed\" per second"),
1752 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1753 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1757 title
=_("Upper levels for \"fetch zero length\" per second"),
1759 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1760 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1764 register_check_parameters(
1765 RulespecGroupCheckParametersApplications
, "varnish_esi", _("Varnish ESI"),
1770 title
=_("Upper levels for \"ESI errors\" per second"),
1772 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1773 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1777 title
=_("Upper levels for \"ESI warnings\" per second"),
1779 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1780 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1784 register_check_parameters(
1785 RulespecGroupCheckParametersApplications
, "varnish_objects", _("Varnish Objects"),
1790 title
=_("Upper levels for \"expired objects\" per second"),
1792 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1793 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1797 title
=_("Upper levels for \"LRU nuked objects\" per second"),
1799 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1800 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1804 register_check_parameters(
1805 RulespecGroupCheckParametersApplications
, "varnish_worker", _("Varnish Worker"),
1810 title
=_("Upper levels for \"dropped work requests\" per second"),
1812 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1813 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1817 title
=_("Upper levels for \"worker threads not created\" per second"),
1819 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1820 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1824 title
=_("Upper levels for \"queued work requests\" per second"),
1826 Float(title
=_("Warning at"), default_value
=1.0, allow_empty
=False),
1827 Float(title
=_("Critical at"), default_value
=2.0, allow_empty
=False)
1831 register_check_parameters(
1832 RulespecGroupCheckParametersApplications
, "varnish_cache_hit_ratio",
1833 _("Varnish Cache Hit Ratio"),
1838 title
=_("Lower levels"),
1840 Percentage(title
=_("Warning if below"), default_value
=70.0, allow_empty
=False),
1842 title
=_("Critical if below"), default_value
=60.0, allow_empty
=False)
1846 register_check_parameters(
1847 RulespecGroupCheckParametersApplications
, "varnish_backend_success_ratio",
1848 _("Varnish Backend Success Ratio"),
1853 title
=_("Lower levels"),
1855 Percentage(title
=_("Warning if below"), default_value
=70.0, allow_empty
=False),
1857 title
=_("Critical if below"), default_value
=60.0, allow_empty
=False)
1861 register_check_parameters(
1862 RulespecGroupCheckParametersApplications
, "varnish_worker_thread_ratio",
1863 _("Varnish Worker Thread Ratio"),
1868 title
=_("Lower levels"),
1870 Percentage(title
=_("Warning if below"), default_value
=70.0, allow_empty
=False),
1872 title
=_("Critical if below"), default_value
=60.0, allow_empty
=False)
1876 register_check_parameters(
1877 RulespecGroupCheckParametersApplications
, "clr_memory",
1878 _("DotNet (.Net) runtime memory levels"),
1880 help=_("This rule allows to set the warn and crit levels of the memory "
1881 "metrics of the DotNet (.Net) Runtime"),
1885 title
=_("Percent time spent in garbage collection"),
1887 Percentage(title
=_("Warning at"), label
=_("% time"), default_value
=10.0),
1888 Percentage(title
=_("Critical at"), label
=_("% time"), default_value
=15.0),
1893 title
=_("Name of the Application"),
1894 help=_("The name of the DotNet (.Net) application or _Global_"),
1898 register_check_parameters(
1899 RulespecGroupCheckParametersApplications
, "skype_mobile", _("Skype for Business Mobile"),
1902 'requests_processing',
1904 title
=_("Requests in Processing"),
1908 Integer(title
=_("Warning at"), unit
=_("per second"), default_value
=10000),
1909 Integer(title
=_("Critical at"), unit
=_("per second"), default_value
=20000),
1912 optional_keys
=[]))],
1913 optional_keys
=[]), None, "dict")
1915 register_check_parameters(
1916 RulespecGroupCheckParametersApplications
, "skype_conferencing",
1917 _("Skype for Business Conferencing"),
1920 ('incomplete_calls',
1922 title
=_("Incomplete Calls"),
1926 Float(title
=_("Warning at"), unit
=_("per second"), default_value
=20.0),
1927 Float(title
=_("Critical at"), unit
=_("per second"), default_value
=40.0),
1931 ('create_conference_latency',
1933 title
=_("Create Conference Latency"),
1937 Float(title
=_("Warning at"), unit
=_("seconds"), default_value
=5.0),
1938 Float(title
=_("Critical at"), unit
=_("seconds"), default_value
=10.0),
1942 ('allocation_latency',
1944 title
=_("Conference Allocation Latency"),
1948 Float(title
=_("Warning at"), unit
=_("seconds"), default_value
=5.0),
1949 Float(title
=_("Critical at"), unit
=_("seconds"), default_value
=10.0),
1955 register_check_parameters(
1956 RulespecGroupCheckParametersApplications
, "skype_sip", _("Skype for Business SIP Stack"),
1959 ('message_processing_time',
1961 title
=_("Average Incoming Message Processing Time"),
1965 Float(title
=_("Warning at"), unit
=_("seconds"), default_value
=1.0),
1966 Float(title
=_("Critical at"), unit
=_("seconds"), default_value
=2.0),
1970 ('incoming_responses_dropped',
1972 title
=_("Incoming Responses Dropped"),
1976 Float(title
=_("Warning at"), unit
=_("per second"), default_value
=1.0),
1977 Float(title
=_("Critical at"), unit
=_("per second"), default_value
=2.0),
1981 ('incoming_requests_dropped',
1983 title
=_("Incoming Requests Dropped"),
1987 Float(title
=_("Warning at"), unit
=_("per second"), default_value
=1.0),
1988 Float(title
=_("Critical at"), unit
=_("per second"), default_value
=2.0),
1994 title
=_("Queue Latency"),
1998 Float(title
=_("Warning at"), unit
=_("seconds"), default_value
=0.1),
1999 Float(title
=_("Critical at"), unit
=_("seconds"), default_value
=0.2),
2005 title
=_("Sproc Latency"),
2009 Float(title
=_("Warning at"), unit
=_("seconds"), default_value
=0.1),
2010 Float(title
=_("Critical at"), unit
=_("seconds"), default_value
=0.2),
2014 ('throttled_requests',
2016 title
=_("Throttled requests"),
2020 Float(title
=_("Warning at"), unit
=_("per second"), default_value
=0.2),
2021 Float(title
=_("Critical at"), unit
=_("per second"), default_value
=0.4),
2025 ('local_503_responses',
2027 title
=_("Local HTTP 503 Responses"),
2031 Float(title
=_("Warning at"), unit
=_("per second"), default_value
=1.0),
2032 Float(title
=_("Critical at"), unit
=_("per second"), default_value
=2.0),
2036 ('timedout_incoming_messages',
2038 title
=_("Incoming Messages Timed out"),
2042 Integer(title
=_("Warning at"), default_value
=2),
2043 Integer(title
=_("Critical at"), default_value
=4),
2047 ('holding_time_incoming',
2049 title
=_("Average Holding Time For Incoming Messages"),
2053 Float(title
=_("Warning at"), unit
=_("seconds"), default_value
=1.0),
2054 Float(title
=_("Critical at"), unit
=_("seconds"), default_value
=2.0),
2058 ('flow_controlled_connections',
2060 title
=_("Flow-controlled Connections"),
2064 Integer(title
=_("Warning at"), default_value
=1),
2065 Integer(title
=_("Critical at"), default_value
=2),
2069 ('outgoing_queue_delay',
2071 title
=_("Average Outgoing Queue Delay"),
2075 Float(title
=_("Warning at"), unit
=_("seconds"), default_value
=2.0),
2076 Float(title
=_("Critical at"), unit
=_("seconds"), default_value
=4.0),
2082 title
=_("Sends Timed-Out"),
2086 Float(title
=_("Warning at"), unit
=_("per second"), default_value
=0.01),
2087 Float(title
=_("Critical at"), unit
=_("per second"), default_value
=0.02),
2091 ('authentication_errors',
2093 title
=_("Authentication System Errors"),
2097 Float(title
=_("Warning at"), unit
=_("per second"), default_value
=1.0),
2098 Float(title
=_("Critical at"), unit
=_("per second"), default_value
=2.0),
2104 register_check_parameters(
2105 RulespecGroupCheckParametersApplications
, "skype_mediation_server",
2106 _("Skype for Business Mediation Server"),
2109 ('load_call_failure_index',
2111 title
=_("Load Call Failure Index"),
2115 Integer(title
=_("Warning at"), default_value
=10),
2116 Integer(title
=_("Critical at"), default_value
=20),
2120 ('failed_calls_because_of_proxy',
2122 title
=_("Failed calls caused by unexpected interaction from proxy"),
2126 Integer(title
=_("Warning at"), default_value
=10),
2127 Integer(title
=_("Critical at"), default_value
=20),
2131 ('failed_calls_because_of_gateway',
2133 title
=_("Failed calls caused by unexpected interaction from gateway"),
2137 Integer(title
=_("Warning at"), default_value
=10),
2138 Integer(title
=_("Critical at"), default_value
=20),
2142 ('media_connectivity_failure',
2144 title
=_("Media Connectivity Check Failure"),
2148 Integer(title
=_("Warning at"), default_value
=1),
2149 Integer(title
=_("Critical at"), default_value
=2),
2155 register_check_parameters(
2156 RulespecGroupCheckParametersApplications
, "skype_xmpp", _("Skype for Business XMPP"),
2159 ('failed_outbound_streams',
2161 title
=_("XMPP Failed outbound stream establishes"),
2165 Float(title
=_("Warning at"), unit
=_("per second"), default_value
=0.01),
2166 Float(title
=_("Critical at"), unit
=_("per second"), default_value
=0.02),
2170 ('failed_inbound_streams',
2172 title
=_("XMPP Failed inbound stream establishes"),
2176 Float(title
=_("Warning at"), unit
=_("per second"), default_value
=0.01),
2177 Float(title
=_("Critical at"), unit
=_("per second"), default_value
=0.02),
2183 register_check_parameters(
2184 RulespecGroupCheckParametersApplications
, "skype_edgeauth", _("Skype for Business Edge Auth"),
2189 title
=_("Bad Requests Received"),
2193 Integer(title
=_("Warning at"), unit
=_("per second"), default_value
=20),
2194 Integer(title
=_("Critical at"), unit
=_("per second"), default_value
=40),
2199 optional_keys
=[]), None, "dict")
2201 register_check_parameters(
2202 RulespecGroupCheckParametersApplications
, "acme_certificates", _("ACME certificates"),
2204 elements
=[("expire_lower",
2206 title
=_("Lower age levels for expire date"),
2208 Age(title
=_("Warning if below"), default_value
=604800),
2209 Age(title
=_("Critical if below"), default_value
=2592000),
2211 title
=_("Name of certificate"),
2215 register_check_parameters(
2216 RulespecGroupCheckParametersApplications
, "skype", _("Skype for Business"),
2219 ('failed_search_requests',
2221 title
=_("Failed search requests"),
2225 Float(title
=_("Warning at"), unit
=_("per second"), default_value
=1.0),
2226 Float(title
=_("Critical at"), unit
=_("per second"), default_value
=2.0),
2230 ('failed_locations_requests',
2232 title
=_("Failed Get Locations Requests"),
2236 Float(title
=_("Warning at"), unit
=_("per second"), default_value
=1.0),
2237 Float(title
=_("Critical at"), unit
=_("per second"), default_value
=2.0),
2241 ('failed_file_requests',
2243 title
=_("Failed requests to Adressbook files"),
2247 Float(title
=_("Warning at"), unit
=_("per second"), default_value
=1.0),
2248 Float(title
=_("Critical at"), unit
=_("per second"), default_value
=2.0),
2254 title
=_("Failures of the join launcher service"),
2257 Integer(title
=_("Warning at"), default_value
=1),
2258 Integer(title
=_("Critical at"), default_value
=2),
2261 ('failed_validate_cert',
2263 title
=_("Failed certificate validations"),
2266 Integer(title
=_("Warning at"), default_value
=1),
2267 Integer(title
=_("Critical at"), default_value
=2),
2270 ('timedout_ad_requests',
2272 title
=_("Timed out Active Directory Requests"),
2276 Float(title
=_("Warning at"), unit
=_("per second"), default_value
=0.01),
2277 Float(title
=_("Critical at"), unit
=_("per second"), default_value
=0.02),
2283 title
=_("HTTP 5xx Responses"),
2287 Float(title
=_("Warning at"), unit
=_("per second"), default_value
=1.0),
2288 Float(title
=_("Critical at"), unit
=_("per second"), default_value
=2.0),
2292 ('asp_requests_rejected',
2294 title
=_("ASP Requests Rejected"),
2298 Integer(title
=_("Warning at"), default_value
=1),
2299 Integer(title
=_("Critical at"), default_value
=2),
2305 register_check_parameters(
2306 RulespecGroupCheckParametersApplications
, "skype_proxy", _("Skype for Business Data Proxy"),
2308 help=_("Warn/Crit levels for various Skype for Business "
2309 "(formerly known as Lync) metrics"),
2311 ('throttled_connections',
2313 title
=_("Throttled Server Connections"),
2317 Integer(title
=_("Warning at"), default_value
=3),
2318 Integer(title
=_("Critical at"), default_value
=6),
2325 title
=_("Name of the Proxy"),
2326 help=_("The name of the Data Proxy"),
2330 register_check_parameters(
2331 RulespecGroupCheckParametersApplications
, "skype_edge", _("Skype for Business Edge"),
2332 Dictionary(elements
=[
2333 ('authentication_failures',
2335 title
=_("Authentication Failures"),
2339 Integer(title
=_("Warning at"), unit
=_("per second"), default_value
=20),
2340 Integer(title
=_("Critical at"), unit
=_("per second"), default_value
=40),
2344 ('allocate_requests_exceeding',
2346 title
=_("Allocate Requests Exceeding Port Limit"),
2350 Integer(title
=_("Warning at"), unit
=_("per second"), default_value
=20),
2351 Integer(title
=_("Critical at"), unit
=_("per second"), default_value
=40),
2357 title
=_("Packets Dropped"),
2361 Integer(title
=_("Warning at"), unit
=_("per second"), default_value
=200),
2362 Integer(title
=_("Critical at"), unit
=_("per second"), default_value
=400),
2368 title
=_("Interface"),
2369 help=_("The name of the interface (Public/Private IPv4/IPv6 Network Interface)"),
2372 # Rule for disovered process checks
2373 register_check_parameters(
2374 RulespecGroupCheckParametersApplications
,
2376 _("State and count of processes"),
2378 Dictionary(elements
=process_level_elements
+ [(
2381 title
=_("Add custom icon or action"),
2382 help=_("You can assign icons or actions to the found services in the status GUI."),
2384 forth
=ps_convert_inventorized_from_singlekeys
,
2386 TextAscii(title
=_("Process name as defined at discovery"),),
2389 register_static_check
=False,
2392 # Rule for static process checks
2393 register_check_parameters(
2394 RulespecGroupCheckParametersApplications
,
2396 _("State and count of processes"),
2403 title
=_("Process Matching"),
2407 title
=_("Exact name of the process without argments"),
2415 title
=_("Regular expression matching command line"),
2416 help=_("This regex must match the <i>beginning</i> of the complete "
2417 "command line of the process including arguments"),
2418 forth
=lambda x
: x
[1:], # remove ~
2419 back
=lambda x
: "~" + x
, # prefix ~
2424 title
=_("Match all processes"),
2427 match
=lambda x
: (not x
and 2) or (x
[0] == '~' and 1 or 0))),
2431 title
=_("Name of operating system user"),
2434 TextAscii(title
=_("Exact name of the operating system user")),
2440 title
=_("Regular expression matching username"),
2441 help=_("This regex must match the <i>beginning</i> of the complete "
2443 forth
=lambda x
: x
[1:], # remove ~
2444 back
=lambda x
: "~" + x
, # prefix ~
2449 title
=_("Match all users"),
2452 match
=lambda x
: (not x
and 2) or (x
[0] == '~' and 1 or 0))),
2455 title
=_("Add custom icon or action"),
2457 "You can assign icons or actions to the found services in the status GUI."
2460 ] + process_level_elements
,
2461 # required_keys = [ "process" ],
2463 forth
=ps_convert_from_singlekeys
,
2466 title
=_("Process Name"),
2467 help=_("This name will be used in the description of the service"),
2469 regex
="^[a-zA-Z_0-9 _./-]*$",
2470 regex_error
=_("Please use only a-z, A-Z, 0-9, space, underscore, "
2471 "dot, hyphen and slash for your service description"),
2474 has_inventory
=False,
2477 register_check_parameters(
2478 RulespecGroupCheckParametersApplications
, "generic_number", _("Generic numeric value"),
2479 Dictionary(elements
=[
2482 title
=_("Upper levels"),
2484 Float(title
="Warning at"),
2485 Float(title
="Critical at"),
2489 title
=_("Lower levels"),
2491 Float(title
="Warning below"),
2492 Float(title
="Critical below"),
2494 ]), TextAscii(title
=_("Item"),), "dict")
2496 register_check_parameters(
2497 RulespecGroupCheckParametersApplications
, "generic_rate", _("Generic rate"),
2498 Dictionary(elements
=[
2501 title
=_("Upper levels"),
2503 Float(title
="Warning at", unit
="/s"),
2504 Float(title
="Critical at", unit
="/s"),
2508 title
=_("Lower levels"),
2510 Float(title
="Warning below", unit
="/s"),
2511 Float(title
="Critical below", unit
="/s"),
2513 ]), TextAscii(title
=_("Item"),), "dict")
2515 register_check_parameters(
2516 RulespecGroupCheckParametersApplications
, "generic_string", _("Generic string"),
2517 Dictionary(elements
=[
2518 ("default_status", MonitoringState(title
=_("Default Status"))),
2520 ListOf(Tuple(elements
=[
2521 TextAscii(title
=_("Search string")),
2524 ]), TextAscii(title
=_("Item"),), "dict")
2526 register_check_parameters(
2527 RulespecGroupCheckParametersApplications
,
2529 _("JVM uptime (since last reboot)"),
2531 help=_("This rule sets the warn and crit levels for the uptime of a JVM. "
2532 "Other keywords for this rule: Tomcat, Jolokia, JMX. "),
2536 title
=_("Minimum required uptime"),
2538 Age(title
=_("Warning if below")),
2539 Age(title
=_("Critical if below")),
2543 title
=_("Maximum allowed uptime"),
2545 Age(title
=_("Warning at")),
2546 Age(title
=_("Critical at")),
2550 title
=_("Name of the virtual machine"),
2551 help=_("The name of the application server"),
2557 register_check_parameters(
2558 RulespecGroupCheckParametersApplications
,
2559 "netapp_systemtime",
2560 _("Netapp systemtime"),
2561 Dictionary(elements
=[
2564 title
=_("Set upper levels for the time difference"),
2565 help=_("Here you can Set upper levels for the time difference "
2566 "between agent and system time."),
2568 Age(title
=_("Warning if at")),
2569 Age(title
=_("Critical if at")),
2573 title
=_("Name of the node"),
2579 register_check_parameters(
2580 RulespecGroupCheckParametersApplications
, "jvm_sessions", _("JVM session count"),
2582 help=_("This rule sets the warn and crit levels for the number of current "
2583 "connections to a JVM application on the servlet level."),
2586 title
=_("Warning if below"),
2591 title
=_("Critical if below"),
2596 title
=_("Warning at"),
2601 title
=_("Critical at"),
2607 title
=_("Name of the virtual machine"),
2608 help=_("The name of the application server"),
2612 register_check_parameters(
2613 RulespecGroupCheckParametersApplications
, "jvm_requests", _("JVM request count"),
2615 help=_("This rule sets the warn and crit levels for the number "
2616 "of incoming requests to a JVM application server."),
2619 title
=_("Warning if below"),
2620 unit
=_("requests/sec"),
2624 title
=_("Critical if below"),
2625 unit
=_("requests/sec"),
2629 title
=_("Warning at"),
2630 unit
=_("requests/sec"),
2634 title
=_("Critical at"),
2635 unit
=_("requests/sec"),
2640 title
=_("Name of the virtual machine"),
2641 help=_("The name of the application server"),
2645 register_check_parameters(
2646 RulespecGroupCheckParametersApplications
, "jvm_queue", _("JVM Execute Queue Count"),
2648 help=_("The BEA application servers have 'Execute Queues' "
2649 "in which requests are processed. This rule allows to set "
2650 "warn and crit levels for the number of requests that are "
2651 "being queued for processing."),
2654 title
=_("Warning at"),
2659 title
=_("Critical at"),
2665 title
=_("Name of the virtual machine"),
2666 help=_("The name of the application server"),
2670 register_check_parameters(
2671 RulespecGroupCheckParametersApplications
, "jvm_memory", _("JVM memory levels"),
2673 help=_("This rule allows to set the warn and crit levels of the heap / "
2674 "non-heap and total memory area usage on web application servers. "
2675 "Other keywords for this rule: Tomcat, Jolokia, JMX. "),
2679 title
=_("Total Memory Levels"),
2682 title
=_("Percentage levels of used space"),
2684 Percentage(title
=_("Warning at"), label
=_("% usage")),
2685 Percentage(title
=_("Critical at"), label
=_("% usage")),
2688 title
=_("Absolute free space in MB"),
2690 Integer(title
=_("Warning if below"), unit
=_("MB")),
2691 Integer(title
=_("Critical if below"), unit
=_("MB")),
2696 title
=_("Heap Memory Levels"),
2699 title
=_("Percentage levels of used space"),
2701 Percentage(title
=_("Warning at"), label
=_("% usage")),
2702 Percentage(title
=_("Critical at"), label
=_("% usage")),
2705 title
=_("Absolute free space in MB"),
2707 Integer(title
=_("Warning if below"), unit
=_("MB")),
2708 Integer(title
=_("Critical if below"), unit
=_("MB")),
2713 title
=_("Nonheap Memory Levels"),
2716 title
=_("Percentage levels of used space"),
2718 Percentage(title
=_("Warning at"), label
=_("% usage")),
2719 Percentage(title
=_("Critical at"), label
=_("% usage")),
2722 title
=_("Absolute free space in MB"),
2724 Integer(title
=_("Warning if below"), unit
=_("MB")),
2725 Integer(title
=_("Critical if below"), unit
=_("MB")),
2730 title
=_("Perm Memory usage"),
2732 Percentage(title
=_("Warning at"), label
=_("% usage")),
2733 Percentage(title
=_("Critical at"), label
=_("% usage")),
2737 title
=_("Name of the virtual machine"),
2738 help=_("The name of the application server"),
2742 register_check_parameters(
2743 RulespecGroupCheckParametersApplications
, "safenet_hsm_operstats",
2744 _("Safenet HSM Operation Stats"),
2745 Dictionary(elements
=[
2748 title
=_(u
"Error rate"),
2750 Float(title
=_("Warning at"), default_value
=0.01, unit
=_("1/s")),
2751 Float(title
=_("Critical at"), default_value
=0.05, unit
=_("1/s")),
2753 ("request_rate", Levels(
2754 title
=_(u
"Request rate"),
2758 ("operation_errors",
2760 title
=_("Operation errors"),
2761 help=_("Sets levels on total operation errors since last counter reset."),
2763 Integer(title
=_("Warning at"), default_value
=0),
2764 Integer(title
=_("Critical at"), default_value
=1),
2768 register_check_parameters(
2769 RulespecGroupCheckParametersApplications
, "safenet_hsm_eventstats",
2770 _("Safenet HSM Event Stats"),
2771 Dictionary(elements
=[
2774 title
=_(u
"Critical events"),
2775 help=_(u
"Sets levels on total critical events since last counter reset."),
2777 Integer(title
=_("Warning at"), default_value
=0),
2778 Integer(title
=_("Critical at"), default_value
=1),
2780 ("noncritical_events",
2782 title
=_(u
"Noncritical events"),
2783 help=_(u
"Sets levels on total noncritical events since last counter reset."),
2785 Integer(title
=_("Warning at"), default_value
=0),
2786 Integer(title
=_("Critical at"), default_value
=1),
2788 ("critical_event_rate",
2790 title
=_(u
"Critical event rate"),
2792 Float(title
=_("Warning at"), default_value
=0.0001, unit
=_("1/s")),
2793 Float(title
=_("Critical at"), default_value
=0.0005, unit
=_("1/s")),
2795 ("noncritical_event_rate",
2797 title
=_(u
"Noncritical event rate"),
2799 Float(title
=_("Warning at"), default_value
=0.0001, unit
=_("1/s")),
2800 Float(title
=_("Critical at"), default_value
=0.0005, unit
=_("1/s")),
2804 register_check_parameters(RulespecGroupCheckParametersApplications
, "safenet_ntls_links",
2805 _(u
"Safenet NTLS Links"),
2807 title
=_(u
"NTLS Links"),
2811 register_check_parameters(
2812 RulespecGroupCheckParametersApplications
, "safenet_ntls_clients", _(u
"Safenet NTLS Clients"),
2814 title
=_(u
"NTLS Clients"),
2815 help=_(u
"Number of connected clients"),
2819 register_check_parameters(
2820 RulespecGroupCheckParametersApplications
,
2821 "fireeye_active_vms",
2822 _("Fireeye Active VMs"),
2823 Dictionary(elements
=[(
2826 title
=_("Levels for active VMs"),
2828 Integer(title
="Warning at", default_value
=60, unit
="VMs"),
2829 Integer(title
="Critical at", default_value
=70, unit
="VMs"),
2836 register_check_parameters(
2837 RulespecGroupCheckParametersApplications
,
2839 _("Fireeye Licenses"),
2840 Dictionary(elements
=[(
2843 title
=_("Levels for Fireeye License Expiration"),
2845 Integer(title
="Warning at", default_value
=90, unit
="days"),
2846 Integer(title
="Critical at", default_value
=120, unit
="days"),
2849 TextAscii(title
=_("License Feature")),
2853 register_check_parameters(
2854 RulespecGroupCheckParametersApplications
,
2855 "fireeye_quarantine",
2856 _("Fireeye Quarantine Usage"),
2857 Dictionary(elements
=[(
2860 title
=_("Levels for Quarantine Usage"),
2862 Integer(title
="Warning at", default_value
=70, unit
="%"),
2863 Integer(title
="Critical at", default_value
=80, unit
="%"),
2870 register_check_parameters(
2871 RulespecGroupCheckParametersApplications
,
2873 _("Fireeye Mail Queues"),
2874 Dictionary(elements
=[
2877 title
=_("Levels for Deferred Queue length"),
2879 Integer(title
="Warning at", default_value
=10, unit
="Mails"),
2880 Integer(title
="Critical at", default_value
=15, unit
="Mails"),
2884 title
=_("Levels for Hold Queue length"),
2886 Integer(title
="Warning at", default_value
=500, unit
="Mails"),
2887 Integer(title
="Critical at", default_value
=700, unit
="Mails"),
2891 title
=_("Levels for Drop Queue length"),
2893 Integer(title
="Warning at", default_value
=10, unit
="Mails"),
2894 Integer(title
="Critical at", default_value
=15, unit
="Mails"),
2901 register_check_parameters(
2902 RulespecGroupCheckParametersApplications
,
2904 _("Fireeye Mail Rate Average"),
2905 Dictionary(elements
=[
2908 Integer(title
="Timespan for mail rate computation", default_value
=60, unit
="minutes"),
2916 def transform_oracle_logswitches(params
):
2917 if isinstance(params
, tuple):
2919 'levels': (params
[2], params
[3]),
2920 'levels_lower': (params
[1], params
[0]),
2925 register_check_parameters(
2926 RulespecGroupCheckParametersApplications
,
2927 "oracle_logswitches",
2928 _("Oracle Logswitches"),
2931 help=_("This check monitors the number of log switches of an ORACLE "
2932 "database instance in the last 60 minutes. You can set levels "
2933 "for upper and lower bounds."),
2938 title
=_("Set upper Levels"),
2941 title
=_("Warning at or above"),
2942 unit
=_("log switches / hour"),
2945 title
=_("Critical at or above"),
2946 unit
=_("log switches / hour"),
2953 title
=_("Set lower Levels"),
2956 title
=_("Warning at or below"),
2957 unit
=_("log switches / hour"),
2960 title
=_("Critical at or below"),
2961 unit
=_("log switches / hour"),
2967 forth
=transform_oracle_logswitches
,
2969 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
2973 register_check_parameters(
2974 RulespecGroupCheckParametersApplications
,
2976 _("Systemd Services"),
2984 title
=_("Monitoring state if service is active"),
2990 title
=_("Monitoring state for any other service state"),
2995 title
=_("Monitoring state if a monitored service is not found at all."),
2999 TextAscii(title
=_("Name of the service")),
3003 register_check_parameters(
3004 RulespecGroupCheckParametersApplications
,
3006 _("AIX HACMP Resource Groups"),
3010 ("expect_online_on",
3012 title
=_(u
"Expect resource to be online on"),
3014 ("first", _(u
"the first node")),
3015 ("any", _(u
"any node")),
3021 forth
=lambda x
: {"expect_online_on": "first"},
3023 TextAscii(title
=_(u
"Resource Group")),
3027 register_check_parameters(
3028 RulespecGroupCheckParametersApplications
,
3030 _("Azure web servers (IIS)"),
3034 "avg_response_time_levels",
3036 title
=_("Upper levels for average response time"),
3038 Float(title
=_("Warning at"), default_value
=1.00, unit
="s"),
3039 Float(title
=_("Critical at"), default_value
=10.0, unit
="s"),
3043 "error_rate_levels",
3045 title
=_("Upper levels for rate of server errors"),
3047 Float(title
=_("Warning at"), default_value
=0.01, unit
="1/s"),
3048 Float(title
=_("Critical at"), default_value
=0.04, unit
="1/s"),
3052 "cpu_time_percent_levels",
3054 title
=_("Upper levels for CPU time"),
3056 Float(title
=_("Warning at"), default_value
=85., unit
="%"),
3057 Float(title
=_("Critical at"), default_value
=95., unit
="%"),
3061 TextAscii(title
=_("Name of the service")),
3066 # .--Environment---------------------------------------------------------.
3068 # | | ____|_ ____ _(_)_ __ ___ _ __ _ __ ___ ___ _ __ | |_ |
3069 # | | _| | '_ \ \ / / | '__/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| |
3070 # | | |___| | | \ V /| | | | (_) | | | | | | | | | __/ | | | |_ |
3071 # | |_____|_| |_|\_/ |_|_| \___/|_| |_|_| |_| |_|\___|_| |_|\__| |
3073 # '----------------------------------------------------------------------'
3075 register_check_parameters(
3076 RulespecGroupCheckParametersEnvironment
,
3078 _("Voltage Sensor"),
3080 title
=_("Voltage Sensor"),
3085 title
=_("Upper Levels for Voltage"),
3087 Float(title
=_("Warning at"), default_value
=15.00, unit
="V"),
3088 Float(title
=_("Critical at"), default_value
=16.00, unit
="V"),
3092 title
=_("Lower Levels for Voltage"),
3094 Float(title
=_("Warning below"), default_value
=10.00, unit
="V"),
3095 Float(title
=_("Critical below"), default_value
=9.00, unit
="V"),
3098 TextAscii(title
=_("Sensor Description and Index"),),
3102 register_check_parameters(
3103 RulespecGroupCheckParametersEnvironment
,
3105 _("Number of fan failures"),
3107 title
=_("Number of fan failures"),
3109 Integer(title
="Warning at", default_value
=1),
3110 Integer(title
="Critical at", default_value
=2),
3116 register_check_parameters(
3117 RulespecGroupCheckParametersEnvironment
,
3119 _("Lock Voltage for PLLs"),
3121 help=_("PLL lock voltages by freqency"),
3127 Float(title
=_("Frequencies up to"), unit
=u
"MHz"),
3128 Float(title
=_("Warning below"), unit
=u
"V"),
3129 Float(title
=_("Critical below"), unit
=u
"V"),
3130 Float(title
=_("Warning at or above"), unit
=u
"V"),
3131 Float(title
=_("Critical at or above"), unit
=u
"V"),
3133 title
=_("Lock voltages for RX PLL"),
3134 help=_("Specify frequency ranges by the upper boundary of the range "
3135 "to which the voltage levels are to apply. The list is sorted "
3136 "automatically when saving."),
3142 Float(title
=_("Frequencies up to"), unit
=u
"MHz"),
3143 Float(title
=_("Warning below"), unit
=u
"V"),
3144 Float(title
=_("Critical below"), unit
=u
"V"),
3145 Float(title
=_("Warning at or above"), unit
=u
"V"),
3146 Float(title
=_("Critical at or above"), unit
=u
"V"),
3148 title
=_("Lock voltages for TX PLL"),
3149 help=_("Specify frequency ranges by the upper boundary of the range "
3150 "to which the voltage levels are to apply. The list is sorted "
3151 "automatically when saving."),
3154 optional_keys
=["rx", "tx"],
3156 DropdownChoice(title
=_("RX/TX"), choices
=[("RX", _("RX")), ("TX", _("TX"))]),
3160 register_check_parameters(
3161 RulespecGroupCheckParametersEnvironment
,
3168 Tuple(elements
=[TextAscii(), MonitoringState()]),
3169 title
=_("Set states of IPMI sensor status texts"),
3170 help=_("The pattern specified here must match exactly the beginning of "
3171 "the sensor state (case sensitive)."),
3172 orientation
="horizontal",
3176 title
=_("Ignore the following IPMI sensors"),
3177 help=_("Names of IPMI sensors that should be ignored during discovery "
3178 "and when summarizing."
3179 "The pattern specified here must match exactly the beginning of "
3180 "the actual sensor name (case sensitive)."),
3181 orientation
="horizontal")),
3182 ("ignored_sensorstates",
3184 title
=_("Ignore the following IPMI sensor states"),
3185 help=_("IPMI sensors with these states that should be ignored during discovery "
3186 "and when summarizing."
3187 "The pattern specified here must match exactly the beginning of "
3188 "the actual sensor name (case sensitive)."),
3189 orientation
="horizontal",
3190 default_value
=["nr", "ns"])),
3191 ("numerical_sensor_levels",
3196 title
=_("Sensor name (only summary)"),
3198 "In summary mode you have to state the sensor name. "
3199 "In single mode the sensor name comes from service description.")),
3200 Dictionary(elements
=[
3202 Tuple(title
=_("Lower levels"), elements
=[Float(), Float()])),
3204 Tuple(title
=_("Upper levels"), elements
=[Float(), Float()])),
3207 title
=_("Set lower and upper levels for numerical sensors"))),
3209 ignored_keys
=["ignored_sensors", "ignored_sensor_states"],
3211 TextAscii(title
=_("The sensor name")),
3215 register_check_parameters(
3216 RulespecGroupCheckParametersEnvironment
,
3218 _("Output Voltage of Power Supplies"),
3221 Float(title
=_("Warning below"), unit
=u
"V"),
3222 Float(title
=_("Critical below"), unit
=u
"V"),
3223 Float(title
=_("Warning at or above"), unit
=u
"V"),
3224 Float(title
=_("Critical at or above"), unit
=u
"V"),
3230 bvip_link_states
= [
3232 (1, "10 MBit - HalfDuplex"),
3233 (2, "10 MBit - FullDuplex"),
3234 (3, "100 Mbit - HalfDuplex"),
3235 (4, "100 Mbit - FullDuplex"),
3236 (5, "1 Gbit - FullDuplex"),
3240 register_check_parameters(
3241 RulespecGroupCheckParametersEnvironment
,
3243 _("Allowed Network states on Bosch IP Cameras"),
3245 title
=_("Update State"),
3249 title
=_("States which result in OK"),
3250 choices
=bvip_link_states
,
3251 default_value
=[0, 4, 5])),
3254 title
=_("States which result in Warning"),
3255 choices
=bvip_link_states
,
3256 default_value
=[7])),
3259 title
=_("States which result in Critical"),
3260 choices
=bvip_link_states
,
3261 default_value
=[1, 2, 3])),
3269 register_check_parameters(
3270 RulespecGroupCheckParametersEnvironment
,
3272 _("Electrical Current of Overcurrent Protectors"),
3275 Float(title
=_("Warning at"), unit
=u
"A", default_value
=14.0),
3276 Float(title
=_("Critical at"), unit
=u
"A", default_value
=15.0),
3278 TextAscii(title
=_("The Index of the Overcurrent Protector")),
3282 register_check_parameters(
3283 RulespecGroupCheckParametersEnvironment
,
3285 _("Brightness Levels"),
3287 title
=_("Brightness"),
3290 default_difference
=(2.0, 4.0),
3291 default_levels
=(50.0, 100.0),
3294 title
=_("Sensor name"),
3295 help=_("The identifier of the sensor."),
3300 register_check_parameters(
3301 RulespecGroupCheckParametersEnvironment
,
3303 _("Motion Detectors"),
3304 Dictionary(elements
=[
3307 title
=_("Time periods"),
3308 help=_("Specifiy time ranges during which no motion is expected. "
3309 "Outside these times, the motion detector will always be in "
3311 elements
=[(day_id
, ListOfTimeRanges(title
=day_str
))
3312 for day_id
, day_str
in defines
.weekdays_by_name()],
3316 title
=_("Sensor name"),
3317 help=_("The identifier of the sensor."),
3321 register_check_parameters(
3322 RulespecGroupCheckParametersEnvironment
,
3324 _("eWON SNMP Proxy"),
3326 title
=_("Device Type"),
3327 help=_("The eWON router can act as a proxy to metrics from a secondary non-snmp device."
3328 "Here you can make settings to the monitoring of the proxied device."),
3329 elements
=[("oxyreduct",
3331 title
=_("Wagner OxyReduct"),
3332 elements
=[("o2_levels",
3334 title
=_("O2 levels"),
3336 Percentage(title
=_("Warning at"), default_value
=16.0),
3337 Percentage(title
=_("Critical at"), default_value
=17.0),
3338 Percentage(title
=_("Warning below"), default_value
=14.0),
3339 Percentage(title
=_("Critical below"), default_value
=13.0),
3342 title
=_("Item name"),
3343 help=_("The item name. The meaning of this depends on the proxied device: "
3344 "- Wagner OxyReduct: Name of the room/protection zone")),
3347 register_check_parameters(
3348 RulespecGroupCheckParametersEnvironment
,
3349 "lamp_operation_time",
3350 _("Beamer lamp operation time"),
3352 Age(title
=_("Warning at"), default_value
=1000 * 3600, display
=["hours"]),
3353 Age(title
=_("Critical at"), default_value
=1500 * 3600, display
=["hours"]),
3360 def transform_apc_symmetra(params
):
3361 if isinstance(params
, (list, tuple)):
3362 params
= {"levels": params
}
3364 if "levels" in params
and len(params
["levels"]) > 2:
3365 cap
= float(params
["levels"][0])
3366 params
["capacity"] = (cap
, cap
)
3367 del params
["levels"]
3369 if "output_load" in params
:
3370 del params
["output_load"]
3375 register_check_parameters(
3376 RulespecGroupCheckParametersEnvironment
, "apc_symentra", _("APC Symmetra Checks"),
3382 title
=_("Levels of battery capacity"),
3385 title
=_("Warning below"),
3389 title
=_("Critical below"),
3393 ("calibration_state",
3395 title
=_("State if calibration is invalid"),
3398 ("post_calibration_levels",
3400 title
=_("Levels of battery parameters after calibration"),
3402 "After a battery calibration the battery capacity is reduced until the "
3403 "battery is fully charged again. Here you can specify an alternative "
3404 "lower level in this post-calibration phase. "
3405 "Since apc devices remember the time of the last calibration only "
3406 "as a date, the alternative lower level will be applied on the whole "
3407 "day of the calibration until midnight. You can extend this time period "
3408 "with an additional time span to make sure calibrations occuring just "
3409 "before midnight do not trigger false alarms."),
3413 title
=_("Alternative critical battery capacity after calibration"),
3416 ("additional_time_span",
3418 title
=("Extend post-calibration phase by additional time span"),
3423 optional_keys
=False,
3427 title
=_("Time left on battery"),
3429 Age(title
=_("Warning at"),
3431 _("Time left on Battery at and below which a warning state is triggered"
3434 display
=["hours", "minutes"]),
3435 Age(title
=_("Critical at"),
3437 _("Time Left on Battery at and below which a critical state is triggered"
3440 display
=["hours", "minutes"]),
3443 ("battery_replace_state",
3445 title
=_("State if battery needs replacement"),
3449 optional_keys
=['post_calibration_levels', 'output_load', 'battime'],
3451 forth
=transform_apc_symmetra
,
3454 register_check_parameters(
3455 RulespecGroupCheckParametersEnvironment
,
3457 _("Power Supply Unit"),
3462 title
=_("PSU Capacity Levels"),
3464 Percentage(title
=_("Warning at"), default_value
=80.0),
3465 Percentage(title
=_("Critical at"), default_value
=90.0),
3469 TextAscii(title
=_("PSU (Chassis/Bay)")),
3473 # .--Storage-------------------------------------------------------------.
3475 # | / ___|| |_ ___ _ __ __ _ __ _ ___ |
3476 # | \___ \| __/ _ \| '__/ _` |/ _` |/ _ \ |
3477 # | ___) | || (_) | | | (_| | (_| | __/ |
3478 # | |____/ \__\___/|_| \__,_|\__, |\___| |
3480 # '----------------------------------------------------------------------'
3482 register_check_parameters(
3483 RulespecGroupCheckParametersStorage
,
3485 _("Number of disk failures"),
3487 title
=_("Number of disk failures"),
3489 Integer(title
="Warning at", default_value
=1),
3490 Integer(title
="Critical at", default_value
=2),
3496 register_check_parameters(
3497 RulespecGroupCheckParametersStorage
, "ddn_s2a_port_errors", _("Port errors of DDN S2A devices"),
3500 ("link_failure_errs",
3502 title
=_(u
"Link failure errors"),
3504 Integer(title
=_(u
"Warning at")),
3505 Integer(title
=_(u
"Critical at")),
3509 title
=_(u
"Lost synchronization errors"),
3511 Integer(title
=_(u
"Warning at")),
3512 Integer(title
=_(u
"Critical at")),
3514 ("loss_of_signal_errs",
3516 title
=_(u
"Loss of signal errors"),
3518 Integer(title
=_(u
"Warning at")),
3519 Integer(title
=_(u
"Critical at")),
3523 title
=_(u
"PrimSeq erros"),
3525 Integer(title
=_(u
"Warning at")),
3526 Integer(title
=_(u
"Critical at")),
3530 title
=_(u
"CRC errors"),
3532 Integer(title
=_(u
"Warning at")),
3533 Integer(title
=_(u
"Critical at")),
3537 title
=_(u
"Receive errors"),
3539 Integer(title
=_(u
"Warning at")),
3540 Integer(title
=_(u
"Critical at")),
3544 title
=_(u
"CTIO timeouts"),
3546 Integer(title
=_(u
"Warning at")),
3547 Integer(title
=_(u
"Critical at")),
3551 title
=_(u
"CTIO transmission errors"),
3553 Integer(title
=_(u
"Warning at")),
3554 Integer(title
=_(u
"Critical at")),
3558 title
=_(u
"other CTIO errors"),
3560 Integer(title
=_(u
"Warning at")),
3561 Integer(title
=_(u
"Critical at")),
3563 ],), TextAscii(title
="Port index"), "dict")
3565 register_check_parameters(
3566 RulespecGroupCheckParametersStorage
, "read_hits", _(u
"Read prefetch hits for DDN S2A devices"),
3568 title
=_(u
"Prefetch hits"),
3570 Float(title
=_(u
"Warning below"), default_value
=95.0),
3571 Float(title
=_(u
"Critical below"), default_value
=90.0),
3572 ]), TextAscii(title
=_(u
"Port index or 'Total'")), "first")
3574 register_check_parameters(
3575 RulespecGroupCheckParametersStorage
, "storage_iops", _(u
"I/O operations for DDN S2A devices"),
3576 Dictionary(elements
=[
3579 title
=_(u
"Read IO operations per second"),
3581 Float(title
=_(u
"Warning at"), unit
="1/s"),
3582 Float(title
=_(u
"Critical at"), unit
="1/s"),
3586 title
=_(u
"Write IO operations per second"),
3588 Float(title
=_(u
"Warning at"), unit
="1/s"),
3589 Float(title
=_(u
"Critical at"), unit
="1/s"),
3593 title
=_(u
"Total IO operations per second"),
3595 Float(title
=_(u
"Warning at"), unit
="1/s"),
3596 Float(title
=_(u
"Critical at"), unit
="1/s"),
3598 ]), TextAscii(title
=_(u
"Port index or 'Total'")), "dict")
3600 register_check_parameters(
3601 RulespecGroupCheckParametersStorage
, "storage_throughput", _(u
"Throughput for DDN S2A devices"),
3602 Dictionary(elements
=[
3605 title
=_(u
"Read throughput per second"),
3607 Filesize(title
=_(u
"Warning at")),
3608 Filesize(title
=_(u
"Critical at")),
3612 title
=_(u
"Write throughput per second"),
3614 Filesize(title
=_(u
"Warning at")),
3615 Filesize(title
=_(u
"Critical at")),
3619 title
=_(u
"Total throughput per second"),
3621 Filesize(title
=_(u
"Warning at")),
3622 Filesize(title
=_(u
"Critical at")),
3624 ]), TextAscii(title
=_(u
"Port index or 'Total'")), "dict")
3626 register_check_parameters(
3627 RulespecGroupCheckParametersStorage
, "ddn_s2a_wait", _(u
"Read/write wait for DDN S2A devices"),
3628 Dictionary(elements
=[
3631 title
=_(u
"Read wait average"),
3633 Float(title
=_(u
"Warning at"), unit
="s"),
3634 Float(title
=_(u
"Critical at"), unit
="s"),
3638 title
=_(u
"Read wait minimum"),
3640 Float(title
=_(u
"Warning at"), unit
="s"),
3641 Float(title
=_(u
"Critical at"), unit
="s"),
3645 title
=_(u
"Read wait maximum"),
3647 Float(title
=_(u
"Warning at"), unit
="s"),
3648 Float(title
=_(u
"Critical at"), unit
="s"),
3652 title
=_(u
"Write wait average"),
3654 Float(title
=_(u
"Warning at"), unit
="s"),
3655 Float(title
=_(u
"Critical at"), unit
="s"),
3659 title
=_(u
"Write wait minimum"),
3661 Float(title
=_(u
"Warning at"), unit
="s"),
3662 Float(title
=_(u
"Critical at"), unit
="s"),
3666 title
=_(u
"Write wait maximum"),
3668 Float(title
=_(u
"Warning at"), unit
="s"),
3669 Float(title
=_(u
"Critical at"), unit
="s"),
3672 DropdownChoice(title
=_(u
"Host or Disk"), choices
=[
3673 ("Disk", _(u
"Disk")),
3674 ("Host", _(u
"Host")),
3677 register_check_parameters(
3678 RulespecGroupCheckParametersStorage
,
3680 _("Remaining blank tapes in DIVA CSM Devices"),
3683 Integer(title
=_("Warning below"), default_value
=5),
3684 Integer(title
=_("Critical below"), default_value
=1),
3690 register_check_parameters(
3691 RulespecGroupCheckParametersStorage
,
3693 _("MongoDB Flushes"),
3694 Dictionary(elements
=[
3698 title
=_("Average flush time"),
3700 Integer(title
=_("Warning at"), unit
="ms", default_value
=50),
3701 Integer(title
=_("Critical at"), unit
="ms", default_value
=100),
3702 Integer(title
=_("Time interval"), unit
="minutes", default_value
=10),
3708 title
=_("Last flush time"),
3710 Integer(title
=_("Warning at"), unit
="ms", default_value
=50),
3711 Integer(title
=_("Critical at"), unit
="ms", default_value
=100),
3718 register_check_parameters(
3719 RulespecGroupCheckParametersStorage
,
3721 _("MongoDB Assert Rates"),
3723 elements
=[("%s_assert_rate" % what
,
3725 title
=_("%s rate") % what
.title(),
3727 Float(title
=_("Warning at"), unit
=_("Asserts / s"), default_value
=1.0),
3728 Float(title
=_("Critical at"), unit
=_("Asserts / s"), default_value
=2.0),
3729 ])) for what
in ["msg", "rollovers", "regular", "warning", "user"]],),
3733 register_check_parameters(
3734 RulespecGroupCheckParametersStorage
,
3736 _("MongoDB Memory"),
3738 title
=_("MongoDB Memory"),
3742 title
=_("Resident memory usage"),
3744 _("The value of resident is roughly equivalent to the amount of RAM, "
3745 "currently used by the database process. In normal use this value tends to grow. "
3746 "In dedicated database servers this number tends to approach the total amount of system memory."
3749 Filesize(title
=_("Warning at"), default_value
=1 * 1024**3),
3750 Filesize(title
=_("Critical at"), default_value
=2 * 1024**3),
3755 title
=_("Mapped memory usage"),
3757 "The value of mapped shows the amount of mapped memory by the database. "
3758 "Because MongoDB uses memory-mapped files, this value is likely to be to be "
3759 "roughly equivalent to the total size of your database or databases."),
3761 Filesize(title
=_("Warning at"), default_value
=1 * 1024**3),
3762 Filesize(title
=_("Critical at"), default_value
=2 * 1024**3),
3767 title
=_("Virtual memory usage"),
3769 "Virtual displays the quantity of virtual memory used by the mongod process. "
3772 Filesize(title
=_("Warning at"), default_value
=2 * 1024**3),
3773 Filesize(title
=_("Critical at"), default_value
=4 * 1024**3),
3780 register_check_parameters(
3781 RulespecGroupCheckParametersStorage
,
3782 "openhardwaremonitor_smart",
3783 _("OpenHardwareMonitor S.M.A.R.T."),
3784 Dictionary(elements
=[
3787 title
=_("Remaining Life"),
3788 help=_("Estimated remaining health of the disk based on other readings."),
3790 Percentage(title
=_("Warning below"), default_value
=30),
3791 Percentage(title
=_("Critical below"), default_value
=10),
3796 title
=_("Device Name"),
3797 help=_("Name of the Hard Disk as reported by OHM: hdd0, hdd1, ..."),
3801 register_check_parameters(
3802 RulespecGroupCheckParametersStorage
,
3806 elements
=[("%s_locks" % what
,
3808 title
=_("%s Locks") % what
.title().replace("_", " "),
3810 Integer(title
=_("Warning at"), minvalue
=0),
3811 Integer(title
=_("Critical at"), minvalue
=0),
3813 "clients_readers", "clients_writers", "clients_total", "queue_readers",
3814 "queue_writers", "queue_total"
3819 register_check_parameters(
3820 RulespecGroupCheckParametersStorage
,
3824 elements
=[("levels",
3826 title
=_("Usage levels"),
3827 default_value
=(80.0, 90.0),
3830 title
=_("Specify levels in percentage of total space"),
3832 Percentage(title
=_("Warning at"), unit
=_("%")),
3833 Percentage(title
=_("Critical at"), unit
=_("%"))
3836 title
=_("Specify levels in absolute usage"),
3839 title
=_("Warning at"), default_value
=1000 * 1024 * 1024),
3841 title
=_("Critical at"), default_value
=5000 * 1024 * 1024)
3846 title
=_("Container Name"),
3847 help=_("Name of the container"),
3851 register_check_parameters(
3852 RulespecGroupCheckParametersStorage
,
3854 _("INotify Levels"),
3856 help=_("This rule allows you to set levels for specific Inotify changes. "
3857 "Keep in mind that you can only monitor operations which are actually "
3858 "enabled in the Inotify plugin. So it might be a good idea to cross check "
3859 "these levels here with the configuration rule in the agent bakery. "),
3861 ('age_last_operation',
3866 title
=_("INotify Operation"),
3868 ("create", _("Create")),
3869 ("delete", _("Delete")),
3870 ("open", _("Open")),
3871 ("modify", _("Modify")),
3872 ("access", _("Access")),
3873 ("movedfrom", _("Moved from")),
3874 ("movedto", _("Moved to")),
3875 ("moveself", _("Move self")),
3877 Age(title
=_("Warning at")),
3878 Age(title
=_("Critical at")),
3880 title
=_("Age of last operation"),
3885 TextAscii(title
=_("The filesystem path, prefixed with <i>File </i> or <i>Folder </i>"),),
3888 register_check_parameters(
3889 RulespecGroupCheckParametersStorage
,
3891 _("EMC VNX Enclosures"),
3892 Dictionary(elements
=[
3893 ("state_read_error",
3895 title
=_("State on hard read error"),
3902 title
=_("Minimum error count"),
3906 ("state_write_error",
3908 title
=_("State on hard write error"),
3915 title
=_("Minimum error count"),
3919 ("state_rebuilding",
3920 MonitoringState(default_value
=1, title
=_("State when rebuildung enclosure"))),
3922 TextAscii(title
=_("Enclosure ID"), allow_empty
=True),
3926 register_check_parameters(
3927 RulespecGroupCheckParametersStorage
,
3929 _("Logical Volume Pools (LVM)"),
3930 Dictionary(elements
=[
3934 title
=_("Levels for Meta"),
3935 default_value
=(80.0, 90.0),
3937 Percentage(title
=_("Warning at"), unit
=_("%")),
3938 Percentage(title
=_("Critical at"), unit
=_("%"))
3944 title
=_("Levels for Data"),
3945 default_value
=(80.0, 90.0),
3947 Percentage(title
=_("Warning at"), unit
=_("%")),
3948 Percentage(title
=_("Critical at"), unit
=_("%"))
3953 title
=_("Logical Volume Pool"),
3958 register_check_parameters(
3959 RulespecGroupCheckParametersStorage
,
3960 "emcvnx_storage_pools",
3961 _("EMC VNX storage pools"),
3962 Dictionary(elements
=[
3965 title
=_("Upper levels for physical capacity in percent"),
3967 Percentage(title
=_("Warning at"), default_value
=70.0),
3968 Percentage(title
=_("Critical at"), default_value
=90.0),
3971 TextAscii(title
=_("Pool name")),
3975 register_check_parameters(
3976 RulespecGroupCheckParametersStorage
,
3977 "emcvnx_storage_pools_tiering",
3978 _("EMC VNX storage pools tiering"),
3979 Dictionary(elements
=[
3980 ("time_to_complete",
3982 title
=_("Upper levels for estimated time to complete"),
3984 Age(title
=_("Warning at"), default_value
=300 * 60 * 60),
3985 Age(title
=_("Critical at"), default_value
=350 * 60 * 60),
3988 TextAscii(title
=_("Pool name")),
3992 register_check_parameters(
3993 RulespecGroupCheckParametersStorage
,
3996 Dictionary(elements
=[
4001 default_value
=(80.0, 90.0),
4003 Percentage(title
=_("Warning at"), unit
=_("%")),
4004 Percentage(title
=_("Critical at"), unit
=_("%"))
4011 register_check_parameters(
4012 RulespecGroupCheckParametersStorage
,
4014 _("Brocade FibreChannel ports"),
4019 title
=_("Throughput levels"),
4020 help=_("Please note: in a few cases the automatic detection of the link speed "
4021 "does not work. In these cases you have to set the link speed manually "
4022 "below if you want to monitor percentage values"),
4025 title
=_("Used bandwidth of port relative to the link speed"),
4027 Percentage(title
=_("Warning at"), unit
=_("percent")),
4028 Percentage(title
=_("Critical at"), unit
=_("percent")),
4031 title
=_("Used Bandwidth of port in megabyte/s"),
4033 Integer(title
=_("Warning at"), unit
=_("MByte/s")),
4034 Integer(title
=_("Critical at"), unit
=_("MByte/s")),
4039 title
=_("Assumed link speed"),
4040 help=_("If the automatic detection of the link speed does "
4041 "not work you can set the link speed here."),
4042 unit
=_("GByte/s"))),
4045 title
=_("CRC errors rate"),
4047 Percentage(title
=_("Warning at"), unit
=_("percent")),
4048 Percentage(title
=_("Critical at"), unit
=_("percent")),
4052 title
=_("Enc-Out frames rate"),
4054 Percentage(title
=_("Warning at"), unit
=_("percent")),
4055 Percentage(title
=_("Critical at"), unit
=_("percent")),
4059 title
=_("Enc-In frames rate"),
4061 Percentage(title
=_("Warning at"), unit
=_("percent")),
4062 Percentage(title
=_("Critical at"), unit
=_("percent")),
4066 title
=_("No-TxCredits errors"),
4068 Percentage(title
=_("Warning at"), unit
=_("percent")),
4069 Percentage(title
=_("Critical at"), unit
=_("percent")),
4073 title
=_("C3 discards"),
4075 Percentage(title
=_("Warning at"), unit
=_("percent")),
4076 Percentage(title
=_("Critical at"), unit
=_("percent")),
4080 title
=_("Averaging"),
4082 "If this parameter is set, all throughputs will be averaged "
4083 "over the specified time interval before levels are being applied. Per "
4084 "default, averaging is turned off. "),
4092 title
=_("Allowed states (otherwise check will be critical)"),
4095 (2, _("noTransceiver")),
4096 (3, _("laserFault")),
4100 (7, _("portFault")),
4101 (8, _("diagFault")),
4104 title
=_("Physical state of port"),
4106 label
=_("ignore physical state"),
4111 title
=_("Allowed states (otherwise check will be critical)"),
4119 title
=_("Operational state"),
4121 label
=_("ignore operational state"),
4126 title
=_("Allowed states (otherwise check will be critical)"),
4133 title
=_("Administrative state"),
4135 label
=_("ignore administrative state"),
4138 title
=_("port name"),
4139 help=_("The name of the switch port"),
4144 register_check_parameters(
4145 RulespecGroupCheckParametersStorage
, "brocade_sfp", _("Brocade SFPs"),
4146 Dictionary(elements
=[
4149 title
=_("Rx power level"),
4151 Float(title
=_("Critical below"), unit
=_("dBm")),
4152 Float(title
=_("Warning below"), unit
=_("dBm")),
4153 Float(title
=_("Warning at"), unit
=_("dBm")),
4154 Float(title
=_("Critical at"), unit
=_("dBm"))
4158 title
=_("Tx power level"),
4160 Float(title
=_("Critical below"), unit
=_("dBm")),
4161 Float(title
=_("Warning below"), unit
=_("dBm")),
4162 Float(title
=_("Warning at"), unit
=_("dBm")),
4163 Float(title
=_("Critical at"), unit
=_("dBm"))
4165 ]), TextAscii(title
=_("Port index")), "dict")
4167 register_check_parameters(
4168 RulespecGroupCheckParametersStorage
, "fcport_words", _("Atto Fibrebridge FC port"),
4170 title
=_("Levels for transmitted and received words"),
4172 ("fc_tx_words", Levels(title
=_("Tx"), unit
=_("words/s"))),
4173 ("fc_rx_words", Levels(title
=_("Rx"), unit
=_("words/s"))),
4175 ), TextAscii(title
=_("Port index"),), "dict")
4177 register_check_parameters(
4178 RulespecGroupCheckParametersStorage
, "fs_mount_options",
4179 _("Filesystem mount options (Linux/UNIX)"),
4181 title
=_("Expected mount options"),
4182 help=_("Specify all expected mount options here. If the list of "
4183 "actually found options differs from this list, the check will go "
4184 "warning or critical. Just the option <tt>commit</tt> is being "
4185 "ignored since it is modified by the power saving algorithms."),
4186 valuespec
=TextUnicode(),
4187 ), TextAscii(title
=_("Mount point"), allow_empty
=False), "first")
4189 register_check_parameters(
4190 RulespecGroupCheckParametersStorage
, "storcli_vdrives", _("LSI RAID VDrives (StorCLI)"),
4192 title
=_("Evaluation of VDrive States"),
4194 ("Optimal", MonitoringState(
4195 title
=_("State for <i>Optimal</i>"),
4198 ("Partially Degraded",
4200 title
=_("State for <i>Partially Degraded</i>"),
4203 ("Degraded", MonitoringState(
4204 title
=_("State for <i>Degraded</i>"),
4207 ("Offline", MonitoringState(
4208 title
=_("State for <i>Offline</i>"),
4211 ("Recovery", MonitoringState(
4212 title
=_("State for <i>Recovery</i>"),
4216 title
=_("Virtual Drive"),
4220 register_check_parameters(
4221 RulespecGroupCheckParametersStorage
, "storcli_pdisks", _("LSI RAID physical disks (StorCLI)"),
4223 title
=_("Evaluation of PDisk States"),
4225 ("Dedicated Hot Spare",
4227 title
=_("State for <i>Dedicated Hot Spare</i>"),
4230 ("Global Hot Spare",
4232 title
=_("State for <i>Global Hot Spare</i>"),
4235 ("Unconfigured Good",
4237 title
=_("State for <i>Unconfigured Good</i>"),
4240 ("Unconfigured Bad",
4242 title
=_("State for <i>Unconfigured Bad</i>"),
4245 ("Online", MonitoringState(
4246 title
=_("State for <i>Online</i>"),
4249 ("Offline", MonitoringState(
4250 title
=_("State for <i>Offline</i>"),
4254 title
=_("PDisk EID:Slot-Device"),
4258 register_check_parameters(
4259 RulespecGroupCheckParametersStorage
,
4261 _("VEEAM tape backup jobs"),
4263 title
=_("Levels for duration of backup job"),
4265 Age(title
="Warning at"),
4266 Age(title
="Critical at"),
4269 TextAscii(title
=_("Name of the tape job"),),
4274 def ceph_epoch_element(title
):
4279 Float(title
=_("Warning at")),
4280 Float(title
=_("Critical at")),
4281 Integer(title
=_("Average interval"), unit
=_("minutes")),
4285 register_check_parameters(
4286 RulespecGroupCheckParametersStorage
,
4289 Dictionary(elements
=ceph_epoch_element(_("Status epoch levels and average")),),
4294 register_check_parameters(
4295 RulespecGroupCheckParametersStorage
,
4302 title
=_("Upper levels for number of OSDs which are out"),
4304 Percentage(title
=_("Warning at")),
4305 Percentage(title
=_("Critical at")),
4309 title
=_("Upper levels for number of OSDs which are down"),
4311 Percentage(title
=_("Warning at")),
4312 Percentage(title
=_("Critical at")),
4314 ] + ceph_epoch_element(_("OSDs epoch levels and average")),),
4319 register_check_parameters(
4320 RulespecGroupCheckParametersStorage
,
4323 Dictionary(elements
=ceph_epoch_element(_("MGRs epoch levels and average")),),
4328 register_check_parameters(
4329 RulespecGroupCheckParametersStorage
,
4330 "quantum_storage_status",
4331 _("Quantum Storage Status"),
4332 Dictionary(elements
=[
4336 ("unavailable", MonitoringState(title
=_("Device unavailable"), default_value
=2)),
4337 ("available", MonitoringState(title
=_("Device available"), default_value
=0)),
4338 ("online", MonitoringState(title
=_("Device online"), default_value
=0)),
4339 ("offline", MonitoringState(title
=_("Device offline"), default_value
=2)),
4340 ("going online", MonitoringState(title
=_("Device going online"), default_value
=1)),
4341 ("state not available",
4342 MonitoringState(title
=_("Device state not available"), default_value
=3)),
4344 title
=_('Map Device States'),
4352 register_check_parameters(
4353 RulespecGroupCheckParametersEnvironment
, "apc_system_events", _("APC Inrow System Events"),
4355 title
=_("System Events on APX Inrow Devices"),
4357 ("state", MonitoringState(
4358 title
=_("State during active system events"),
4363 # Note: This hack is only required on very old filesystem checks (prior August 2013)
4364 fs_levels_elements_hack
= [
4365 # Beware: this is a nasty hack that helps us to detect new-style parameters.
4366 # Something hat has todo with float/int conversion and has not been documented
4367 # by the one who implemented this.
4368 ("flex_levels", FixedValue(
4376 # Match and transform functions for level configurations like
4377 # -- used absolute, positive int (2, 4)
4378 # -- used percentage, positive float (2.0, 4.0)
4379 # -- available absolute, negative int (-2, -4)
4380 # -- available percentage, negative float (-2.0, -4.0)
4382 def match_dual_level_type(value
):
4383 if isinstance(value
, list):
4385 if entry
[1][0] < 0 or entry
[1][1] < 0:
4388 if value
[0] < 0 or value
[1] < 0:
4393 def get_free_used_dynamic_valuespec(what
, name
, default_value
=(80.0, 90.0)):
4395 title
= _("used space")
4398 title
= _("free space")
4403 title
=_("Percentage %s") % title
,
4405 Percentage(title
=_("Warning if %s") % course
, unit
="%", minvalue
=0.0),
4406 Percentage(title
=_("Critical if %s") % course
, unit
="%", minvalue
=0.0),
4409 title
=_("Absolute %s") % title
,
4411 Integer(title
=_("Warning if %s") % course
, unit
=_("MB"), minvalue
=0),
4412 Integer(title
=_("Critical if %s") % course
, unit
=_("MB"), minvalue
=0),
4416 def validate_dynamic_levels(value
, varprefix
):
4417 if [v
for v
in value
if v
[0] < 0]:
4418 raise MKUserError(varprefix
, _("You need to specify levels " "of at least 0 bytes."))
4421 title
=_("Levels for %s %s") % (name
, title
),
4423 show_alternative_title
=True,
4424 default_value
=default_value
,
4425 elements
=vs_subgroup
+ [
4428 orientation
="horizontal",
4430 Filesize(title
=_("%s larger than") % name
.title()),
4431 Alternative(elements
=vs_subgroup
)
4433 title
=_('Dynamic levels'),
4435 validate
=validate_dynamic_levels
,
4441 def transform_filesystem_free(value
):
4442 tuple_convert
= lambda val
: tuple(-x
for x
in val
)
4444 if isinstance(value
, tuple):
4445 return tuple_convert(value
)
4449 result
.append((item
[0], tuple_convert(item
[1])))
4453 fs_levels_elements
= [("levels",
4455 title
=_("Levels for filesystem"),
4456 show_alternative_title
=True,
4457 default_value
=(80.0, 90.0),
4458 match
=match_dual_level_type
,
4460 get_free_used_dynamic_valuespec("used", "filesystem"),
4462 get_free_used_dynamic_valuespec(
4463 "free", "filesystem", default_value
=(20.0, 10.0)),
4464 title
=_("Levels for filesystem free space"),
4466 forth
=transform_filesystem_free
,
4467 back
=transform_filesystem_free
)
4471 title
=_("Display warn/crit levels in check output..."),
4473 ("onproblem", _("Only if the status is non-OK")),
4474 ("onmagic", _("If the status is non-OK or a magic factor is set")),
4475 ("always", _("Always")),
4477 default_value
="onmagic",
4480 fs_reserved_elements
= [
4483 title
=_("Show space reserved for the <tt>root</tt> user"),
4485 _("Check_MK treats space that is reserved for the <tt>root</tt> user on Linux and Unix as "
4486 "used space. Usually, 5% are being reserved for root when a new filesystem is being created. "
4487 "With this option you can have Check_MK display the current amount of reserved but yet unused "
4490 (True, _("Show reserved space")),
4491 (False, _("Do now show reserved space")),
4493 ("subtract_reserved",
4496 "Exclude space reserved for the <tt>root</tt> user from calculation of used space"),
4498 _("By default Check_MK treats space that is reserved for the <tt>root</tt> user on Linux and Unix as "
4499 "used space. Usually, 5% are being reserved for root when a new filesystem is being created. "
4500 "With this option you can have Check_MK exclude the current amount of reserved but yet unused "
4501 "space from the calculations regarding the used space percentage."),
4503 (False, _("Include reserved space")),
4504 (True, _("Exclude reserved space")),
4508 fs_inodes_elements
= [
4511 title
=_("Levels for Inodes"),
4512 help=_("The number of remaining inodes on the filesystem. "
4513 "Please note that this setting has no effect on some filesystem checks."),
4516 title
=_("Percentage free"),
4518 Percentage(title
=_("Warning if less than")),
4519 Percentage(title
=_("Critical if less than")),
4522 title
=_("Absolute free"),
4525 title
=_("Warning if less than"),
4529 default_value
=10000),
4531 title
=_("Critical if less than"),
4535 default_value
=5000),
4538 default_value
=(10.0, 5.0),
4542 title
=_("Display inode usage in check output..."),
4544 ("onproblem", _("Only in case of a problem")),
4545 ("onlow", _("Only in case of a problem or if inodes are below 50%")),
4546 ("always", _("Always")),
4548 default_value
="onlow",
4552 fs_magic_elements
= [
4555 title
=_("Magic factor (automatic level adaptation for large filesystems)"),
4561 title
=_("Reference size for magic factor"), default_value
=20, minvalue
=1, unit
=_("GB"))),
4564 title
=_("Minimum levels if using magic factor"),
4565 help=_("The filesystem levels will never fall below these values, when using "
4566 "the magic factor and the filesystem is very small."),
4568 Percentage(title
=_("Warning at"), unit
=_("% usage"), allow_int
=True, default_value
=50),
4570 title
=_("Critical at"), unit
=_("% usage"), allow_int
=True, default_value
=60)
4574 size_trend_elements
= [
4578 title
=_("Time Range for trend computation"),
4582 title
=_("Trend computation"),
4583 label
=_("Enable trend computation"))),
4586 title
=_("Levels on trends in MB per time range"),
4588 Integer(title
=_("Warning at"), unit
=_("MB / range"), default_value
=100),
4589 Integer(title
=_("Critical at"), unit
=_("MB / range"), default_value
=200)
4593 title
=_("Levels for the percentual growth per time range"),
4596 title
=_("Warning at"),
4597 unit
=_("% / range"),
4601 title
=_("Critical at"),
4602 unit
=_("% / range"),
4608 title
=_("Levels on the time left until full"),
4611 title
=_("Warning if below"),
4616 title
=_("Critical if below"),
4621 ("trend_showtimeleft",
4623 title
=_("Display time left in check output"),
4625 help=_("Normally, the time left until the disk is full is only displayed when "
4626 "the configured levels have been breached. If you set this option "
4627 "the check always reports this information"))),
4630 title
=_("Trend performance data"),
4631 label
=_("Enable generation of performance data from trends"))),
4634 filesystem_elements
= fs_levels_elements
+ fs_levels_elements_hack
+ fs_reserved_elements
+ fs_inodes_elements
+ fs_magic_elements
+ size_trend_elements
4637 def vs_filesystem(extra_elements
=None):
4638 if extra_elements
is None:
4641 help=_("This ruleset allows to set parameters for space and inodes usage"),
4642 elements
=filesystem_elements
+ extra_elements
,
4643 hidden_keys
=["flex_levels"],
4644 ignored_keys
=["patterns"],
4648 register_check_parameters(
4649 RulespecGroupCheckParametersStorage
, "filesystem", _("Filesystems (used space and growth)"),
4652 title
=_("Mount point"),
4653 help=_("For Linux/UNIX systems, specify the mount point, for Windows systems "
4654 "the drive letter uppercase followed by a colon and a slash, e.g. <tt>C:/</tt>"),
4655 allow_empty
=False), "dict")
4657 register_check_parameters(
4658 RulespecGroupCheckParametersStorage
, "threepar_capacity",
4659 _("3Par Capacity (used space and growth)"),
4662 "failed_capacity_levels",
4664 title
=_("Levels for failed capacity in percent"),
4666 Percentage(title
=_("Warning at"), default
=0.0),
4667 Percentage(title
=_("Critical at"), default
=0.0),
4671 ]), TextAscii(title
=_("Device type"), allow_empty
=False), "dict")
4673 register_check_parameters(RulespecGroupCheckParametersStorage
, "threepar_cpgs",
4674 _("3Par CPG (used space and growth)"), vs_filesystem(),
4675 TextAscii(title
=_("CPG member name"), allow_empty
=False), "dict")
4677 register_check_parameters(
4678 RulespecGroupCheckParametersStorage
,
4680 _("NFS IO Statistics"),
4682 title
=_("NFS IO Statistics"),
4687 title
=_("Operations"),
4689 Float(title
=_("Warning at"), default_value
=None, unit
="1/s"),
4690 Float(title
=_("Critical at"), default_value
=None, unit
="1/s"),
4694 title
=_("RPC Backlog"),
4696 Float(title
=_("Warning below"), default_value
=None, unit
="queue"),
4697 Float(title
=_("Critical below"), default_value
=None, unit
="queue"),
4701 title
=_("Read Operations /s"),
4703 Float(title
=_("Warning at"), default_value
=None, unit
="1/s"),
4704 Float(title
=_("Critical at"), default_value
=None, unit
="1/s"),
4708 title
=_("Reads size /s"),
4710 Float(title
=_("Warning at"), default_value
=None, unit
="bytes/s"),
4711 Float(title
=_("Critical at"), default_value
=None, unit
="bytes/s"),
4715 title
=_("Read bytes per operation"),
4717 Float(title
=_("Warning at"), default_value
=None, unit
="bytes/op"),
4718 Float(title
=_("Critical at"), default_value
=None, unit
="bytes/op"),
4722 title
=_("Read Retransmissions"),
4724 Percentage(title
=_("Warning at"), default_value
=None),
4725 Percentage(title
=_("Critical at"), default_value
=None),
4729 title
=_("Read Average RTT (ms)"),
4731 Float(title
=_("Warning at"), default_value
=None, unit
="ms"),
4732 Float(title
=_("Critical at"), default_value
=None, unit
="ms"),
4736 title
=_("Read Average Executions (ms)"),
4738 Float(title
=_("Warning at"), default_value
=None, unit
="ms"),
4739 Float(title
=_("Critical at"), default_value
=None, unit
="ms"),
4743 title
=_("Write Operations/s"),
4745 Float(title
=_("Warning at"), default_value
=None, unit
="1/s"),
4746 Float(title
=_("Critical at"), default_value
=None, unit
="1/s"),
4750 title
=_("Write size /s"),
4752 Float(title
=_("Warning at"), default_value
=None, unit
="bytes/s"),
4753 Float(title
=_("Critical at"), default_value
=None, unit
="bytes/s"),
4757 title
=_("Write bytes per operation"),
4759 Float(title
=_("Warning at"), default_value
=None, unit
="bytes/s"),
4760 Float(title
=_("Critical at"), default_value
=None, unit
="bytes/s"),
4764 title
=_("Write Retransmissions"),
4766 Percentage(title
=_("Warning at"), default_value
=None),
4767 Percentage(title
=_("Critical at"), default_value
=None),
4769 ("write_avg_rtt_ms",
4771 title
=_("Write Avg RTT (ms)"),
4773 Float(title
=_("Warning at"), default_value
=None, unit
="ms"),
4774 Float(title
=_("Critical at"), default_value
=None, unit
="ms"),
4776 ("write_avg_exe_ms",
4778 title
=_("Write Avg exe (ms)"),
4780 Float(title
=_("Warning at"), default_value
=None, unit
="ms"),
4781 Float(title
=_("Critical at"), default_value
=None, unit
="ms"),
4784 TextAscii(title
=_("NFS IO Statistics"),),
4789 # .--Printing------------------------------------------------------------.
4791 # | | _ \ _ __(_)_ __ | |_(_)_ __ __ _ |
4792 # | | |_) | '__| | '_ \| __| | '_ \ / _` | |
4793 # | | __/| | | | | | | |_| | | | | (_| | |
4794 # | |_| |_| |_|_| |_|\__|_|_| |_|\__, | |
4796 # '----------------------------------------------------------------------'
4799 def transform_printer_supply(params
):
4800 if isinstance(params
, tuple):
4801 if len(params
) == 2:
4802 return {"levels": params
}
4803 return {"levels": params
[:2], "upturn_toner": params
[2]}
4807 register_check_parameters(
4808 RulespecGroupCheckParametersPrinters
,
4810 _("Printer cartridge levels"),
4812 Dictionary(elements
=[
4815 title
=_("Levels for remaining supply"),
4818 title
=_("Warning level for remaining"),
4821 help=_("For consumable supplies, this is configured as the percentage of "
4822 "remaining capacity. For supplies that fill up, this is configured "
4823 "as remaining space."),
4826 title
=_("Critical level for remaining"),
4829 help=_("For consumable supplies, this is configured as the percentage of "
4830 "remaining capacity. For supplies that fill up, this is configured "
4831 "as remaining space."),
4836 title
=_("State for <i>some remaining</i>"),
4837 help=_("Some printers do not report a precise percentage but "
4838 "just <i>some remaining</i> at a low fill state. Here you "
4839 "can set the monitoring state for that situation"),
4844 title
=_("Upturn toner levels"),
4845 label
=_("Printer sends <i>used</i> material instead of <i>remaining</i>"),
4846 help=_("Some Printers (eg. Konica for Drum Cartdiges) returning the available"
4847 " fuel instead of what is left. In this case it's possible"
4848 " to upturn the levels to handle this behavior"),
4851 forth
=transform_printer_supply
,
4853 TextAscii(title
=_("cartridge specification"), allow_empty
=True),
4857 register_check_parameters(
4858 RulespecGroupCheckParametersPrinters
,
4860 _("Printer Input Units"),
4865 title
=_('Capacity remaining'),
4867 Percentage(title
=_("Warning at"), default_value
=0.0),
4868 Percentage(title
=_("Critical at"), default_value
=0.0),
4872 default_keys
=['capacity_levels'],
4874 TextAscii(title
=_('Unit Name'), allow_empty
=True),
4878 register_check_parameters(
4879 RulespecGroupCheckParametersPrinters
,
4881 _("Printer Output Units"),
4886 title
=_('Capacity filled'),
4888 Percentage(title
=_("Warning at"), default_value
=0.0),
4889 Percentage(title
=_("Critical at"), default_value
=0.0),
4893 default_keys
=['capacity_levels'],
4895 TextAscii(title
=_('Unit Name'), allow_empty
=True),
4899 register_check_parameters(
4900 RulespecGroupCheckParametersPrinters
,
4907 title
=_("Levels of current jobs"),
4908 default_value
=(5, 10),
4909 elements
=[Integer(title
=_("Warning at")),
4910 Integer(title
=_("Critical at"))])),
4913 title
=_("Levels for age of jobs"),
4914 help=_("A value in seconds"),
4915 default_value
=(360, 720),
4916 elements
=[Integer(title
=_("Warning at")),
4917 Integer(title
=_("Critical at"))])),
4918 ("is_idle", MonitoringState(
4919 title
=_("State for 'is idle'"),
4922 ("now_printing", MonitoringState(
4923 title
=_("State for 'now printing'"),
4928 title
=_("State for 'disabled since'"),
4932 TextAscii(title
=_("CUPS Queue")),
4937 # .--Os------------------------------------------------------------------.
4944 # '----------------------------------------------------------------------'
4946 register_check_parameters(
4947 RulespecGroupCheckParametersOperatingSystem
,
4949 _("Uptime since last reboot"),
4950 Dictionary(elements
=[
4953 title
=_("Minimum required uptime"),
4955 Age(title
=_("Warning if below")),
4956 Age(title
=_("Critical if below")),
4960 title
=_("Maximum allowed uptime"),
4962 Age(title
=_("Warning at")),
4963 Age(title
=_("Critical at")),
4970 register_check_parameters(
4971 RulespecGroupCheckParametersOperatingSystem
, "systemtime", _("Windows system time offset"),
4973 title
=_("Time offset"),
4975 Integer(title
=_("Warning at"), unit
=_("Seconds")),
4976 Integer(title
=_("Critical at"), unit
=_("Seconds")),
4980 # .--Unsorted--(Don't create new stuff here!)----------------------------.
4982 # | | | | |_ __ ___ ___ _ __| |_ ___ __| | |
4983 # | | | | | '_ \/ __|/ _ \| '__| __/ _ \/ _` | |
4984 # | | |_| | | | \__ \ (_) | | | || __/ (_| | |
4985 # | \___/|_| |_|___/\___/|_| \__\___|\__,_| |
4987 # +----------------------------------------------------------------------+
4988 # | All these rules have not been moved into their according sections. |
4989 # | Please move them as you come along - but beware of dependecies! |
4990 # | Remove this section as soon as it's empty. |
4991 # '----------------------------------------------------------------------'
4993 register_check_parameters(
4994 RulespecGroupCheckParametersEnvironment
, "ups_test", _("Time since last UPS selftest"),
4996 title
=_("Time since last UPS selftest"),
4999 title
=_("Warning Level for time since last self test"),
5000 help=_("Warning Level for time since last diagnostic test of the device. "
5001 "For a value of 0 the warning level will not be used"),
5006 title
=_("Critical Level for time since last self test"),
5007 help=_("Critical Level for time since last diagnostic test of the device. "
5008 "For a value of 0 the critical level will not be used"),
5014 register_check_parameters(
5015 RulespecGroupCheckParametersEnvironment
,
5017 _("APC Power Consumption"),
5019 title
=_("Power Comsumption of APC Devices"),
5022 title
=_("Warning below"),
5027 title
=_("Critical below"),
5034 help=_("The identifier of the phase the power is related to."),
5038 register_check_parameters(
5039 RulespecGroupCheckParametersStorage
,
5041 _("Size and age of single files"),
5042 Dictionary(elements
=[
5045 title
=_("Minimal age"),
5047 Age(title
=_("Warning if younger than")),
5048 Age(title
=_("Critical if younger than")),
5052 title
=_("Maximal age"),
5054 Age(title
=_("Warning if older than")),
5055 Age(title
=_("Critical if older than")),
5059 title
=_("Minimal size"),
5061 Filesize(title
=_("Warning if below")),
5062 Filesize(title
=_("Critical if below")),
5066 title
=_("Maximal size"),
5068 Filesize(title
=_("Warning at")),
5069 Filesize(title
=_("Critical at")),
5073 title
=_("Only check during the following times of the day"),
5074 help=_("Outside these ranges the check will always be OK"),
5076 ("state_missing", MonitoringState(default_value
=3, title
=_("State when file is missing"))),
5078 TextAscii(title
=_("File name"), allow_empty
=True),
5083 RulespecGroupCheckParametersStorage
,
5084 varname
="filesystem_groups",
5085 title
=_('Filesystem grouping patterns'),
5086 help=_('Normally the filesystem checks (<tt>df</tt>, <tt>hr_fs</tt> and others) '
5087 'will create a single service for each filesystem. '
5088 'By defining grouping '
5089 'patterns you can handle groups of filesystems like one filesystem. '
5090 'For each group you can define one or several patterns. '
5091 'The filesystems matching one of the patterns '
5092 'will be monitored like one big filesystem in a single service.'),
5096 orientation
="horizontal",
5098 TextAscii(title
=_("Name of group"),),
5100 title
=_("Pattern for mount point (using * and ?)"),
5101 help=_("You can specify one or several patterns containing "
5102 "<tt>*</tt> and <tt>?</tt>, for example <tt>/spool/tmpspace*</tt>. "
5103 "The filesystems matching the patterns will be monitored "
5104 "like one big filesystem in a single service."),
5107 add_label
=_("Add pattern"),
5113 RulespecGroupCheckParametersStorage
,
5114 varname
="fileinfo_groups",
5115 title
=_('File Grouping Patterns'),
5116 help=_('The check <tt>fileinfo</tt> monitors the age and size of '
5117 'a single file. Each file information that is sent '
5118 'by the agent will create one service. By defining grouping '
5119 'patterns you can switch to the check <tt>fileinfo.groups</tt>. '
5120 'That check monitors a list of files at once. You can set levels '
5121 'not only for the total size and the age of the oldest/youngest '
5122 'file but also on the count. You can define one or several '
5123 'patterns for a group containing <tt>*</tt> and <tt>?</tt>, for example '
5124 '<tt>/var/log/apache/*.log</tt>. Please see Python\'s fnmatch for more '
5125 'information regarding globbing patterns and special characters. '
5126 'If the pattern begins with a tilde then this pattern is interpreted as '
5127 'a regular expression instead of as a filename globbing pattern and '
5128 '<tt>*</tt> and <tt>?</tt> are treated differently. '
5129 'For files contained in a group '
5130 'the discovery will automatically create a group service instead '
5131 'of single services for each file. This rule also applies when '
5132 'you use manually configured checks instead of inventorized ones. '
5133 'Furthermore, the current time/date in a configurable format '
5134 'may be included in the include pattern. The syntax is as follows: '
5135 '$DATE:format-spec$ or $YESTERDAY:format-spec$, where format-spec '
5136 'is a list of time format directives of the unix date command. '
5137 'Example: $DATE:%Y%m%d$ is todays date, e.g. 20140127. A pattern '
5138 'of /var/tmp/backups/$DATE:%Y%m%d$.txt would search for .txt files '
5139 'with todays date as name in the directory /var/tmp/backups. '
5140 'The YESTERDAY syntax simply subtracts one day from the reference time.'),
5143 help=_("This defines one file grouping pattern."),
5145 orientation
="horizontal",
5148 title
=_("Name of group"),
5154 orientation
="vertical",
5156 TextAscii(title
=_("Include Pattern"), size
=40),
5157 TextAscii(title
=_("Exclude Pattern"), size
=40),
5160 forth
=lambda params
: isinstance(params
, str) and (params
, '') or params
),
5163 add_label
=_("Add pattern group"),
5168 register_check_parameters(
5169 RulespecGroupCheckParametersStorage
,
5171 _("Size, age and count of file groups"),
5176 title
=_("Minimal age of oldest file"),
5178 Age(title
=_("Warning if younger than")),
5179 Age(title
=_("Critical if younger than")),
5183 title
=_("Maximal age of oldest file"),
5185 Age(title
=_("Warning if older than")),
5186 Age(title
=_("Critical if older than")),
5190 title
=_("Minimal age of newest file"),
5192 Age(title
=_("Warning if younger than")),
5193 Age(title
=_("Critical if younger than")),
5197 title
=_("Maximal age of newest file"),
5199 Age(title
=_("Warning if older than")),
5200 Age(title
=_("Critical if older than")),
5202 ("minsize_smallest",
5204 title
=_("Minimal size of smallest file"),
5206 Filesize(title
=_("Warning if below")),
5207 Filesize(title
=_("Critical if below")),
5209 ("maxsize_smallest",
5211 title
=_("Maximal size of smallest file"),
5213 Filesize(title
=_("Warning if above")),
5214 Filesize(title
=_("Critical if above")),
5218 title
=_("Minimal size of largest file"),
5220 Filesize(title
=_("Warning if below")),
5221 Filesize(title
=_("Critical if below")),
5225 title
=_("Maximal size of largest file"),
5227 Filesize(title
=_("Warning if above")),
5228 Filesize(title
=_("Critical if above")),
5232 title
=_("Minimal size"),
5234 Filesize(title
=_("Warning if below")),
5235 Filesize(title
=_("Critical if below")),
5239 title
=_("Maximal size"),
5241 Filesize(title
=_("Warning if above")),
5242 Filesize(title
=_("Critical if above")),
5246 title
=_("Minimal file count"),
5248 Integer(title
=_("Warning if below")),
5249 Integer(title
=_("Critical if below")),
5253 title
=_("Maximal file count"),
5255 Integer(title
=_("Warning if above")),
5256 Integer(title
=_("Critical if above")),
5260 title
=_("Only check during the following times of the day"),
5261 help=_("Outside these ranges the check will always be OK"),
5266 MonitoringState(title
=_("Monitoring state"), default_value
=2),
5269 orientation
="hroizontal",
5271 ("count", _("File count at"), Integer()),
5272 ("count_lower", _("File count below"), Integer()),
5273 ("size", _("File size at"), Filesize()),
5274 ("size_lower", _("File size below"), Filesize()),
5275 ("largest_size", _("Largest file size at"), Filesize()),
5276 ("largest_size_lower", _("Largest file size below"), Filesize()),
5277 ("smallest_size", _("Smallest file size at"), Filesize()),
5278 ("smallest_size_lower", _("Smallest file size below"), Filesize()),
5279 ("oldest_age", _("Oldest file age at"), Age()),
5280 ("oldest_age_lower", _("Oldest file age below"), Age()),
5281 ("newest_age", _("Newest file age at"), Age()),
5282 ("newest_age_lower", _("Newest file age below"), Age()),
5287 title
=_("Level conjunctions"),
5289 _("In order to check dependent file group statistics you can configure "
5290 "conjunctions of single levels now. A conjunction consists of a monitoring state "
5291 "and any number of upper or lower levels. If all of the configured levels within "
5292 "a conjunction are reached then the related state is reported."),
5295 ignored_keys
=["precompiled_patterns"]),
5297 title
=_("File Group Name"),
5299 "This name must match the name of the group defined "
5300 "in the <a href=\"wato.py?mode=edit_ruleset&varname=fileinfo_groups\">%s</a> ruleset.")
5301 % (_('File Grouping Patterns')),
5306 register_check_parameters(
5307 RulespecGroupCheckParametersStorage
,
5309 _("Netapp FC Port throughput"),
5310 Dictionary(elements
=[("read",
5314 Filesize(title
=_("Warning if below")),
5315 Filesize(title
=_("Critical if below")),
5321 Filesize(title
=_("Warning at")),
5322 Filesize(title
=_("Critical at")),
5324 TextAscii(title
=_("File name"), allow_empty
=True),
5328 register_check_parameters(
5329 RulespecGroupCheckParametersOperatingSystem
,
5330 "memory_pagefile_win",
5331 _("Memory and pagefile levels for Windows"),
5332 Dictionary(elements
=[
5336 title
=_("Memory Levels"),
5340 title
=_("Memory usage in percent"),
5342 Percentage(title
=_("Warning at")),
5343 Percentage(title
=_("Critical at")),
5348 title
=_("Absolute free memory"),
5350 Filesize(title
=_("Warning if less than")),
5351 Filesize(title
=_("Critical if less than")),
5353 # Note: Filesize values lesser 1MB will not work
5354 # -> need hide option in filesize valuespec
5355 back
=lambda x
: (x
[0] / 1024 / 1024, x
[1] / 1024 / 1024),
5356 forth
=lambda x
: (x
[0] * 1024 * 1024, x
[1] * 1024 * 1024)),
5357 PredictiveLevels(unit
=_("GB"), default_difference
=(0.5, 1.0))
5359 default_value
=(80.0, 90.0))),
5363 title
=_("Pagefile Levels"),
5367 title
=_("Pagefile usage in percent"),
5369 Percentage(title
=_("Warning at")),
5370 Percentage(title
=_("Critical at")),
5374 title
=_("Absolute free pagefile"),
5376 Filesize(title
=_("Warning if less than")),
5377 Filesize(title
=_("Critical if less than")),
5379 # Note: Filesize values lesser 1MB will not work
5380 # -> need hide option in filesize valuespec
5381 back
=lambda x
: (x
[0] / 1024 / 1024, x
[1] / 1024 / 1024),
5382 forth
=lambda x
: (x
[0] * 1024 * 1024, x
[1] * 1024 * 1024)),
5384 title
=_("Predictive levels"), unit
=_("GB"), default_difference
=(0.5, 1.0))
5386 default_value
=(80.0, 90.0))),
5389 title
=_("Averaging"),
5390 help=_("If this parameter is set, all measured values will be averaged "
5391 "over the specified time interval before levels are being applied. Per "
5392 "default, averaging is turned off. "),
5401 register_check_parameters(
5402 RulespecGroupCheckParametersApplications
,
5405 Dictionary(elements
=[
5408 title
=_("Remaining Open Slots"),
5409 help=_("Here you can set the number of remaining open slots"),
5411 Integer(title
=_("Warning below"), label
=_("slots")),
5412 Integer(title
=_("Critical below"), label
=_("slots"))
5416 title
=_("Busy workers"),
5417 help=_("Here you can set upper levels of busy workers"),
5419 Integer(title
=_("Warning at"), label
=_("busy workers")),
5420 Integer(title
=_("Critical at"), label
=_("busy workers"))
5424 title
=_("Apache Server"),
5425 help=_("A string-combination of servername and port, e.g. 127.0.0.1:5000.")),
5429 register_check_parameters(
5430 RulespecGroupCheckParametersApplications
,
5431 "saprouter_cert_age",
5432 _("SAP router certificate time settings"),
5433 Dictionary(elements
=[
5436 title
=_('Lower levels for certificate age'),
5438 Age(title
=_("Warning below"), default_value
=30 * 86400),
5439 Age(title
=_("Critical below"), default_value
=7 * 86400),
5446 register_check_parameters(
5447 RulespecGroupCheckParametersApplications
,
5450 Dictionary(elements
=[
5453 title
=_("Number of Loggedin Users"),
5455 Integer(title
=_("Warning at"), label
=_("Users")),
5456 Integer(title
=_("Critical at"), label
=_("Users"))
5460 title
=_("Frontend net time"),
5462 Float(title
=_("Warning at"), unit
=_('ms')),
5463 Float(title
=_("Critical at"), unit
=_('ms'))
5467 title
=_("Response Time"),
5469 Float(title
=_("Warning at"), unit
=_('ms')),
5470 Float(title
=_("Critical at"), unit
=_('ms'))
5474 title
=_("System ID"),
5475 help=_("The SAP system ID."),
5480 register_check_parameters(
5481 RulespecGroupCheckParametersApplications
,
5484 Dictionary(elements
=[("active_connections",
5486 title
=_("Active Connections"),
5487 help=_("You can configure upper thresholds for the currently active "
5488 "connections handled by the web server."),
5490 Integer(title
=_("Warning at"), unit
=_("connections")),
5491 Integer(title
=_("Critical at"), unit
=_("connections"))
5494 title
=_("Nginx Server"),
5495 help=_("A string-combination of servername and port, e.g. 127.0.0.1:80.")),
5499 register_check_parameters(
5500 RulespecGroupCheckParametersApplications
,
5503 Dictionary(elements
=[
5507 help=_("Status of the SLES license"),
5509 ('Registered', _('Registered')),
5510 ('Ignore', _('Do not check')),
5512 ("subscription_status",
5514 title
=_("Subscription"),
5515 help=_("Status of the SLES subscription"),
5517 ('ACTIVE', _('ACTIVE')),
5518 ('Ignore', _('Do not check')),
5522 title
=_("Time until license expiration"),
5523 help=_("Remaining days until the SLES license expires"),
5525 Integer(title
=_("Warning at"), unit
=_("days")),
5526 Integer(title
=_("Critical at"), unit
=_("days"))
5533 register_check_parameters(
5534 RulespecGroupCheckParametersNetworking
,
5536 _("Viprinet router"),
5537 Dictionary(elements
=[
5540 title
=_("Set expected router mode"),
5542 ("inv", _("Mode found during inventory")),
5545 ("2", _("Hub running as HotSpare")),
5546 ("3", _("Hotspare-Hub replacing another router")),
5553 register_check_parameters(
5554 RulespecGroupCheckParametersNetworking
, 'docsis_channels_upstream',
5555 _("Docsis Upstream Channels"),
5556 Dictionary(elements
=[
5559 title
=_("Levels for signal/noise ratio"),
5561 Float(title
=_("Warning at or below"), unit
="dB", default_value
=10.0),
5562 Float(title
=_("Critical at or below"), unit
="dB", default_value
=5.0),
5566 title
=_("Levels for rate of corrected errors"),
5568 Percentage(title
=_("Warning at"), default_value
=5.0),
5569 Percentage(title
=_("Critical at"), default_value
=8.0),
5573 title
=_("Levels for rate of uncorrectable errors"),
5575 Percentage(title
=_("Warning at"), default_value
=1.0),
5576 Percentage(title
=_("Critical at"), default_value
=2.0),
5578 ]), TextAscii(title
=_("ID of the channel (usually ranging from 1)")), "dict")
5580 register_check_parameters(
5581 RulespecGroupCheckParametersNetworking
, "docsis_channels_downstream",
5582 _("Docsis Downstream Channels"),
5583 Dictionary(elements
=[
5586 title
=_("Transmit Power"),
5587 help=_("The operational transmit power"),
5589 Float(title
=_("warning at or below"), unit
="dBmV", default_value
=5.0),
5590 Float(title
=_("critical at or below"), unit
="dBmV", default_value
=1.0),
5592 ]), TextAscii(title
=_("ID of the channel (usually ranging from 1)")), "dict")
5594 register_check_parameters(
5595 RulespecGroupCheckParametersNetworking
, "docsis_cm_status", _("Docsis Cable Modem Status"),
5596 Dictionary(elements
=[
5599 title
=_("Modem States that lead to a critical state"),
5601 "If one of the selected states occurs the check will repsond with a critical state "
5606 (3, "notSynchronized"),
5607 (4, "phySynchronized"),
5608 (5, "usParametersAcquired"),
5609 (6, "rangingComplete"),
5611 (8, "todEstablished"),
5612 (9, "securityEstablished"),
5613 (10, "paramTransferComplete"),
5614 (11, "registrationComplete"),
5615 (12, "operational"),
5616 (13, "accessDenied"),
5618 default_value
=[1, 2, 13],
5622 title
=_("Transmit Power"),
5623 help=_("The operational transmit power"),
5625 Float(title
=_("warning at"), unit
="dBmV", default_value
=20.0),
5626 Float(title
=_("critical at"), unit
="dBmV", default_value
=10.0),
5628 ]), TextAscii(title
=_("ID of the Entry")), "dict")
5630 register_check_parameters(
5631 RulespecGroupCheckParametersNetworking
,
5639 title
=("VPN Tunnel Endpoints"),
5642 title
=_("IP-Address or Name of Tunnel Endpoint"),
5644 "The configured value must match a tunnel reported by the monitored "
5649 title
=_("Tunnel Alias"),
5651 "You can configure an individual alias here for the tunnel matching "
5652 "the IP-Address or Name configured in the field above."),
5656 title
=_("State if tunnel is not found"),
5659 add_label
=_("Add tunnel"),
5661 title
=_("VPN tunnel specific configuration"),
5665 title
=_("Default state to report when tunnel can not be found anymore"),
5666 help=_("Default state if a tunnel, which is not listed above in this rule, "
5667 "can no longer be found."),
5670 TextAscii(title
=_("IP-Address of Tunnel Endpoint")),
5674 register_check_parameters(
5675 RulespecGroupCheckParametersNetworking
, "lsnat", _("Enterasys LSNAT Bindings"),
5678 ("current_bindings",
5680 title
=_("Number of current LSNAT bindings"),
5682 Integer(title
=_("Warning at"), size
=10, unit
=_("bindings")),
5683 Integer(title
=_("Critical at"), size
=10, unit
=_("bindings")),
5686 optional_keys
=False,
5689 register_check_parameters(
5690 RulespecGroupCheckParametersNetworking
, "enterasys_powersupply",
5691 _("Enterasys Power Supply Settings"),
5694 ("redundancy_ok_states",
5696 title
=_("States treated as OK"),
5699 (2, 'notRedundant'),
5700 (3, 'notSupported'),
5705 optional_keys
=False,
5706 ), TextAscii(title
=_("Number of Powersupply"),), "dict")
5708 hivemanger_states
= [
5709 ("Critical", "Critical"),
5714 register_check_parameters(
5715 RulespecGroupCheckParametersNetworking
,
5716 "hivemanager_devices",
5717 _("Hivemanager Devices"),
5718 Dictionary(elements
=[
5721 title
=_("Number of clients"),
5722 help=_("Number of clients connected to a Device."),
5724 Integer(title
=_("Warning at"), unit
=_("clients")),
5725 Integer(title
=_("Critical at"), unit
=_("clients")),
5729 title
=_("Maximum uptime of Device"),
5731 Age(title
=_("Warning at")),
5732 Age(title
=_("Critical at")),
5734 ('alert_on_loss', FixedValue(
5737 title
=_("Do not alert on connection loss"),
5741 title
=_("States treated as warning"),
5742 choices
=hivemanger_states
,
5743 default_value
=['Maybe', 'Major', 'Minor'],
5747 title
=_("States treated as critical"),
5748 choices
=hivemanger_states
,
5749 default_value
=['Critical'],
5752 TextAscii(title
=_("Hostname of the Device")),
5756 register_check_parameters(
5757 RulespecGroupCheckParametersNetworking
,
5758 "hivemanager_ng_devices",
5759 _("HiveManager NG Devices"),
5760 Dictionary(elements
=[
5763 title
=_("Number of clients"),
5764 help=_("Number of clients connected to a Device."),
5766 Integer(title
=_("Warning at"), unit
=_("clients")),
5767 Integer(title
=_("Critical at"), unit
=_("clients")),
5770 TextAscii(title
=_("Hostname of the Device")),
5774 register_check_parameters(
5775 RulespecGroupCheckParametersNetworking
,
5777 _("WLC WiFi client connections"),
5780 title
= _("Number of connections"),
5784 title
= _("Upper levels"),
5786 Integer(title
= _("Warning at"), unit
=_("connections")),
5787 Integer(title
= _("Critical at"), unit
=_("connections")),
5792 title
= _("Lower levels"),
5794 Integer(title
= _("Critical if below"), unit
=_("connections")),
5795 Integer(title
= _("Warning if below"), unit
=_("connections")),
5800 # old params = (crit_low, warn_low, warn, crit)
5801 forth
= lambda v
: isinstance(v
, tuple) and { "levels" : (v
[2], v
[3]), "levels_lower" : (v
[1], v
[0]) } or v
,
5803 TextAscii( title
= _("Name of Wifi")),
5807 register_check_parameters(
5808 RulespecGroupCheckParametersNetworking
,
5812 help=_("Here you can set which alert type is set when the given "
5813 "access point is missing (might be powered off). The access point "
5814 "can be specified by the AP name or the AP model"),
5815 elements
=[("ap_name",
5818 TextAscii(title
=_("AP name")),
5819 MonitoringState(title
=_("State when missing"), default_value
=2)
5821 title
=_("Access point name"),
5822 add_label
=_("Add name")))]),
5823 TextAscii(title
=_("Access Point")),
5827 register_check_parameters(
5828 RulespecGroupCheckParametersNetworking
,
5830 _("TCP connection statistics"),
5831 Dictionary(elements
=[
5834 title
=_("ESTABLISHED"),
5835 help=_("connection up and passing data"),
5837 Integer(title
=_("Warning at"), label
=_("connections")),
5838 Integer(title
=_("Critical at"), label
=_("connections"))
5842 title
=_("SYN_SENT"),
5843 help=_("session has been requested by us; waiting for reply from remote endpoint"),
5845 Integer(title
=_("Warning at"), label
=_("connections")),
5846 Integer(title
=_("Critical at"), label
=_("connections"))
5850 title
=_("SYN_RECV"),
5851 help=_("session has been requested by a remote endpoint "
5852 "for a socket on which we were listening"),
5854 Integer(title
=_("Warning at"), label
=_("connections")),
5855 Integer(title
=_("Critical at"), label
=_("connections"))
5859 title
=_("LAST_ACK"),
5860 help=_("our socket is closed; remote endpoint has also shut down; "
5861 " we are waiting for a final acknowledgement"),
5863 Integer(title
=_("Warning at"), label
=_("connections")),
5864 Integer(title
=_("Critical at"), label
=_("connections"))
5868 title
=_("CLOSE_WAIT"),
5869 help=_("remote endpoint has shut down; the kernel is waiting "
5870 "for the application to close the socket"),
5872 Integer(title
=_("Warning at"), label
=_("connections")),
5873 Integer(title
=_("Critical at"), label
=_("connections"))
5877 title
=_("TIME_WAIT"),
5878 help=_("socket is waiting after closing for any packets left on the network"),
5880 Integer(title
=_("Warning at"), label
=_("connections")),
5881 Integer(title
=_("Critical at"), label
=_("connections"))
5886 help=_("socket is not being used"),
5888 Integer(title
=_("Warning at"), label
=_("connections")),
5889 Integer(title
=_("Critical at"), label
=_("connections"))
5894 help=_("our socket is shut down; remote endpoint is shut down; "
5895 "not all data has been sent"),
5897 Integer(title
=_("Warning at"), label
=_("connections")),
5898 Integer(title
=_("Critical at"), label
=_("connections"))
5902 title
=_("FIN_WAIT1"),
5903 help=_("our socket has closed; we are in the process of "
5904 "tearing down the connection"),
5906 Integer(title
=_("Warning at"), label
=_("connections")),
5907 Integer(title
=_("Critical at"), label
=_("connections"))
5911 title
=_("FIN_WAIT2"),
5912 help=_("the connection has been closed; our socket is waiting "
5913 "for the remote endpoint to shutdown"),
5915 Integer(title
=_("Warning at"), label
=_("connections")),
5916 Integer(title
=_("Critical at"), label
=_("connections"))
5921 help=_("represents waiting for a connection request from any remote TCP and port"),
5923 Integer(title
=_("Warning at"), label
=_("connections")),
5924 Integer(title
=_("Critical at"), label
=_("connections"))
5929 help=_("the socket has been created and an address assigned "
5930 "to with bind(). The TCP stack is not active yet. "
5931 "This state is only reported on Solaris."),
5933 Integer(title
=_("Warning at"), label
=_("connections")),
5934 Integer(title
=_("Critical at"), label
=_("connections"))
5939 help=_("a TCP session that is active but that has no data being "
5940 "transmitted by either device for a prolonged period of time"),
5942 Integer(title
=_("Warning at"), label
=_("connections")),
5943 Integer(title
=_("Critical at"), label
=_("connections"))
5950 register_check_parameters(
5951 RulespecGroupCheckParametersNetworking
,
5953 _("Monitor specific TCP/UDP connections and listeners"),
5955 help=_("This rule allows to monitor the existence of specific TCP connections or "
5956 "TCP/UDP listeners."),
5961 title
=_("Protocol"),
5962 choices
=[("TCP", _("TCP")), ("UDP", _("UDP"))],
5963 default_value
="TCP",
5971 ("ESTABLISHED", "ESTABLISHED"),
5972 ("LISTENING", "LISTENING"),
5973 ("SYN_SENT", "SYN_SENT"),
5974 ("SYN_RECV", "SYN_RECV"),
5975 ("LAST_ACK", "LAST_ACK"),
5976 ("CLOSE_WAIT", "CLOSE_WAIT"),
5977 ("TIME_WAIT", "TIME_WAIT"),
5978 ("CLOSED", "CLOSED"),
5979 ("CLOSING", "CLOSING"),
5980 ("FIN_WAIT1", "FIN_WAIT1"),
5981 ("FIN_WAIT2", "FIN_WAIT2"),
5985 ("local_ip", IPv4Address(title
=_("Local IP address"))),
5986 ("local_port", Integer(
5987 title
=_("Local port number"),
5991 ("remote_ip", IPv4Address(title
=_("Remote IP address"))),
5992 ("remote_port", Integer(
5993 title
=_("Remote port number"),
5999 title
=_("Maximum number of connections or listeners"),
6001 Integer(title
=_("Warning at")),
6002 Integer(title
=_("Critical at")),
6007 title
=_("Minimum number of connections or listeners"),
6009 Integer(title
=_("Warning if below")),
6010 Integer(title
=_("Critical if below")),
6015 title
=_("Connection name"),
6016 help=_("Specify an arbitrary name of this connection here"),
6019 has_inventory
=False,
6022 register_check_parameters(
6023 RulespecGroupCheckParametersApplications
,
6025 _("MS Exchange Information Store"),
6027 title
=_("Set Levels"),
6028 elements
=[('store_latency',
6030 title
=_("Average latency for store requests"),
6032 Float(title
=_("Warning at"), unit
=_('ms'), default_value
=40.0),
6033 Float(title
=_("Critical at"), unit
=_('ms'), default_value
=50.0)
6035 ('clienttype_latency',
6037 title
=_("Average latency for client type requests"),
6039 Float(title
=_("Warning at"), unit
=_('ms'), default_value
=40.0),
6040 Float(title
=_("Critical at"), unit
=_('ms'), default_value
=50.0)
6042 ('clienttype_requests',
6044 title
=_("Maximum number of client type requests per second"),
6046 Integer(title
=_("Warning at"), unit
=_('requests'), default_value
=60),
6047 Integer(title
=_("Critical at"), unit
=_('requests'), default_value
=70)
6052 help=_("Specify the name of a store (This is either a mailbox or public folder)")),
6055 register_check_parameters(
6056 RulespecGroupCheckParametersApplications
,
6057 'msx_rpcclientaccess',
6058 _("MS Exchange RPC Client Access"),
6060 title
=_("Set Levels"),
6061 elements
=[('latency',
6063 title
=_("Average latency for RPC requests"),
6065 Float(title
=_("Warning at"), unit
=_('ms'), default_value
=200.0),
6066 Float(title
=_("Critical at"), unit
=_('ms'), default_value
=250.0)
6070 title
=_("Maximum number of RPC requests per second"),
6072 Integer(title
=_("Warning at"), unit
=_('requests'), default_value
=30),
6073 Integer(title
=_("Critical at"), unit
=_('requests'), default_value
=40)
6079 register_check_parameters(
6080 RulespecGroupCheckParametersApplications
,
6082 _("MS Exchange Database"),
6084 title
=_("Set Levels"),
6086 ('read_attached_latency',
6088 title
=_("I/O Database Reads (Attached) Average Latency"),
6090 Float(title
=_("Warning at"), unit
=_('ms'), default_value
=200.0),
6091 Float(title
=_("Critical at"), unit
=_('ms'), default_value
=250.0)
6093 ('read_recovery_latency',
6095 title
=_("I/O Database Reads (Recovery) Average Latency"),
6097 Float(title
=_("Warning at"), unit
=_('ms'), default_value
=150.0),
6098 Float(title
=_("Critical at"), unit
=_('ms'), default_value
=200.0)
6102 title
=_("I/O Database Writes (Attached) Average Latency"),
6104 Float(title
=_("Warning at"), unit
=_('ms'), default_value
=40.0),
6105 Float(title
=_("Critical at"), unit
=_('ms'), default_value
=50.0)
6109 title
=_("I/O Log Writes Average Latency"),
6111 Float(title
=_("Warning at"), unit
=_('ms'), default_value
=5.0),
6112 Float(title
=_("Critical at"), unit
=_('ms'), default_value
=10.0)
6117 title
=_("Database Name"),
6118 help=_("Specify database names that the rule should apply to"),
6123 def transform_msx_queues(params
):
6124 if isinstance(params
, tuple):
6125 return {"levels": (params
[0], params
[1])}
6129 register_check_parameters(
6130 RulespecGroupCheckParametersApplications
, "msx_queues", _("MS Exchange Message Queues"),
6133 title
=_("Set Levels"),
6137 title
=_("Maximum Number of E-Mails in Queue"),
6139 Integer(title
=_("Warning at"), unit
=_("E-Mails")),
6140 Integer(title
=_("Critical at"), unit
=_("E-Mails"))
6146 _("Use this only if you want to overwrite the postion of the information in the agent "
6147 "output. Also refer to the rule <i>Microsoft Exchange Queues Discovery</i> "
6150 optional_keys
=["offset"],
6152 forth
=transform_msx_queues
,
6155 title
=_("Explicit Queue Names"),
6156 help=_("Specify queue names that the rule should apply to"),
6159 register_check_parameters(
6160 RulespecGroupCheckParametersApplications
, "msexch_copyqueue", _("MS Exchange DAG CopyQueue"),
6162 title
=_("Upper Levels for CopyQueue Length"),
6163 help=_("This rule sets upper levels to the number of transaction logs waiting to be copied "
6164 "and inspected on your Exchange Mailbox Servers in a Database Availability Group "
6165 "(DAG). This is also known as the CopyQueue length."),
6166 elements
=[Integer(title
=_("Warning at")),
6167 Integer(title
=_("Critical at"))],
6169 title
=_("Database Name"),
6170 help=_("The database name on the Mailbox Server."),
6173 register_check_parameters(RulespecGroupCheckParametersStorage
, "mongodb_collections",
6174 _("MongoDB Collection Size"),
6175 Dictionary(elements
=fs_levels_elements
+ size_trend_elements
),
6176 TextAscii(title
=_("Collection name"),), "dict")
6178 register_check_parameters(
6179 RulespecGroupCheckParametersStorage
, "volume_groups", _("Volume Groups (LVM)"),
6184 title
=_("Levels for volume group"),
6185 show_alternative_title
=True,
6186 default_value
=(80.0, 90.0),
6187 match
=match_dual_level_type
,
6189 get_free_used_dynamic_valuespec("used", "volume group"),
6191 get_free_used_dynamic_valuespec(
6192 "free", "volume group", default_value
=(20.0, 10.0)),
6193 title
=_("Levels for volume group free space"),
6195 forth
=transform_filesystem_free
,
6196 back
=transform_filesystem_free
)
6199 optional_keys
=False), TextAscii(title
=_("Volume Group"), allow_empty
=False), "dict")
6201 register_check_parameters(
6202 RulespecGroupCheckParametersStorage
, "ibm_svc_mdiskgrp", _("IBM SVC Pool Capacity"),
6204 elements
=filesystem_elements
+ [
6205 ("provisioning_levels",
6207 title
=_("Provisioning Levels"),
6208 help=_("A provisioning of over 100% means over provisioning."),
6211 title
=_("Warning at a provisioning of"),
6212 default_value
=110.0,
6215 title
=_("Critical at a provisioning of"),
6216 default_value
=120.0,
6220 hidden_keys
=["flex_levels"],
6221 ), TextAscii(title
=_("Name of the pool"), allow_empty
=False), "dict")
6223 register_check_parameters(
6224 RulespecGroupCheckParametersOperatingSystem
,
6226 _("Storage Processor Utilization"),
6228 title
=_("Specify levels in percentage of storage processor usage"),
6230 Percentage(title
=_("Warning at"), default_value
=50.0),
6231 Percentage(title
=_("Critical at"), default_value
=60.0),
6237 register_check_parameters(
6238 RulespecGroupCheckParametersStorage
, "esx_vsphere_datastores",
6239 _("ESX Datastores (used space and growth)"),
6241 elements
=filesystem_elements
+ [
6242 ("provisioning_levels",
6244 title
=_("Provisioning Levels"),
6246 _("A provisioning of more than 100% is called "
6247 "over provisioning and can be a useful strategy for saving disk space. But you cannot guarantee "
6248 "any longer that every VM can really use all space that it was assigned. Here you can "
6249 "set levels for the maximum provisioning. A warning level of 150% will warn at 50% over provisioning."
6253 title
=_("Warning at a provisioning of"),
6255 default_value
=120.0),
6257 title
=_("Critical at a provisioning of"),
6259 default_value
=150.0),
6262 hidden_keys
=["flex_levels"],
6263 ), TextAscii(title
=_("Datastore Name"), help=_("The name of the Datastore"), allow_empty
=False),
6266 register_check_parameters(
6267 RulespecGroupCheckParametersStorage
, "esx_hostystem_maintenance",
6268 _("ESX Hostsystem Maintenance Mode"),
6273 title
=_("Target State"),
6274 help=_("Configure the target mode for the system."),
6276 ('true', "System should be in Maintenance Mode"),
6277 ('false', "System not should be in Maintenance Mode"),
6281 register_check_parameters(
6282 RulespecGroupCheckParametersNetworking
, "bonding", _("Status of Linux bonding interfaces"),
6283 Dictionary(elements
=[
6286 title
=_("Warn on unexpected active interface"),
6288 ("ignore", _("ignore which one is active")),
6289 ("primary", _("require primary interface to be active")),
6290 ("lowest", _("require interface that sorts lowest alphabetically")),
6292 default_value
="ignore",
6294 ("ieee_302_3ad_agg_id_missmatch_state",
6296 title
=_("State for missmatching Aggregator IDs for LACP"),
6299 ]), TextAscii(title
=_("Name of the bonding interface"),), "dict")
6302 def vs_interface_traffic():
6304 return CascadingDropdown(
6305 orientation
="horizontal",
6306 choices
=[("perc", _("Percentual levels (in relation to port speed)"),
6308 orientation
="float",
6311 Percentage(label
=_("Warning at")),
6312 Percentage(label
=_("Critical at")),
6314 ("abs", _("Absolute levels in bits or bytes per second"),
6316 orientation
="float",
6319 Integer(label
=_("Warning at")),
6320 Integer(label
=_("Critical at")),
6321 ])), ("predictive", _("Predictive Levels"), PredictiveLevels())])
6323 return CascadingDropdown(
6324 orientation
="horizontal",
6326 ("upper", _("Upper"), vs_abs_perc()),
6327 ("lower", _("Lower"), vs_abs_perc()),
6331 def transform_if(v
):
6334 if 'traffic' in v
and not isinstance(v
['traffic'], list):
6335 warn
, crit
= v
['traffic']
6336 if isinstance(warn
, int):
6337 new_traffic
.append(('both', ('upper', ('abs', (warn
, crit
)))))
6338 elif isinstance(warn
, float):
6339 new_traffic
.append(('both', ('upper', ('perc', (warn
, crit
)))))
6341 if 'traffic_minimum' in v
:
6342 warn
, crit
= v
['traffic_minimum']
6343 if isinstance(warn
, int):
6344 new_traffic
.append(('both', ('lower', ('abs', (warn
, crit
)))))
6345 elif isinstance(warn
, float):
6346 new_traffic
.append(('both', ('lower', ('perc', (warn
, crit
)))))
6347 del v
['traffic_minimum']
6350 v
['traffic'] = new_traffic
6355 register_check_parameters(
6356 RulespecGroupCheckParametersNetworking
,
6358 _("Network interfaces and switch ports"),
6359 # Transform old traffic related levels which used "traffic" and "traffic_minimum"
6360 # keys where each was configured with an Alternative valuespec
6363 ignored_keys
=["aggregate"], # Created by discovery when using interface grouping
6367 title
=_("Levels for error rates"),
6369 _("These levels make the check go warning or critical whenever the "
6370 "<b>percentual error rate</b> or the <b>absolute error rate</b> of the monitored interface reaches "
6371 "the given bounds. The percentual error rate is computed by dividing number of "
6372 "errors by the total number of packets (successful plus errors)."),
6375 title
=_("Percentual levels for error rates"),
6378 title
=_("Warning at"),
6379 unit
=_("percent errors"),
6381 display_format
='%.3f'),
6383 title
=_("Critical at"),
6384 unit
=_("percent errors"),
6386 display_format
='%.3f')
6389 title
=_("Absolute levels for error rates"),
6391 Integer(title
=_("Warning at"), unit
=_("errors")),
6392 Integer(title
=_("Critical at"), unit
=_("errors"))
6396 OptionalDropdownChoice(
6397 title
=_("Operating speed"),
6398 help=_("If you use this parameter then the check goes warning if the "
6399 "interface is not operating at the expected speed (e.g. it "
6400 "is working with 100Mbit/s instead of 1Gbit/s.<b>Note:</b> "
6401 "some interfaces do not provide speed information. In such cases "
6402 "this setting is used as the assumed speed when it comes to "
6403 "traffic monitoring (see below)."),
6405 (None, _("ignore speed")),
6406 (10000000, "10 Mbit/s"),
6407 (100000000, "100 Mbit/s"),
6408 (1000000000, "1 Gbit/s"),
6409 (10000000000, "10 Gbit/s"),
6411 otherlabel
=_("specify manually ->"),
6413 title
=_("Other speed in bits per second"), label
=_("Bits per second")))),
6417 title
=_("Allowed states:"), choices
=defines
.interface_oper_states()),
6418 title
=_("Operational state"),
6420 _("If you activate the monitoring of the operational state (<tt>ifOperStatus</tt>) "
6421 "the check will get warning or critical if the current state "
6422 "of the interface does not match one of the expected states. Note: the status 9 (<i>admin down</i>) "
6423 "is only visible if you activate this status during switch port inventory or if you manually "
6424 "use the check plugin <tt>if64adm</tt> instead of <tt>if64</tt>."),
6425 label
=_("Ignore the operational state"),
6426 none_label
=_("ignore"),
6431 orientation
="horizontal",
6433 DropdownChoice(choices
=defines
.interface_oper_states()),
6436 title
=_('Map operational states'),
6438 ("assumed_speed_in",
6439 OptionalDropdownChoice(
6440 title
=_("Assumed input speed"),
6442 "If the automatic detection of the link speed does not work "
6443 "or the switch's capabilities are throttled because of the network setup "
6444 "you can set the assumed speed here."),
6446 (None, _("ignore speed")),
6447 (10000000, "10 Mbit/s"),
6448 (100000000, "100 Mbit/s"),
6449 (1000000000, "1 Gbit/s"),
6450 (10000000000, "10 Gbit/s"),
6452 otherlabel
=_("specify manually ->"),
6453 default_value
=16000000,
6455 title
=_("Other speed in bits per second"),
6456 label
=_("Bits per second"),
6458 ("assumed_speed_out",
6459 OptionalDropdownChoice(
6460 title
=_("Assumed output speed"),
6462 "If the automatic detection of the link speed does not work "
6463 "or the switch's capabilities are throttled because of the network setup "
6464 "you can set the assumed speed here."),
6466 (None, _("ignore speed")),
6467 (10000000, "10 Mbit/s"),
6468 (100000000, "100 Mbit/s"),
6469 (1000000000, "1 Gbit/s"),
6470 (10000000000, "10 Gbit/s"),
6472 otherlabel
=_("specify manually ->"),
6473 default_value
=1500000,
6475 title
=_("Other speed in bits per second"),
6476 label
=_("Bits per second"),
6480 title
=_("Measurement unit"),
6481 help=_("Here you can specifiy the measurement unit of the network interface"),
6482 default_value
="byte",
6485 ("byte", _("Bytes")),
6490 title
=_("Change infotext in check output"),
6492 _("This setting allows you to modify the information text which is displayed between "
6493 "the two brackets in the check output. Please note that this setting does not work for "
6494 "grouped interfaces, since the additional information of grouped interfaces is different"
6497 ("alias", _("Show alias")),
6498 ("description", _("Show description")),
6499 ("alias_and_description", _("Show alias and description")),
6500 ("alias_or_description", _("Show alias if set, else description")),
6501 ("desription_or_alias", _("Show description if set, else alias")),
6502 ("hide", _("Hide infotext")),
6507 title
=_("Direction"),
6508 orientation
="horizontal",
6510 ('both', _("In / Out"), vs_interface_traffic()),
6511 ('in', _("In"), vs_interface_traffic()),
6512 ('out', _("Out"), vs_interface_traffic()),
6514 title
=_("Used bandwidth (minimum or maximum traffic)"),
6515 help=_("Setting levels on the used bandwidth is optional. If you do set "
6516 "levels you might also consider using averaging."),
6521 title
=_("Non-unicast packet rates"),
6523 "Setting levels on non-unicast packet rates is optional. This may help "
6524 "to detect broadcast storms and other unwanted traffic."),
6526 Integer(title
=_("Warning at"), unit
=_("pkts / sec")),
6527 Integer(title
=_("Critical at"), unit
=_("pkts / sec")),
6532 title
=_("Absolute levels for discards rates"),
6534 Integer(title
=_("Warning at"), unit
=_("discards")),
6535 Integer(title
=_("Critical at"), unit
=_("discards"))
6539 title
=_("Average values"),
6540 help=_("By activating the computation of averages, the levels on "
6541 "errors and traffic are applied to the averaged value. That "
6542 "way you can make the check react only on long-time changes, "
6543 "not on one-minute events."),
6551 TextAscii(title
=_("port specification"), allow_empty
=False),
6555 register_check_parameters(
6556 RulespecGroupCheckParametersNetworking
,
6558 _("Fibrechannel Interfaces"),
6559 Dictionary(elements
=[
6561 OptionalDropdownChoice(
6562 title
=_("Operating speed"),
6563 help=_("If you use this parameter then the check goes warning if the "
6564 "interface is not operating at the expected speed (e.g. it "
6565 "is working with 8Gbit/s instead of 16Gbit/s)."),
6567 (None, _("ignore speed")),
6568 (4000000000, "4 Gbit/s"),
6569 (8000000000, "8 Gbit/s"),
6570 (16000000000, "16 Gbit/s"),
6572 otherlabel
=_("specify manually ->"),
6574 title
=_("Other speed in bits per second"), label
=_("Bits per second")))),
6578 title
=_("Direction"),
6579 orientation
="horizontal",
6581 ('both', _("In / Out"), vs_interface_traffic()),
6582 ('in', _("In"), vs_interface_traffic()),
6583 ('out', _("Out"), vs_interface_traffic()),
6585 title
=_("Used bandwidth (minimum or maximum traffic)"),
6586 help=_("Setting levels on the used bandwidth is optional. If you do set "
6587 "levels you might also consider using averaging."),
6591 title
=_("Read latency"),
6594 default_levels
=(50.0, 100.0))),
6597 title
=_("Write latency"),
6600 default_levels
=(50.0, 100.0))),
6603 title
=_("Overall latency"),
6606 default_levels
=(50.0, 100.0))),
6608 TextAscii(title
=_("Port specification"), allow_empty
=False),
6612 register_check_parameters(
6613 RulespecGroupCheckParametersNetworking
,
6615 _("Signal quality of Wireless device"),
6617 Percentage(title
=_("Warning if under"), maxvalue
=100),
6618 Percentage(title
=_("Critical if under"), maxvalue
=100),
6620 TextAscii(title
=_("Network specification"), allow_empty
=True),
6624 register_check_parameters(
6625 RulespecGroupCheckParametersNetworking
,
6628 Dictionary(elements
=[
6631 title
=_("RTT type"),
6633 ('echo', _("echo")),
6634 ('path echo', _("path echo")),
6635 ('file IO', _("file IO")),
6636 ('UDP echo', _("UDP echo")),
6637 ('TCP connect', _("TCP connect")),
6638 ('HTTP', _("HTTP")),
6640 ('jitter', _("jitter")),
6641 ('DLSw', _("DLSw")),
6642 ('DHCP', _("DHCP")),
6644 ('VoIP', _("VoIP")),
6646 ('LSP group', _("LSP group")),
6647 ('ICMP jitter', _("ICMP jitter")),
6648 ('LSP ping', _("LSP ping")),
6649 ('LSP trace', _("LSP trace")),
6650 ('ethernet ping', _("ethernet ping")),
6651 ('ethernet jitter', _("ethernet jitter")),
6652 ('LSP ping pseudowire', _("LSP ping pseudowire")),
6654 default_value
="echo",
6658 title
=_("Treshold"),
6659 help=_("Depending on the precision the unit can be "
6660 "either milliseconds or micoseconds."),
6669 ('active', _("active")),
6670 ('inactive', _("inactive")),
6671 ('reset', _("reset")),
6672 ('orderly stop', _("orderly stop")),
6673 ('immediate stop', _("immediate stop")),
6674 ('pending', _("pending")),
6675 ('restart', _("restart")),
6677 default_value
="active",
6679 ("connection_lost_occured",
6681 title
=_("Connection lost occured"),
6690 title
=_("Timeout occured"),
6697 ("completion_time_over_treshold_occured",
6699 title
=_("Completion time over treshold occured"),
6706 ("latest_rtt_completion_time",
6708 title
=_("Latest RTT completion time"),
6709 help=_("Depending on the precision the unit can be "
6710 "either milliseconds or micoseconds."),
6713 title
=_("Warning at"),
6719 title
=_("Critical at"),
6725 ("latest_rtt_state",
6727 title
=_("Latest RTT state"),
6730 ('disconnected', _("disconnected")),
6731 ('over treshold', _("over treshold")),
6732 ('timeout', _("timeout")),
6733 ('other', _("other")),
6739 title
=_("RTT row index of the service"),
6745 register_check_parameters(
6746 RulespecGroupCheckParametersNetworking
,
6748 _("Cisco quality of service"),
6749 Dictionary(elements
=[
6752 title
=_("Measurement unit"),
6753 help=_("Here you can specifiy the measurement unit of the network interface"),
6754 default_value
="bit",
6757 ("byte", _("Bytes")),
6762 title
=_("Used bandwidth (traffic)"),
6763 help=_("Settings levels on the used bandwidth is optional. If you do set "
6764 "levels you might also consider using averaging."),
6767 title
=_("Percentual levels (in relation to policy speed)"),
6770 title
=_("Warning at"), maxvalue
=1000, label
=_("% of port speed")),
6772 title
=_("Critical at"), maxvalue
=1000, label
=_("% of port speed")),
6775 title
=_("Absolute levels in bits or bytes per second"),
6777 _("Depending on the measurement unit (defaults to bit) the absolute levels are set in bit or byte"
6781 title
=_("Warning at"), size
=10, label
=_("bits / bytes per second")),
6783 title
=_("Critical at"), size
=10, label
=_("bits / bytes per second")),
6788 title
=_("Average values"),
6789 help=_("By activating the computation of averages, the levels on "
6790 "errors and traffic are applied to the averaged value. That "
6791 "way you can make the check react only on long-time changes, "
6792 "not on one-minute events."),
6798 title
=_("Number of dropped bits or bytes per second"),
6800 "Depending on the measurement unit (defaults to bit) you can set the warn and crit "
6801 "levels for the number of dropped bits or bytes"),
6804 title
=_("Percentual levels (in relation to policy speed)"),
6807 title
=_("Warning at"), maxvalue
=1000, label
=_("% of port speed")),
6809 title
=_("Critical at"), maxvalue
=1000, label
=_("% of port speed")),
6812 Integer(title
=_("Warning at"), size
=8, label
=_("bits / bytes per second")),
6813 Integer(title
=_("Critical at"), size
=8, label
=_("bits / bytes per second")),
6817 TextAscii(title
=_("port specification"), allow_empty
=False),
6821 register_check_parameters(
6822 RulespecGroupCheckParametersOperatingSystem
, "innovaphone_mem", _("Innovaphone Memory Usage"),
6824 title
=_("Specify levels in percentage of total RAM"),
6826 Percentage(title
=_("Warning at a usage of"), unit
=_("% of RAM")),
6827 Percentage(title
=_("Critical at a usage of"), unit
=_("% of RAM")),
6830 register_check_parameters(
6831 RulespecGroupCheckParametersOperatingSystem
, "mem_pages", _("Memory Pages Statistics"),
6832 Dictionary(elements
=[(
6835 title
=_("Pages per second"),
6837 Integer(title
=_("Warning at"), unit
=_("pages/s")),
6838 Integer(title
=_("Critical at"), unit
=_("pages/s")),
6842 register_check_parameters(
6843 RulespecGroupCheckParametersOperatingSystem
,
6845 _("Statgrab Memory Usage"),
6846 Alternative(elements
=[
6848 title
=_("Specify levels in percentage of total RAM"),
6850 Percentage(title
=_("Warning at a usage of"), unit
=_("% of RAM"), maxvalue
=None),
6851 Percentage(title
=_("Critical at a usage of"), unit
=_("% of RAM"), maxvalue
=None)
6854 title
=_("Specify levels in absolute usage values"),
6856 Integer(title
=_("Warning at"), unit
=_("MB")),
6857 Integer(title
=_("Critical at"), unit
=_("MB"))
6865 register_check_parameters(
6866 RulespecGroupCheckParametersOperatingSystem
,
6868 _("Cisco Memory Usage"),
6870 Dictionary(elements
=[
6873 title
=_("Levels for memory usage"),
6876 title
=_("Specify levels in percentage of total RAM"),
6879 title
=_("Warning at a usage of"),
6883 title
=_("Critical at a usage of"),
6888 title
=_("Specify levels in absolute usage values"),
6890 Integer(title
=_("Warning at"), unit
=_("MB")),
6891 Integer(title
=_("Critical at"), unit
=_("MB"))
6894 ] + size_trend_elements
),
6895 forth
=lambda spec
: spec
if isinstance(spec
, dict) else {"levels": spec
},
6897 TextAscii(title
=_("Memory Pool Name"), allow_empty
=False),
6901 register_check_parameters(
6902 RulespecGroupCheckParametersOperatingSystem
, "juniper_mem", _("Juniper Memory Usage"),
6904 title
=_("Specify levels in percentage of total memory usage"),
6907 title
=_("Warning at a usage of"),
6912 title
=_("Critical at a usage of"),
6918 # TODO: Remove situations where a rule is used once with and once without items
6919 register_check_parameters(
6920 RulespecGroupCheckParametersOperatingSystem
,
6921 "juniper_mem_modules",
6922 _("Juniper Modules Memory Usage"),
6924 title
=_("Specify levels in percentage of total memory usage"),
6927 title
=_("Warning at a usage of"),
6932 title
=_("Critical at a usage of"),
6938 title
=_("Module Name"),
6939 help=_("The identificator of the module."),
6944 register_check_parameters(
6945 RulespecGroupCheckParametersOperatingSystem
,
6947 _("Juniper Processor Utilization of Routing Engine"),
6950 help=_("CPU utilization of routing engine."),
6956 title
=_("Specify levels in percentage of processor routing engine usage"),
6958 Percentage(title
=_("Warning at"), default_value
=80.0),
6959 Percentage(title
=_("Critical at"), default_value
=90.0),
6964 forth
=lambda old
: not old
and {'levels': (80.0, 90.0)} or old
,
6966 TextAscii(title
=_("Routing Engine"),),
6970 register_check_parameters(
6971 RulespecGroupCheckParametersOperatingSystem
, "netscaler_mem", _("Netscaler Memory Usage"),
6973 title
=_("Specify levels in percentage of total memory usage"),
6976 title
=_("Warning at a usage of"),
6981 title
=_("Critical at a usage of"),
6987 register_check_parameters(
6988 RulespecGroupCheckParametersOperatingSystem
, "netscaler_vserver", _("Netscaler VServer States"),
6989 Dictionary(elements
=[
6992 title
=_("Lower health levels"),
6994 Percentage(title
=_("Warning below"), default_value
=100.0),
6995 Percentage(title
=_("Critical below"), default_value
=0.1),
6997 ]), TextAscii(title
=_("Name of VServer")), "dict")
6999 register_check_parameters(
7000 RulespecGroupCheckParametersOperatingSystem
,
7001 "general_flash_usage",
7002 _("Flash Space Usage"),
7003 Alternative(elements
=[
7005 title
=_("Specify levels in percentage of total Flash"),
7007 Percentage(title
=_("Warning at a usage of"), label
=_("% of Flash"), maxvalue
=None),
7008 Percentage(title
=_("Critical at a usage of"), label
=_("% of Flash"), maxvalue
=None)
7011 title
=_("Specify levels in absolute usage values"),
7013 Integer(title
=_("Warning at"), unit
=_("MB")),
7014 Integer(title
=_("Critical at"), unit
=_("MB"))
7021 register_check_parameters(
7022 RulespecGroupCheckParametersOperatingSystem
,
7023 "cisco_supervisor_mem",
7024 _("Cisco Nexus Supervisor Memory Usage"),
7026 title
=_("The average utilization of memory on the active supervisor"),
7028 Percentage(title
=_("Warning at a usage of"), default_value
=80.0, maxvalue
=100.0),
7029 Percentage(title
=_("Critical at a usage of"), default_value
=90.0, maxvalue
=100.0)
7036 def UsedSize(**args
):
7037 GB
= 1024 * 1024 * 1024
7040 Filesize(title
=_("Warning at"), default_value
=1 * GB
),
7041 Filesize(title
=_("Critical at"), default_value
=2 * GB
),
7046 def FreeSize(**args
):
7047 GB
= 1024 * 1024 * 1024
7050 Filesize(title
=_("Warning below"), default_value
=2 * GB
),
7051 Filesize(title
=_("Critical below"), default_value
=1 * GB
),
7056 def UsedPercentage(default_percents
=None, of_what
=None):
7058 unit
= _("%% of %s") % of_what
7063 return Tuple(elements
=[
7065 title
=_("Warning at"),
7066 default_value
=default_percents
and default_percents
[0] or 80.0,
7071 title
=_("Critical at"),
7072 default_value
=default_percents
and default_percents
[1] or 90.0,
7078 def FreePercentage(default_percents
=None, of_what
=None):
7080 unit
= _("%% of %s") % of_what
7083 return Tuple(elements
=[
7085 title
=_("Warning below"),
7086 default_value
=default_percents
and default_percents
[0] or 20.0,
7089 title
=_("Critical below"),
7090 default_value
=default_percents
and default_percents
[1] or 10.0,
7095 def DualMemoryLevels(what
, default_percents
=None):
7096 return CascadingDropdown(
7097 title
=_("Levels for %s") % what
,
7099 ("perc_used", _("Percentual levels for used %s") % what
,
7100 UsedPercentage(default_percents
)),
7101 ("perc_free", _("Percentual levels for free %s") % what
, FreePercentage()),
7102 ("abs_used", _("Absolute levels for used %s") % what
, UsedSize()),
7103 ("abs_free", _("Absolute levels for free %s") % what
, FreeSize()),
7104 # PredictiveMemoryChoice(_("used %s") % what), # not yet implemented
7105 ("ignore", _("Do not impose levels")),
7109 def UpperMemoryLevels(what
, default_percents
=None, of_what
=None):
7110 return CascadingDropdown(
7111 title
=_("Upper levels for %s") % what
,
7113 ("perc_used", _("Percentual levels%s") % (of_what
and
7114 (_(" in relation to %s") % of_what
) or ""),
7115 UsedPercentage(default_percents
, of_what
)),
7116 ("abs_used", _("Absolute levels"), UsedSize()),
7117 # PredictiveMemoryChoice(what), # not yet implemented
7118 ("ignore", _("Do not impose levels")),
7122 def LowerMemoryLevels(what
, default_percents
=None, of_what
=None, help_text
=None):
7123 return CascadingDropdown(
7124 title
=_("Lower levels for %s") % what
,
7127 ("perc_free", _("Percentual levels"), FreePercentage(default_percents
, of_what
)),
7128 ("abs_free", _("Absolute levels"), FreeSize()),
7129 # PredictiveMemoryChoice(what), # not yet implemented
7130 ("ignore", _("Do not impose levels")),
7134 # Beware: This is not yet implemented in the check.
7135 # def PredictiveMemoryChoice(what):
7136 # return ( "predictive", _("Predictive levels for %s") % what,
7139 # default_difference = (0.5, 1.0)
7142 register_check_parameters(
7143 RulespecGroupCheckParametersOperatingSystem
,
7145 _("Memory and Swap usage on Linux"),
7148 ("levels_ram", DualMemoryLevels(_("RAM"))),
7149 ("levels_swap", DualMemoryLevels(_("Swap"))),
7150 ("levels_virtual", DualMemoryLevels(_("Total virtual memory"), (80.0, 90.0))),
7152 UpperMemoryLevels(_("Total Data in relation to RAM"), (120.0, 150.0), _("RAM"))),
7153 ("levels_shm", UpperMemoryLevels(_("Shared memory"), (20.0, 30.0), _("RAM"))),
7154 ("levels_pagetables", UpperMemoryLevels(_("Page tables"), (8.0, 16.0), _("RAM"))),
7155 ("levels_writeback", UpperMemoryLevels(_("Disk Writeback"))),
7156 ("levels_committed",
7157 UpperMemoryLevels(_("Committed memory"), (100.0, 150.0), _("RAM + Swap"))),
7158 ("levels_commitlimit",
7159 LowerMemoryLevels(_("Commit Limit"), (20.0, 10.0), _("RAM + Swap"))),
7160 ("levels_available",
7162 _("Estimated RAM for new processes"), (20.0, 10.0), _("RAM"),
7163 _("If the host has a kernel of version 3.14 or newer, the information MemAvailable is provided: "
7164 "\"An estimate of how much memory is available for starting new "
7165 "applications, without swapping. Calculated from MemFree, "
7166 "SReclaimable, the size of the file LRU lists, and the low "
7167 "watermarks in each zone. "
7168 "The estimate takes into account that the system needs some "
7169 "page cache to function well, and that not all reclaimable "
7170 "slab will be reclaimable, due to items being in use. The "
7171 "impact of those factors will vary from system to system.\" "
7172 "(https://www.kernel.org/doc/Documentation/filesystems/proc.txt)"))),
7173 ("levels_vmalloc", LowerMemoryLevels(_("Largest Free VMalloc Chunk"))),
7174 ("handle_hw_corrupted_error",
7176 title
=_("Handle Hardware Corrupted Error"),
7184 register_check_parameters(
7185 RulespecGroupCheckParametersOperatingSystem
,
7187 _("Main memory usage (UNIX / Other Devices)"),
7194 title
=_("Levels for memory"),
7195 show_alternative_title
=True,
7196 default_value
=(150.0, 200.0),
7197 match
=match_dual_level_type
,
7199 _("The used and free levels for the memory on UNIX systems take into account the "
7200 "currently used memory (RAM or SWAP) by all processes and sets this in relation "
7201 "to the total RAM of the system. This means that the memory usage can exceed 100%. "
7202 "A usage of 200% means that the total size of all processes is twice as large as "
7203 "the main memory, so <b>at least</b> half of it is currently swapped out. For systems "
7204 "without Swap space you should choose levels below 100%."),
7207 title
=_("Levels for used memory"),
7211 title
=_("Specify levels in percentage of total RAM"),
7214 title
=_("Warning at a usage of"), maxvalue
=None),
7216 title
=_("Critical at a usage of"), maxvalue
=None)
7219 title
=_("Specify levels in absolute values"),
7221 Integer(title
=_("Warning at"), unit
=_("MB")),
7222 Integer(title
=_("Critical at"), unit
=_("MB"))
7230 title
=_("Specify levels in percentage of total RAM"),
7233 title
=_("Warning if less than"), maxvalue
=None),
7235 title
=_("Critical if less than"), maxvalue
=None)
7238 title
=_("Specify levels in absolute values"),
7240 Integer(title
=_("Warning if below"), unit
=_("MB")),
7241 Integer(title
=_("Critical if below"), unit
=_("MB"))
7244 title
=_("Levels for free memory"),
7246 _("Keep in mind that if you have 1GB RAM and 1GB SWAP you need to "
7247 "specify 120% or 1200MB to get an alert if there is only 20% free RAM available. "
7248 "The free memory levels do not work with the fortigate check, because it does "
7249 "not provide total memory data."),
7251 forth
=lambda val
: tuple(-x
for x
in val
),
7252 back
=lambda val
: tuple(-x
for x
in val
))
7257 title
=_("Averaging"),
7258 help=_("If this parameter is set, all measured values will be averaged "
7259 "over the specified time interval before levels are being applied. Per "
7260 "default, averaging is turned off."),
7266 optional_keys
=["average"],
7268 forth
=lambda t
: isinstance(t
, tuple) and {"levels": t
} or t
,
7274 register_check_parameters(
7275 RulespecGroupCheckParametersOperatingSystem
, "memory_relative",
7276 _("Main memory usage for Brocade fibre channel switches"),
7277 OptionalDropdownChoice(
7278 title
=_("Memory usage"),
7279 choices
=[(None, _("Do not impose levels"))],
7280 otherlabel
=_("Percentual levels ->"),
7281 explicit
=Tuple(elements
=[
7282 Integer(title
=_("Warning at"), default_value
=85, unit
="%"),
7283 Integer(title
=_("Critical at"), default_value
=90, unit
="%"),
7286 register_check_parameters(
7287 RulespecGroupCheckParametersOperatingSystem
,
7289 _("Main memory usage of simple devices"),
7292 help=_("Memory levels for simple devices not running more complex OSs"),
7296 title
=_("Levels for memory usage"),
7298 ("perc_used", _("Percentual levels for used memory"),
7301 title
=_("Warning at a memory usage of"),
7305 title
=_("Critical at a memory usage of"),
7309 ("abs_free", _("Absolute levels for free memory"),
7311 Filesize(title
=_("Warning below")),
7312 Filesize(title
=_("Critical below"))
7314 ("ignore", _("Do not impose levels")),
7319 # Convert default levels from discovered checks
7320 forth
=lambda v
: not isinstance(v
, dict) and {"levels": ("perc_used", v
)} or v
,
7323 title
=_("Module name or empty"),
7324 help=_("Leave this empty for systems without modules, which just "
7325 "have one global memory usage."),
7331 register_check_parameters(
7332 RulespecGroupCheckParametersOperatingSystem
,
7334 _("Main memory usage of devices with modules"),
7337 "The memory levels for one specific module of this host. This is relevant for hosts that have "
7338 "several distinct memory areas, e.g. pluggable cards"),
7342 title
=_("Memory levels"),
7345 title
=_("Specify levels in percentage of total RAM"),
7348 title
=_("Warning at a memory usage of"),
7352 title
=_("Critical at a memory usage of"),
7357 title
=_("Specify levels in absolute usage values"),
7359 Filesize(title
=_("Warning at")),
7360 Filesize(title
=_("Critical at"))
7365 TextAscii(title
=_("Module name"), allow_empty
=False),
7369 register_check_parameters(
7370 RulespecGroupCheckParametersOperatingSystem
,
7372 _("Memory and Swap usage on Arbor devices"),
7375 ("levels_ram", DualMemoryLevels(_("RAM"))),
7376 ("levels_swap", DualMemoryLevels(_("Swap"))),
7382 register_check_parameters(
7383 RulespecGroupCheckParametersNetworking
, "mem_cluster", _("Memory Usage of Clusters"),
7386 Integer(title
=_("Equal or more than"), unit
=_("nodes")),
7388 title
=_("Percentage of total RAM"),
7390 Percentage(title
=_("Warning at a RAM usage of"), default_value
=80.0),
7391 Percentage(title
=_("Critical at a RAM usage of"), default_value
=90.0),
7394 help=_("Here you can specify the total memory usage levels for clustered hosts."),
7395 title
=_("Memory Usage"),
7396 add_label
=_("Add limits")), None, "first", False)
7398 register_check_parameters(
7399 RulespecGroupCheckParametersNetworking
, "cpu_utilization_cluster",
7400 _("CPU Utilization of Clusters"),
7403 Integer(title
=_("Equal or more than"), unit
=_("nodes")),
7406 Percentage(title
=_("Warning at a utilization of"), default_value
=90.0),
7407 Percentage(title
=_("Critical at a utilization of"), default_value
=95.0)
7409 title
=_("Alert on too high CPU utilization"),
7413 "Configure levels for averaged CPU utilization depending on number of cluster nodes. "
7414 "The CPU utilization sums up the percentages of CPU time that is used "
7415 "for user processes and kernel routines over all available cores within "
7416 "the last check interval. The possible range is from 0% to 100%"),
7417 title
=_("Memory Usage"),
7418 add_label
=_("Add limits")), None, "first", False)
7420 register_check_parameters(
7421 RulespecGroupCheckParametersOperatingSystem
,
7423 _("Main memory usage of ESX host system"),
7425 title
=_("Specify levels in percentage of total RAM"),
7427 Percentage(title
=_("Warning at a RAM usage of"), default_value
=80.0),
7428 Percentage(title
=_("Critical at a RAM usage of"), default_value
=90.0),
7434 register_check_parameters(
7435 RulespecGroupCheckParametersOperatingSystem
,
7437 _("Virtual machine (for example ESX) guest tools status"),
7439 optional_keys
=False,
7441 ("guestToolsCurrent",
7443 title
=_("VMware Tools is installed, and the version is current"),
7446 ("guestToolsNeedUpgrade",
7448 title
=_("VMware Tools is installed, but the version is not current"),
7451 ("guestToolsNotInstalled",
7453 title
=_("VMware Tools have never been installed"),
7456 ("guestToolsUnmanaged",
7458 title
=_("VMware Tools is installed, but it is not managed by VMWare"),
7465 register_check_parameters(
7466 RulespecGroupCheckParametersOperatingSystem
,
7468 _("Virtual machine (for example ESX) heartbeat status"),
7470 optional_keys
=False,
7472 ("heartbeat_missing",
7474 title
=_("No heartbeat"),
7475 help=_("Guest operating system may have stopped responding."),
7478 ("heartbeat_intermittend",
7480 title
=_("Intermittent heartbeat"),
7481 help=_("May be due to high guest load."),
7484 ("heartbeat_no_tools",
7486 title
=_("Heartbeat tools missing or not installed"),
7487 help=_("No VMWare Tools installed."),
7492 title
=_("Heartbeat OK"),
7493 help=_("Guest operating system is responding normally."),
7501 register_check_parameters(
7502 RulespecGroupCheckParametersApplications
, "services_summary", _("Windows Service Summary"),
7504 title
=_('Autostart Services'),
7508 title
=_("Ignored autostart services"),
7509 help=_('Regular expressions matching the begining of the internal name '
7510 'or the description of the service. '
7511 'If no name is given then this rule will match all services. The '
7512 'match is done on the <i>beginning</i> of the service name. It '
7513 'is done <i>case sensitive</i>. You can do a case insensitive match '
7514 'by prefixing the regular expression with <tt>(?i)</tt>. Example: '
7515 '<tt>(?i).*mssql</tt> matches all services which contain <tt>MSSQL</tt> '
7516 'or <tt>MsSQL</tt> or <tt>mssql</tt> or...'),
7517 orientation
="horizontal",
7519 ('state_if_stopped',
7521 title
=_("Default state if stopped autostart services are found"),
7527 register_check_parameters(
7528 RulespecGroupCheckParametersApplications
, "solaris_services_summary",
7529 _("Solaris Services Summary"),
7532 ('maintenance_state',
7534 title
=_("State if 'maintenance' services are found"),
7539 register_check_parameters(
7540 RulespecGroupCheckParametersApplications
,
7541 "esx_vsphere_objects",
7542 _("State of ESX hosts and virtual machines"),
7544 help=_("Usually the check goes to WARN if a VM or host is powered off and OK otherwise. "
7545 "You can change this behaviour on a per-state-basis here."),
7546 optional_keys
=False,
7550 title
=_("Target states"),
7551 optional_keys
=False,
7555 title
=_("Powered ON"),
7556 help=_("Check result if the host or VM is powered on"),
7561 title
=_("Powered OFF"),
7562 help=_("Check result if the host or VM is powered off"),
7567 title
=_("Suspended"),
7568 help=_("Check result if the host or VM is suspended"),
7575 "Check result if the host or VM state is reported as <i>unknown</i>"),
7581 title
=_("Name of the VM/HostSystem"),
7583 "Please do not forget to specify either <tt>VM</tt> or <tt>HostSystem</tt>. Example: <tt>VM abcsrv123</tt>. Also note, "
7584 "that we match the <i>beginning</i> of the name."),
7585 regex
="(^VM|HostSystem)( .*|$)",
7586 regex_error
=_("The name of the system must begin with <tt>VM</tt> or <tt>HostSystem</tt>."),
7592 register_check_parameters(
7593 RulespecGroupCheckParametersApplications
,
7594 "esx_vsphere_objects_count",
7595 _("Distribution of virtual machines over ESX hosts"),
7597 optional_keys
=False,
7602 optional_keys
=False,
7603 elements
=[("vm_names", ListOfStrings(title
=_("VMs"))),
7604 ("hosts_count", Integer(title
=_("Number of hosts"),
7607 MonitoringState(title
=_("State if violated"), default_value
=1))]),
7608 title
=_("VM distribution"),
7610 "You can specify lists of VM names and a number of hosts,"
7611 " to make sure the specfied VMs are distributed across at least so many hosts."
7612 " E.g. provide two VM names and set 'Number of hosts' to two,"
7613 " to make sure those VMs are not running on the same host."))),
7620 def windows_printer_queues_forth(old
):
7622 "warn_states": [8, 11],
7623 "crit_states": [9, 10],
7625 if isinstance(old
, tuple):
7626 default
['levels'] = old
7627 if isinstance(old
, dict):
7632 register_check_parameters(
7633 RulespecGroupCheckParametersPrinters
,
7634 "windows_printer_queues",
7635 _("Number of open jobs of a printer on windows"),
7638 title
=_("Windows Printer Configuration"),
7643 title
=_("Levels for the number of print jobs"),
7644 help=_("This rule is applied to the number of print jobs "
7645 "currently waiting in windows printer queue."),
7647 Integer(title
=_("Warning at"), unit
=_("jobs"), default_value
=40),
7648 Integer(title
=_("Critical at"), unit
=_("jobs"), default_value
=60),
7653 title
=_("States who should lead to critical"),
7665 (10, "Service Requested"),
7666 (11, "Output Bin Full"),
7668 default_value
=[9, 10],
7672 title
=_("States who should lead to warning"),
7684 (10, "Service Requested"),
7685 (11, "Output Bin Full"),
7687 default_value
=[8, 11],
7690 forth
=windows_printer_queues_forth
,
7692 TextAscii(title
=_("Printer Name"), allow_empty
=True),
7696 register_check_parameters(
7697 RulespecGroupCheckParametersPrinters
,
7699 _("Printer Input Units"),
7704 title
=_('Capacity remaining'),
7706 Percentage(title
=_("Warning at"), default_value
=0.0),
7707 Percentage(title
=_("Critical at"), default_value
=0.0),
7711 default_keys
=['capacity_levels'],
7713 TextAscii(title
=_('Unit Name'), allow_empty
=True),
7717 register_check_parameters(
7718 RulespecGroupCheckParametersPrinters
,
7720 _("Printer Output Units"),
7725 title
=_('Capacity filled'),
7727 Percentage(title
=_("Warning at"), default_value
=0.0),
7728 Percentage(title
=_("Critical at"), default_value
=0.0),
7732 default_keys
=['capacity_levels'],
7734 TextAscii(title
=_('Unit Name'), allow_empty
=True),
7738 register_check_parameters(
7739 RulespecGroupCheckParametersOperatingSystem
,
7741 _("CPU load (not utilization!)"),
7743 help=_("The CPU load of a system is the number of processes currently being "
7744 "in the state <u>running</u>, i.e. either they occupy a CPU or wait "
7745 "for one. The <u>load average</u> is the averaged CPU load over the last 1, "
7746 "5 or 15 minutes. The following levels will be applied on the average "
7747 "load. On Linux system the 15-minute average load is used when applying "
7748 "those levels. The configured levels are multiplied with the number of "
7749 "CPUs, so you should configure the levels based on the value you want to "
7750 "be warned \"per CPU\"."),
7752 default_difference
=(2.0, 4.0),
7753 default_levels
=(5.0, 10.0),
7759 register_check_parameters(
7760 RulespecGroupCheckParametersOperatingSystem
,
7762 _("CPU utilization for Appliances"),
7765 Percentage(title
=_("Warning at a utilization of")),
7766 Percentage(title
=_("Critical at a utilization of"))
7768 label
=_("Alert on too high CPU utilization"),
7769 help=_("The CPU utilization sums up the percentages of CPU time that is used "
7770 "for user processes and kernel routines over all available cores within "
7771 "the last check interval. The possible range is from 0% to 100%"),
7772 default_value
=(90.0, 95.0)),
7777 register_check_parameters(
7778 RulespecGroupCheckParametersOperatingSystem
,
7779 "cpu_utilization_multiitem",
7780 _("CPU utilization of Devices with Modules"),
7782 help=_("The CPU utilization sums up the percentages of CPU time that is used "
7783 "for user processes and kernel routines over all available cores within "
7784 "the last check interval. The possible range is from 0% to 100%"),
7789 title
=_("Alert on too high CPU utilization"),
7791 Percentage(title
=_("Warning at a utilization of"), default_value
=90.0),
7792 Percentage(title
=_("Critical at a utilization of"), default_value
=95.0)
7797 TextAscii(title
=_("Module name"), allow_empty
=False),
7801 register_check_parameters(
7802 RulespecGroupCheckParametersOperatingSystem
,
7804 _("FPGA utilization"),
7806 help=_("Give FPGA utilization levels in percent. The possible range is from 0% to 100%."),
7811 title
=_("Alert on too high FPGA utilization"),
7813 Percentage(title
=_("Warning at a utilization of"), default_value
=80.0),
7814 Percentage(title
=_("Critical at a utilization of"), default_value
=90.0)
7819 TextAscii(title
=_("FPGA"), allow_empty
=False),
7823 cpu_util_common_elements
= [
7826 title
=_("Levels on single cores"),
7828 Percentage(title
=_("Warning at"), default_value
=90.0),
7829 Percentage(title
=_("Critical at"), default_value
=95.0)
7831 help=_("Here you can set levels on the CPU utilization on single cores"),
7833 ("core_util_time_total",
7835 title
=_("Levels over an extended time period on total CPU utilization"),
7837 Percentage(title
=_("High utilization at "), default_value
=100.0),
7838 Age(title
=_("Warning after "), default_value
=5 * 60),
7839 Age(title
=_("Critical after "), default_value
=15 * 60),
7842 "With this configuration, check_mk will alert if the total CPU is "
7843 "exceeding a utilization threshold over an extended period of time. "
7844 "ATTENTION: This configuration cannot be used for check <i>lparstat_aix.cpu_util</i>!")
7848 title
=_("Levels over an extended time period on a single core CPU utilization"),
7850 Percentage(title
=_("High utilization at "), default_value
=100.0),
7851 Age(title
=_("Warning after "), default_value
=5 * 60),
7852 Age(title
=_("Critical after "), default_value
=15 * 60),
7854 help=_("A single thread fully utilizing a single core (potentially due to a bug) "
7855 "may go unnoticed when only monitoring the total utilization of the CPU. "
7856 "With this configuration, check_mk will alert if a single core is "
7857 "exceeding a utilization threshold over an extended period of time."
7858 "This is currently only supported on linux and windows agents "
7859 "as well as devices monitored through the host-resource mib"))),
7862 title
=_("Graphs for individual cores"),
7863 label
=_("Enable performance graph for utilization of individual cores"),
7864 help=_("This adds another graph to the performance CPU utilization "
7865 "details page, showing utilization of individual cores. "
7866 "Please note that this graph may be impractical on "
7867 "device with very many cores. "
7868 "This is currently only supported on linux and windows agents "
7869 "as well as devices monitored through the host-resource mib"))),
7872 register_check_parameters(
7873 RulespecGroupCheckParametersOperatingSystem
,
7874 "cpu_utilization_os",
7875 _("CPU utilization for simple devices"),
7877 help=_("This rule configures levels for the CPU utilization (not load) for "
7878 "the operating systems Windows and VMWare ESX host systems, as well as devices "
7879 "implementing the Host Resources MIB. The utilization "
7880 "ranges from 0 to 100 - regardless of the number of CPUs."),
7884 title
=_("Averaging"),
7885 help=_("When this option is activated then the CPU utilization is being "
7886 "averaged <b>before</b> the levels are being applied."),
7890 label
=_("Compute average over last "),
7894 title
=_("Levels on total CPU utilization"),
7896 default_levels
=(85, 90),
7897 default_difference
=(5, 8),
7900 ] + cpu_util_common_elements
,
7907 def transform_cpu_iowait(params
):
7908 if isinstance(params
, tuple):
7909 return {"iowait": params
}
7914 register_check_parameters(
7915 RulespecGroupCheckParametersOperatingSystem
,
7917 _("CPU utilization on Linux/UNIX"),
7919 Dictionary(elements
=[
7922 title
=_("Levels on total CPU utilization"),
7924 default_levels
=(90, 95),
7925 default_difference
=(5, 8),
7928 _("The CPU utilization sums up the percentages of CPU time that is used "
7929 "for user processes, kernel routines (system), disk wait (sometimes also "
7930 "called IO wait) or nothing (idle). The levels are always applied "
7931 "on the average utiliazation since the last check - which is usually one minute."
7936 title
=_("Levels on disk wait (IO wait)"),
7938 Percentage(title
=_("Warning at a disk wait of"), default_value
=30.0),
7939 Percentage(title
=_("Critical at a disk wait of"), default_value
=50.0)
7942 _("The disk wait is the total percentage of time all CPUs have nothing else to do but waiting "
7943 "for data coming from or going to disk. If you have a significant disk wait "
7944 "the the bottleneck of your server is IO. Please note that depending on the "
7945 "applications being run this might or might not be totally normal."))),
7948 title
=_("Levels on steal CPU utilization"),
7950 Percentage(title
=_("Warning at a steal time of"), default_value
=30.0),
7951 Percentage(title
=_("Critical at a steal time of"), default_value
=50.0)
7953 help=_("Here you can set levels on the steal CPU utilization."),
7955 ] + cpu_util_common_elements
),
7956 forth
=transform_cpu_iowait
,
7963 def transform_humidity(p
):
7964 if isinstance(p
, (list, tuple)):
7966 "levels_lower": (float(p
[1]), float(p
[0])),
7967 "levels": (float(p
[2]), float(p
[3])),
7972 register_check_parameters(
7973 RulespecGroupCheckParametersEnvironment
,
7975 _("Humidity Levels"),
7978 help=_("This Ruleset sets the threshold limits for humidity sensors"),
7982 title
=_("Upper levels"),
7984 Percentage(title
=_("Warning at")),
7985 Percentage(title
=_("Critical at")),
7989 title
=_("Lower levels"),
7991 Percentage(title
=_("Warning below")),
7992 Percentage(title
=_("Critical below")),
7995 forth
=transform_humidity
,
7998 title
=_("Sensor name"),
7999 help=_("The identifier of the sensor."),
8004 register_check_parameters(
8005 RulespecGroupCheckParametersEnvironment
,
8007 _("Humidity Levels for devices with a single sensor"),
8009 help=_("This Ruleset sets the threshold limits for humidity sensors"),
8011 Integer(title
=_("Critical at or below"), unit
="%"),
8012 Integer(title
=_("Warning at or below"), unit
="%"),
8013 Integer(title
=_("Warning at or above"), unit
="%"),
8014 Integer(title
=_("Critical at or above"), unit
="%"),
8020 db_levels_common
= [
8023 title
=_("Levels for the Tablespace usage"),
8024 default_value
=(10.0, 5.0),
8027 title
=_("Percentage free space"),
8029 Percentage(title
=_("Warning if below"), unit
=_("% free")),
8030 Percentage(title
=_("Critical if below"), unit
=_("% free")),
8033 title
=_("Absolute free space"),
8035 Integer(title
=_("Warning if below"), unit
=_("MB"), default_value
=1000),
8036 Integer(title
=_("Critical if below"), unit
=_("MB"), default_value
=500),
8040 orientation
="horizontal",
8042 Filesize(title
=_("Tablespace larger than")),
8044 title
=_("Levels for the Tablespace size"),
8047 title
=_("Percentage free space"),
8049 Percentage(title
=_("Warning if below"), unit
=_("% free")),
8050 Percentage(title
=_("Critical if below"), unit
=_("% free")),
8053 title
=_("Absolute free space"),
8055 Integer(title
=_("Warning if below"), unit
=_("MB")),
8056 Integer(title
=_("Critical if below"), unit
=_("MB")),
8061 title
=_('Dynamic levels'),
8066 title
=_("Magic factor (automatic level adaptation for large tablespaces)"),
8067 help=_("This is only be used in case of percentual levels"),
8070 default_value
=0.9)),
8073 title
=_("Reference size for magic factor"), minvalue
=1, default_value
=1000, unit
=_("MB"))),
8076 title
=_("Maximum levels if using magic factor"),
8077 help=_("The tablespace levels will never be raise above these values, when using "
8078 "the magic factor and the tablespace is very small."),
8081 title
=_("Maximum warning level"),
8084 default_value
=60.0),
8086 title
=_("Maximum critical level"),
8093 register_check_parameters(
8094 RulespecGroupCheckParametersApplications
,
8095 "oracle_tablespaces",
8096 _("Oracle Tablespaces"),
8098 help=_("A tablespace is a container for segments (tables, indexes, etc). A "
8099 "database consists of one or more tablespaces, each made up of one or "
8100 "more data files. Tables and indexes are created within a particular "
8102 "This rule allows you to define checks on the size of tablespaces."),
8103 elements
=db_levels_common
+ [
8106 title
=_("Expected autoextend setting"),
8108 (True, _("Autoextend is expected to be ON")),
8109 (False, _("Autoextend is expected to be OFF")),
8110 (None, _("Autoextend will be ignored")),
8112 ("autoextend_severity",
8114 title
=_("Severity of invalid autoextend setting"),
8117 ("defaultincrement",
8119 title
=_("Default Increment"),
8121 (True, _("State is WARNING in case the next extent has the default size.")),
8122 (False, _("Ignore default increment")),
8124 ("map_file_online_states",
8127 orientation
="horizontal",
8129 DropdownChoice(choices
=[
8130 ("RECOVER", _("Recover")),
8131 ("OFFLINE", _("Offline")),
8135 title
=_('Map file online states'),
8140 title
=_("Explicit tablespaces"),
8142 _("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>"
8149 register_check_parameters(
8150 RulespecGroupCheckParametersApplications
,
8152 _("Oracle Processes"),
8155 "Here you can override the default levels for the ORACLE Processes check. The levels "
8156 "are applied on the number of used processes in percentage of the configured limit."),
8160 title
=_("Levels for used processes"),
8162 Percentage(title
=_("Warning if more than"), default_value
=70.0),
8163 Percentage(title
=_("Critical if more than"), default_value
=90.0)
8166 optional_keys
=False,
8168 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
8172 register_check_parameters(
8173 RulespecGroupCheckParametersApplications
,
8174 "oracle_recovery_area",
8175 _("Oracle Recovery Area"),
8176 Dictionary(elements
=[("levels",
8178 title
=_("Levels for used space (reclaimable is considered as free)"),
8180 Percentage(title
=_("warning at"), default_value
=70.0),
8181 Percentage(title
=_("critical at"), default_value
=90.0),
8183 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
8187 register_check_parameters(
8188 RulespecGroupCheckParametersApplications
,
8189 "oracle_dataguard_stats",
8190 _("Oracle Data-Guard Stats"),
8193 _("The Data-Guard statistics are available in Oracle Enterprise Edition with enabled Data-Guard. "
8194 "The <tt>init.ora</tt> parameter <tt>dg_broker_start</tt> must be <tt>TRUE</tt> for this check. "
8195 "The apply and transport lag can be configured with this rule."),
8199 title
=_("Apply Lag Maximum Time"),
8200 help=_("The maximum limit for the apply lag in <tt>v$dataguard_stats</tt>."),
8201 elements
=[Age(title
=_("Warning at"),),
8202 Age(title
=_("Critical at"),)])),
8205 title
=_("Apply Lag Minimum Time"),
8207 "The minimum limit for the apply lag in <tt>v$dataguard_stats</tt>. "
8208 "This is only useful if also <i>Apply Lag Maximum Time</i> has been configured."
8210 elements
=[Age(title
=_("Warning at"),),
8211 Age(title
=_("Critical at"),)])),
8214 title
=_("Transport Lag"),
8215 help=_("The limit for the transport lag in <tt>v$dataguard_stats</tt>"),
8216 elements
=[Age(title
=_("Warning at"),),
8217 Age(title
=_("Critical at"),)])),
8219 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
8223 register_check_parameters(
8224 RulespecGroupCheckParametersApplications
,
8226 _("Oracle Undo Retention"),
8227 Dictionary(elements
=[
8230 title
=_("Levels for remaining undo retention"),
8232 Age(title
=_("warning if less then"), default_value
=600),
8233 Age(title
=_("critical if less then"), default_value
=300),
8236 'nospaceerrcnt_state',
8239 title
=_("State in case of non space error count is greater then 0: "),
8243 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
8247 register_check_parameters(
8248 RulespecGroupCheckParametersApplications
,
8250 _("Oracle RMAN Backups"),
8251 Dictionary(elements
=[("levels",
8253 title
=_("Maximum Age for RMAN backups"),
8255 Age(title
=_("warning if older than"), default_value
=1800),
8256 Age(title
=_("critical if older than"), default_value
=3600),
8258 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
8262 register_check_parameters(
8263 RulespecGroupCheckParametersApplications
,
8264 "oracle_recovery_status",
8265 _("Oracle Recovery Status"),
8266 Dictionary(elements
=[("levels",
8268 title
=_("Levels for checkpoint time"),
8270 Age(title
=_("warning if higher then"), default_value
=1800),
8271 Age(title
=_("critical if higher then"), default_value
=3600),
8275 title
=_("Levels for user managed backup files"),
8276 help=_("Important! This checks is only for monitoring of datafiles "
8277 "who were left in backup mode. "
8278 "(alter database datafile ... begin backup;) "),
8280 Age(title
=_("warning if higher then"), default_value
=1800),
8281 Age(title
=_("critical if higher then"), default_value
=3600),
8283 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
8287 register_check_parameters(
8288 RulespecGroupCheckParametersApplications
,
8290 _("Oracle Scheduler Job"),
8292 help=_("A scheduler job is an object in an ORACLE database which could be "
8293 "compared to a cron job on Unix. "),
8297 title
=_("Maximum run duration for last execution"),
8298 help=_("Here you can define an upper limit for the run duration of "
8299 "last execution of the job."),
8301 Age(title
=_("warning at")),
8302 Age(title
=_("critical at")),
8306 title
=_("Job State"),
8307 help=_("The state of the job is ignored per default."),
8310 (True, _("Ignore the state of the Job")),
8311 (False, _("Consider the state of the job")),
8314 ("status_disabled_jobs",
8315 MonitoringState(title
="Status of service in case of disabled job", default_value
=0)),
8316 ("status_missing_jobs",
8318 title
=_("Status of service in case of missing job."),
8323 title
=_("Scheduler Job Name"),
8324 help=_("Here you can set explicit Scheduler-Jobs by defining them via SID, Job-Owner "
8325 "and Job-Name, separated by a dot, for example <tt>TUX12C.SYS.PURGE_LOG</tt>"),
8331 register_check_parameters(
8332 RulespecGroupCheckParametersApplications
,
8334 _("Oracle Instance"),
8336 title
=_("Consider state of Archivelogmode: "),
8341 title
=_("State in case of Archivelogmode is enabled: "),
8347 title
=_("State in case of Archivelogmode is disabled: "),
8354 title
=_("State in case of Force Logging is enabled: "),
8361 title
=_("State in case of Force Logging is disabled: "),
8368 title
=_("State in case of logins are not possible: "),
8375 title
=_("State in case of Database is PRIMARY and not OPEN: "),
8380 title
=_("Minimum required uptime"),
8382 Age(title
=_("Warning if below")),
8383 Age(title
=_("Critical if below")),
8385 ('ignore_noarchivelog',
8387 title
=_("Ignore state of no-archive log"),
8389 help=_("If active, only a single summary item is displayed. The summary "
8390 "will explicitly mention sensors in warn/crit state but the "
8391 "sensors that are ok are aggregated."),
8392 default_value
=False)),
8395 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
8399 register_check_parameters(
8400 RulespecGroupCheckParametersApplications
, "asm_diskgroup",
8401 _("ASM Disk Group (used space and growth)"),
8403 elements
=filesystem_elements
+ [
8406 title
=_("Handling for required mirror space"),
8409 (False, _("Do not regard required mirror space as free space")),
8410 (True, _("Regard required mirror space as free space")),
8413 "ASM calculates the free space depending on free_mb or required mirror "
8414 "free space. Enable this option to set the check against required "
8415 "mirror free space. This only works for normal or high redundancy Disk Groups."
8418 hidden_keys
=["flex_levels"],
8421 title
=_("ASM Disk Group"),
8422 help=_("Specify the name of the ASM Disk Group "),
8423 allow_empty
=False), "dict")
8426 def _vs_mssql_backup_age(title
):
8428 title
=_("%s" % title
),
8432 title
=_("Set levels"),
8434 Age(title
=_("Warning if older than")),
8435 Age(title
=_("Critical if older than")),
8438 title
=_("No levels"),
8440 FixedValue(None, totext
=""),
8441 FixedValue(None, totext
=""),
8445 register_check_parameters(
8446 RulespecGroupCheckParametersApplications
,
8448 _("MSSQL Backup summary"),
8451 help = _("This rule allows you to set limits on the age of backups for "
8452 "different backup types. If your agent does not support "
8453 "backup types (e.g. <i>Log Backup</i>, <i>Database Diff "
8454 "Backup</i>, etc.) you can use the option <i>Database Backup"
8455 "</i> to set a general limit"),
8457 ("database", _vs_mssql_backup_age("Database backup")),
8458 ("database_diff", _vs_mssql_backup_age("Database diff backup")),
8459 ("log", _vs_mssql_backup_age("Log backup")),
8460 ("file_or_filegroup", _vs_mssql_backup_age("File or filegroup backup")),
8461 ("file_diff", _vs_mssql_backup_age("File diff backup")),
8462 ("partial", _vs_mssql_backup_age("Partial backup")),
8463 ("partial_diff", _vs_mssql_backup_age("Partial diff backup")),
8464 ("unspecific", _vs_mssql_backup_age("Unspecific backup")),
8465 ("not_found", MonitoringState(title
=_("State if no backup found"))),
8468 forth
= lambda params
: (params
if isinstance(params
, dict)
8469 else {'database': (params
[0], params
[1])})
8472 title
= _("Service descriptions"),
8473 allow_empty
= False),
8477 register_check_parameters(
8478 RulespecGroupCheckParametersApplications
,
8479 "mssql_backup_per_type",
8481 Dictionary(elements
=[
8482 ("levels", _vs_mssql_backup_age("Upper levels for the backup age")),
8484 TextAscii(title
=_("Backup name"), allow_empty
=False),
8488 register_check_parameters(
8489 RulespecGroupCheckParametersApplications
, "mssql_file_sizes",
8490 _("MSSQL Log and Data File Sizes"),
8492 title
=_("File Size Levels"),
8496 title
=_("Levels for Datafiles"),
8498 Filesize(title
=_("Warning at")),
8499 Filesize(title
=_("Critical at")),
8503 title
=_("Log files: Absolute upper thresholds"),
8504 elements
=[Filesize(title
=_("Warning at")),
8505 Filesize(title
=_("Critical at"))])),
8508 title
=_("Levels for log files used"),
8511 title
=_("Upper absolute levels"),
8513 Filesize(title
=_("Warning at")),
8514 Filesize(title
=_("Critical at"))
8517 title
=_("Upper percentage levels"),
8519 Percentage(title
=_("Warning at")),
8520 Percentage(title
=_("Critical at"))
8523 ]), TextAscii(title
=_("Service descriptions"), allow_empty
=False), "dict")
8525 register_check_parameters(
8526 RulespecGroupCheckParametersApplications
,
8527 "mssql_tablespaces",
8528 _("MSSQL Size of Tablespace"),
8533 title
=_("Upper levels for size"),
8534 elements
=[Filesize(title
=_("Warning at")),
8535 Filesize(title
=_("Critical at"))])),
8538 title
=_("Upper levels for reserved space"),
8541 title
=_("Absolute levels"),
8543 Filesize(title
=_("Warning at")),
8544 Filesize(title
=_("Critical at"))
8547 title
=_("Percentage levels"),
8549 Percentage(title
=_("Warning at")),
8550 Percentage(title
=_("Critical at"))
8555 title
=_("Upper levels for data"),
8558 title
=_("Absolute levels"),
8560 Filesize(title
=_("Warning at")),
8561 Filesize(title
=_("Critical at"))
8564 title
=_("Percentage levels"),
8566 Percentage(title
=_("Warning at")),
8567 Percentage(title
=_("Critical at"))
8572 title
=_("Upper levels for indexes"),
8575 title
=_("Absolute levels"),
8577 Filesize(title
=_("Warning at")),
8578 Filesize(title
=_("Critical at"))
8581 title
=_("Percentage levels"),
8583 Percentage(title
=_("Warning at")),
8584 Percentage(title
=_("Critical at"))
8589 title
=_("Upper levels for unused space"),
8592 title
=_("Absolute levels"),
8594 Filesize(title
=_("Warning at")),
8595 Filesize(title
=_("Critical at"))
8598 title
=_("Percentage levels"),
8600 Percentage(title
=_("Warning at")),
8601 Percentage(title
=_("Critical at"))
8606 title
=_("Lower levels for unallocated space"),
8609 title
=_("Absolute levels"),
8611 Filesize(title
=_("Warning below")),
8612 Filesize(title
=_("Critical below"))
8615 title
=_("Percentage levels"),
8617 Percentage(title
=_("Warning below")),
8618 Percentage(title
=_("Critical below"))
8622 TextAscii(title
=_("Tablespace name"), allow_empty
=False),
8626 register_check_parameters(
8627 RulespecGroupCheckParametersApplications
,
8628 "mssql_page_activity",
8629 _("MSSQL Page Activity"),
8631 title
=_("Page Activity Levels"),
8635 title
=_("Reads/sec"),
8637 Float(title
=_("warning at"), unit
=_("/sec")),
8638 Float(title
=_("critical at"), unit
=_("/sec")),
8642 title
=_("Writes/sec"),
8644 Float(title
=_("warning at"), unit
=_("/sec")),
8645 Float(title
=_("critical at"), unit
=_("/sec")),
8647 ("page_lookups/sec",
8649 title
=_("Lookups/sec"),
8651 Float(title
=_("warning at"), unit
=_("/sec")),
8652 Float(title
=_("critical at"), unit
=_("/sec")),
8655 TextAscii(title
=_("Service descriptions"), allow_empty
=False),
8659 def levels_absolute_or_dynamic(name
, value
):
8661 title
=_("Levels of %s %s") % (name
, value
),
8662 default_value
=(80.0, 90.0),
8665 title
=_("Percentage %s space") % value
,
8667 Percentage(title
=_("Warning at"), unit
=_("% used")),
8668 Percentage(title
=_("Critical at"), unit
=_("% used")),
8671 title
=_("Absolute %s space") % value
,
8673 Integer(title
=_("Warning at"), unit
=_("MB"), default_value
=500),
8674 Integer(title
=_("Critical at"), unit
=_("MB"), default_value
=1000),
8678 orientation
="horizontal",
8680 Filesize(title
=_(" larger than")),
8682 title
=_("Levels for the %s %s size") % (name
, value
),
8685 title
=_("Percentage %s space") % value
,
8687 Percentage(title
=_("Warning at"), unit
=_("% used")),
8688 Percentage(title
=_("Critical at"), unit
=_("% used")),
8691 title
=_("Absolute free space"),
8693 Integer(title
=_("Warning at"), unit
=_("MB")),
8694 Integer(title
=_("Critical at"), unit
=_("MB")),
8699 title
=_('Dynamic levels'),
8704 register_check_parameters(
8705 RulespecGroupCheckParametersApplications
, "mssql_transactionlogs",
8706 _("MSSQL Transactionlog Sizes"),
8708 title
=_("File Size Levels"),
8709 help=_("Specify levels for transactionlogs of a database. Please note that relative "
8710 "levels will only work if there is a max_size set for the file on the database "
8713 ("used_levels", levels_absolute_or_dynamic(_("Transactionlog"), _("used"))),
8714 ("allocated_used_levels",
8715 levels_absolute_or_dynamic(_("Transactionlog"), _("used of allocation"))),
8716 ("allocated_levels", levels_absolute_or_dynamic(_("Transactionlog"), _("allocated"))),
8717 ]), TextAscii(title
=_("Database Name"), allow_empty
=False), "dict")
8719 register_check_parameters(
8720 RulespecGroupCheckParametersApplications
, "mssql_datafiles", _("MSSQL Datafile Sizes"),
8722 title
=_("File Size Levels"),
8723 help=_("Specify levels for datafiles of a database. Please note that relative "
8724 "levels will only work if there is a max_size set for the file on the database "
8727 ("used_levels", levels_absolute_or_dynamic(_("Datafile"), _("used"))),
8728 ("allocated_used_levels",
8729 levels_absolute_or_dynamic(_("Datafile"), _("used of allocation"))),
8730 ("allocated_levels", levels_absolute_or_dynamic(_("Datafile"), _("allocated"))),
8731 ]), TextAscii(title
=_("Database Name"), allow_empty
=False), "dict")
8733 register_check_parameters(
8734 RulespecGroupCheckParametersApplications
,
8736 _("Virtual Machine Snapshots"),
8737 Dictionary(elements
=[
8740 title
=_("Age of the last snapshot"),
8742 Age(title
=_("Warning if older than")),
8743 Age(title
=_("Critical if older than"))
8747 title
=_("Age of the oldest snapshot"),
8749 Age(title
=_("Warning if older than")),
8750 Age(title
=_("Critical if older than"))
8757 register_check_parameters(
8758 RulespecGroupCheckParametersApplications
,
8760 _("Veeam: Time since last Backup"),
8761 Dictionary(elements
=[("age",
8763 title
=_("Time since end of last backup"),
8765 Age(title
=_("Warning if older than"), default_value
=108000),
8766 Age(title
=_("Critical if older than"), default_value
=172800)
8768 TextAscii(title
=_("Job name")),
8772 register_check_parameters(
8773 RulespecGroupCheckParametersApplications
,
8774 "backup_timemachine",
8775 _("Age of timemachine backup"),
8776 Dictionary(elements
=[("age",
8778 title
=_("Maximum age of latest timemachine backup"),
8780 Age(title
=_("Warning if older than"), default_value
=86400),
8781 Age(title
=_("Critical if older than"), default_value
=172800)
8787 register_check_parameters(
8788 RulespecGroupCheckParametersApplications
,
8790 _("Age of jobs controlled by mk-job"),
8791 Dictionary(elements
=[
8794 title
=_("Maximum time since last start of job execution"),
8796 Age(title
=_("Warning at"), default_value
=0),
8797 Age(title
=_("Critical at"), default_value
=0)
8799 ("outcome_on_cluster",
8801 title
=_("Clusters: Prefered check result of local checks"),
8802 help=_("If you're running local checks on clusters via clustered services rule "
8803 "you can influence the check result with this rule. You can choose between "
8804 "best or worst state. Default setting is worst state."),
8806 ("worst", _("Worst state")),
8807 ("best", _("Best state")),
8809 default_value
="worst")),
8811 TextAscii(title
=_("Job name"),),
8815 register_check_parameters(
8816 RulespecGroupCheckParametersApplications
,
8817 "mssql_counters_locks",
8820 help=_("This check monitors locking related information of MSSQL tablespaces."),
8823 "lock_requests/sec",
8825 title
=_("Lock Requests / sec"),
8827 _("Number of new locks and lock conversions per second requested from the lock manager."
8830 Float(title
=_("Warning at"), unit
=_("requests/sec")),
8831 Float(title
=_("Critical at"), unit
=_("requests/sec")),
8836 "lock_timeouts/sec",
8838 title
=_("Lock Timeouts / sec"),
8840 _("Number of lock requests per second that timed out, including requests for NOWAIT locks."
8843 Float(title
=_("Warning at"), unit
=_("timeouts/sec")),
8844 Float(title
=_("Critical at"), unit
=_("timeouts/sec")),
8849 "number_of_deadlocks/sec",
8851 title
=_("Number of Deadlocks / sec"),
8852 help=_("Number of lock requests per second that resulted in a deadlock."),
8854 Float(title
=_("Warning at"), unit
=_("deadlocks/sec")),
8855 Float(title
=_("Critical at"), unit
=_("deadlocks/sec")),
8862 title
=_("Lock Waits / sec"),
8863 help=_("Number of lock requests per second that required the caller to wait."),
8865 Float(title
=_("Warning at"), unit
=_("waits/sec")),
8866 Float(title
=_("Critical at"), unit
=_("waits/sec")),
8871 TextAscii(title
=_("Service descriptions"), allow_empty
=False),
8878 "ASYNC_DISKPOOL_LOCK",
8879 "ASYNC_IO_COMPLETION",
8881 "AUDIT_GROUPCACHE_LOCK",
8882 "AUDIT_LOGINCACHE_LOCK",
8883 "AUDIT_ON_DEMAND_TARGET_LOCK",
8884 "AUDIT_XE_SESSION_MGR",
8891 "BROKER_CONNECTION_RECEIVE_TASK",
8892 "BROKER_ENDPOINT_STATE_MUTEX",
8893 "BROKER_EVENTHANDLER",
8895 "BROKER_MASTERSTART",
8896 "BROKER_RECEIVE_WAITFOR",
8897 "BROKER_REGISTERALLENDPOINTS",
8902 "BROKER_TRANSMITTER",
8903 "BUILTIN_HASHKEY_MUTEX",
8904 "CHECK_PRINT_RECORD",
8914 "CLR_RWLOCK_READER",
8915 "CLR_RWLOCK_WRITER",
8918 "CLRHOST_STATE_ACCESS",
8924 "DBMIRROR_DBM_EVENT",
8925 "DBMIRROR_DBM_MUTEX",
8926 "DBMIRROR_EVENTS_QUEUE",
8928 "DBMIRROR_WORKER_QUEUE",
8930 "DEADLOCK_ENUM_MUTEX",
8931 "DEADLOCK_TASK_SEARCH",
8933 "DISABLE_VERSIONING",
8935 "DISPATCHER_QUEUE_SEMAPHORE",
8936 "DLL_LOADING_MUTEX",
8939 "DTC_ABORT_REQUEST",
8942 "DTC_TMDOWN_REQUEST",
8943 "DTC_WAITFOR_OUTCOME",
8944 "DUMP_LOG_COORDINATOR",
8948 "EE_SPECPROC_MAP_INIT",
8949 "ENABLE_VERSIONING",
8950 "ERROR_REPORTING_MANAGER",
8953 "EXECUTION_PIPE_EVENT_INTERNAL",
8956 "FCB_REPLICA_WRITE",
8958 "FS_GARBAGE_COLLECTOR_SHUTDOWN",
8960 "FS_LOGTRUNC_RWLOCK",
8961 "FSA_FORCE_OWN_XACT",
8963 "FSTR_CONFIG_MUTEX",
8964 "FSTR_CONFIG_RWLOCK",
8965 "FT_COMPROWSET_RWLOCK",
8967 "FT_IFTS_SCHEDULER_IDLE_WAIT",
8971 "FT_METADATA_MUTEX",
8976 "HADR_AR_CRITICAL_SECTION_ENTRY",
8977 "HADR_AR_MANAGER_MUTEX",
8978 "HADR_ARCONTROLLER_NOTIFICATIONS_SUBSCRIBER_LIST",
8979 "HADR_BACKUP_BULK_LOCK",
8980 "HADR_BACKUP_QUEUE",
8981 "HADR_CLUSAPI_CALL",
8982 "HADR_COMPRESSED_CACHE_SYNC",
8983 "HADR_DATABASE_FLOW_CONTROL",
8984 "HADR_DATABASE_VERSIONING_STATE",
8985 "HADR_DATABASE_WAIT_FOR_RESTART",
8986 "HADR_DATABASE_WAIT_FOR_TRANSITION_TO_VERSIONING",
8988 "HADR_DB_OP_COMPLETION_SYNC",
8989 "HADR_DB_OP_START_SYNC",
8990 "HADR_DBR_SUBSCRIBER",
8991 "HADR_DBR_SUBSCRIBER_FILTER_LIST",
8992 "HADR_DBSTATECHANGE_SYNC",
8993 "HADR_FILESTREAM_BLOCK_FLUSH",
8994 "HADR_FILESTREAM_FILE_CLOSE",
8995 "HADR_FILESTREAM_FILE_REQUEST",
8996 "HADR_FILESTREAM_IOMGR",
8997 "HADR_FILESTREAM_IOMGR_IOCOMPLETION",
8998 "HADR_FILESTREAM_MANAGER",
8999 "HADR_GROUP_COMMIT",
9000 "HADR_LOGCAPTURE_SYNC",
9001 "HADR_LOGCAPTURE_WAIT",
9002 "HADR_LOGPROGRESS_SYNC",
9003 "HADR_NOTIFICATION_DEQUEUE",
9004 "HADR_NOTIFICATION_WORKER_EXCLUSIVE_ACCESS",
9005 "HADR_NOTIFICATION_WORKER_STARTUP_SYNC",
9006 "HADR_NOTIFICATION_WORKER_TERMINATION_SYNC",
9007 "HADR_PARTNER_SYNC",
9008 "HADR_READ_ALL_NETWORKS",
9009 "HADR_RECOVERY_WAIT_FOR_CONNECTION",
9010 "HADR_RECOVERY_WAIT_FOR_UNDO",
9011 "HADR_REPLICAINFO_SYNC",
9013 "HADR_SYNCHRONIZING_THROTTLE",
9014 "HADR_TDS_LISTENER_SYNC",
9015 "HADR_TDS_LISTENER_SYNC_PROCESSING",
9017 "HADR_TRANSPORT_DBRLIST",
9018 "HADR_TRANSPORT_FLOW_CONTROL",
9019 "HADR_TRANSPORT_SESSION",
9022 "HADR_XRF_STACK_ACCESS",
9030 "IOAFF_RANGE_QUEUE",
9033 "KTM_RECOVERY_MANAGER",
9034 "KTM_RECOVERY_RESOLUTION",
9043 "LCK_M_BU_ABORT_BLOCKERS",
9044 "LCK_M_BU_LOW_PRIORITY",
9046 "LCK_M_IS_ABORT_BLOCKERS",
9047 "LCK_M_IS_LOW_PRIORITY",
9049 "LCK_M_IU_ABORT_BLOCKERS",
9050 "LCK_M_IU_LOW_PRIORITY",
9052 "LCK_M_IX_ABORT_BLOCKERS",
9053 "LCK_M_IX_LOW_PRIORITY",
9055 "LCK_M_RIn_NL_ABORT_BLOCKERS",
9056 "LCK_M_RIn_NL_LOW_PRIORITY",
9058 "LCK_M_RIn_S_ABORT_BLOCKERS",
9059 "LCK_M_RIn_S_LOW_PRIORITY",
9061 "LCK_M_RIn_U_ABORT_BLOCKERS",
9062 "LCK_M_RIn_U_LOW_PRIORITY",
9064 "LCK_M_RIn_X_ABORT_BLOCKERS",
9065 "LCK_M_RIn_X_LOW_PRIORITY",
9067 "LCK_M_RS_S_ABORT_BLOCKERS",
9068 "LCK_M_RS_S_LOW_PRIORITY",
9070 "LCK_M_RS_U_ABORT_BLOCKERS",
9071 "LCK_M_RS_U_LOW_PRIORITY",
9073 "LCK_M_RX_S_ABORT_BLOCKERS",
9074 "LCK_M_RX_S_LOW_PRIORITY",
9076 "LCK_M_RX_U_ABORT_BLOCKERS",
9077 "LCK_M_RX_U_LOW_PRIORITY",
9079 "LCK_M_RX_X_ABORT_BLOCKERS",
9080 "LCK_M_RX_X_LOW_PRIORITY",
9082 "LCK_M_S_ABORT_BLOCKERS",
9083 "LCK_M_S_LOW_PRIORITY",
9085 "LCK_M_SCH_M_ABORT_BLOCKERS",
9086 "LCK_M_SCH_M_LOW_PRIORITY",
9088 "LCK_M_SCH_S_ABORT_BLOCKERS",
9089 "LCK_M_SCH_S_LOW_PRIORITY",
9091 "LCK_M_SIU_ABORT_BLOCKERS",
9092 "LCK_M_SIU_LOW_PRIORITY",
9094 "LCK_M_SIX_ABORT_BLOCKERS",
9095 "LCK_M_SIX_LOW_PRIORITY",
9097 "LCK_M_U_ABORT_BLOCKERS",
9098 "LCK_M_U_LOW_PRIORITY",
9100 "LCK_M_UIX_ABORT_BLOCKERS",
9101 "LCK_M_UIX_LOW_PRIORITY",
9103 "LCK_M_X_ABORT_BLOCKERS",
9104 "LCK_M_X_LOW_PRIORITY",
9110 "LOGMGR_RESERVE_APPEND",
9111 "LOWFAIL_MEMMGR_QUEUE",
9112 "MEMORY_ALLOCATION_EXT",
9115 "MSQL_XACT_MGR_MUTEX",
9119 "NET_WAITFOR_PACKET",
9121 "ONDEMAND_TASK_QUEUE",
9134 "PARALLEL_BACKUP_QUEUE",
9136 "PREEMPTIVE_AUDIT_ACCESS_EVENTLOG",
9137 "PREEMPTIVE_AUDIT_ACCESS_SECLOG",
9138 "PREEMPTIVE_CLOSEBACKUPMEDIA",
9139 "PREEMPTIVE_CLOSEBACKUPTAPE",
9140 "PREEMPTIVE_CLOSEBACKUPVDIDEVICE",
9141 "PREEMPTIVE_CLUSAPI_CLUSTERRESOURCECONTROL",
9142 "PREEMPTIVE_COM_COCREATEINSTANCE",
9143 "PREEMPTIVE_HADR_LEASE_MECHANISM",
9144 "PREEMPTIVE_SOSTESTING",
9145 "PREEMPTIVE_STRESSDRIVER",
9146 "PREEMPTIVE_TESTING",
9147 "PREEMPTIVE_XETESTING",
9148 "PRINT_ROLLBACK_PROGRESS",
9149 "PWAIT_HADR_CHANGE_NOTIFIER_TERMINATION_SYNC",
9150 "PWAIT_HADR_CLUSTER_INTEGRATION",
9151 "PWAIT_HADR_OFFLINE_COMPLETED",
9152 "PWAIT_HADR_ONLINE_COMPLETED",
9153 "PWAIT_HADR_POST_ONLINE_COMPLETED",
9154 "PWAIT_HADR_WORKITEM_COMPLETED",
9155 "PWAIT_MD_LOGIN_STATS",
9156 "PWAIT_MD_RELATION_CACHE",
9157 "PWAIT_MD_SERVER_CACHE",
9158 "PWAIT_MD_UPGRADE_CONFIG",
9159 "PWAIT_METADATA_LAZYCACHE_RWLOCk",
9161 "QPJOB_WAITFOR_ABORT",
9162 "QRY_MEM_GRANT_INFO_MUTEX",
9163 "QUERY_ERRHDL_SERVICE_DONE",
9164 "QUERY_EXECUTION_INDEX_SORT_EVENT_OPEN",
9165 "QUERY_NOTIFICATION_MGR_MUTEX",
9166 "QUERY_NOTIFICATION_SUBSCRIPTION_MUTEX",
9167 "QUERY_NOTIFICATION_TABLE_MGR_MUTEX",
9168 "QUERY_NOTIFICATION_UNITTEST_MUTEX",
9169 "QUERY_OPTIMIZER_PRINT_MUTEX",
9171 "QUERY_WAIT_ERRHDL_SERVICE",
9173 "REPL_CACHE_ACCESS",
9174 "REPL_SCHEMA_ACCESS",
9176 "REQUEST_DISPENSER_PAUSE",
9177 "REQUEST_FOR_DEADLOCK_SEARCH",
9180 "RESOURCE_SEMAPHORE",
9181 "RESOURCE_SEMAPHORE_MUTEX",
9182 "RESOURCE_SEMAPHORE_QUERY_COMPILE",
9183 "RESOURCE_SEMAPHORE_SMALL_QUERY",
9184 "SEC_DROP_TEMP_KEY",
9187 "SERVER_IDLE_CHECK",
9189 "SLEEP_BPOOL_FLUSH",
9191 "SLEEP_DCOMSTARTUP",
9192 "SLEEP_MSDBSTARTUP",
9195 "SLEEP_TEMPDBSTARTUP",
9196 "SNI_CRITICAL_SECTION",
9197 "SNI_HTTP_WAITFOR_",
9198 "SNI_LISTENER_ACCESS",
9199 "SNI_TASK_COMPLETION",
9202 "SOS_CALLBACK_REMOVAL",
9203 "SOS_DISPATCHER_MUTEX",
9204 "SOS_LOCALALLOCATORLIST",
9205 "SOS_MEMORY_USAGE_ADJUSTMENT",
9206 "SOS_OBJECT_STORE_DESTROY_MUTEX",
9207 "SOS_PHYS_PAGE_CACHE",
9208 "SOS_PROCESS_AFFINITY_MUTEX",
9209 "SOS_RESERVEDMEMBLOCKLIST",
9210 "SOS_SCHEDULER_YIELD",
9211 "SOS_SMALL_PAGE_ALLOC",
9212 "SOS_STACKSTORE_INIT_MUTEX",
9213 "SOS_SYNC_TASK_ENQUEUE_EVENT",
9214 "SOS_VIRTUALMEMORY_LOW",
9219 "SOSHOST_SEMAPHORE",
9221 "SOSHOST_TRACELOCK",
9222 "SOSHOST_WAITFORDONE",
9225 "SQLCLR_DEADLOCK_DETECTION",
9226 "SQLCLR_QUANTUM_PUNISHMENT",
9227 "SQLSORT_NORMMUTEX",
9228 "SQLSORT_SORTMUTEX",
9229 "SQLTRACE_BUFFER_FLUSH",
9230 "SQLTRACE_FILE_BUFFER",
9231 "SQLTRACE_SHUTDOWN",
9232 "SQLTRACE_WAIT_ENTRIES",
9236 "TIMEPRIV_TIMEPERIOD",
9238 "TRAN_MARKLATCH_DT",
9239 "TRAN_MARKLATCH_EX",
9240 "TRAN_MARKLATCH_KP",
9241 "TRAN_MARKLATCH_NL",
9242 "TRAN_MARKLATCH_SH",
9243 "TRAN_MARKLATCH_UP",
9244 "TRANSACTION_MUTEX",
9247 "VIEW_DEFINITION_MUTEX",
9249 "WAIT_XTP_CKPT_CLOSE",
9250 "WAIT_XTP_CKPT_ENABLED",
9251 "WAIT_XTP_CKPT_STATE_LOCK",
9253 "WAIT_XTP_HOST_WAIT",
9254 "WAIT_XTP_OFFLINE_CKPT_LOG_IO",
9255 "WAIT_XTP_OFFLINE_CKPT_NEW_LOG",
9256 "WAIT_XTP_PROCEDURE_ENTRY",
9257 "WAIT_XTP_RECOVERY",
9258 "WAIT_XTP_TASK_SHUTDOWN",
9259 "WAIT_XTP_TRAN_COMMIT",
9260 "WAIT_XTP_TRAN_DEPENDENCY",
9262 "WAITFOR_TASKSHUTDOWN",
9268 "XACT_OWN_TRANSACTION",
9269 "XACT_RECLAIM_SESSION",
9271 "XACTWORKSPACE_MUTEX",
9272 "XE_BUFFERMGR_ALLPROCESSED_EVENT",
9273 "XE_BUFFERMGR_FREEBUF_EVENT",
9274 "XE_DISPATCHER_CONFIG_SESSION_LIST",
9275 "XE_DISPATCHER_JOIN",
9276 "XE_DISPATCHER_WAIT",
9277 "XE_MODULEMGR_SYNC",
9279 "XE_PACKAGE_LOCK_BACKOFF",
9280 "XTPPROC_CACHE_ACCESS",
9281 "XTPPROC_PARTITIONED_STACK_CREATE",
9284 register_check_parameters(
9285 RulespecGroupCheckParametersApplications
,
9286 "mssql_blocked_sessions",
9287 _("MSSQL Blocked Sessions"),
9292 title
=_("State of MSSQL Blocked Sessions is treated as"),
9293 help=_("The default state if there is at least one "
9294 "blocked session."),
9299 title
=_("Levels for wait"),
9300 help=_("The threshholds for wait_duration_ms. Will "
9301 "overwrite the default state set above."),
9302 default_value
=(0, 0),
9304 Float(title
=_("Warning at"), unit
=_("seconds"), display_format
="%.3f"),
9305 Float(title
=_("Critical at"), unit
=_("seconds"), display_format
="%.3f"),
9307 ("ignore_waittypes",
9309 title
=_("Ignore wait types"),
9311 choices
=[(entry
, entry
) for entry
in mssql_waittypes
],
9319 register_check_parameters(
9320 RulespecGroupCheckParametersApplications
,
9321 "mssql_instance_blocked_sessions",
9322 _("MSSQL Blocked Sessions"),
9327 title
=_("State of MSSQL Blocked Sessions is treated as"),
9328 help=_("The default state if there is at least one "
9329 "blocked session."),
9334 title
=_("Levels for wait"),
9335 help=_("The threshholds for wait_duration_ms. Will "
9336 "overwrite the default state set above."),
9337 default_value
=(0, 0),
9339 Float(title
=_("Warning at"), unit
=_("seconds"), display_format
="%.3f"),
9340 Float(title
=_("Critical at"), unit
=_("seconds"), display_format
="%.3f"),
9342 ("ignore_waittypes",
9344 title
=_("Ignore wait types"),
9346 choices
=[(entry
, entry
) for entry
in mssql_waittypes
],
9349 TextAscii(title
=_("Instance identifier")),
9353 register_check_parameters(
9354 RulespecGroupCheckParametersApplications
,
9356 _("MySQL Sessions & Connections"),
9358 help=_("This check monitors the current number of active sessions to the MySQL "
9359 "database server as well as the connection rate."),
9364 title
=_("Number of current sessions"),
9366 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
9367 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
9374 title
=_("Number of currently running sessions"),
9375 help=_("Levels for the number of sessions that are currently active"),
9377 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=10),
9378 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=20),
9385 title
=_("Number of new connections per second"),
9387 Integer(title
=_("Warning at"), unit
=_("connection/sec"), default_value
=20),
9388 Integer(title
=_("Critical at"), unit
=_("connection/sec"), default_value
=40),
9394 title
=_("Instance"),
9395 help=_("Only needed if you have multiple MySQL Instances on one server"),
9400 register_check_parameters(
9401 RulespecGroupCheckParametersApplications
,
9403 _("MySQL InnoDB Throughput"),
9407 title
=_("Read throughput"),
9409 Float(title
=_("warning at"), unit
=_("MB/s")),
9410 Float(title
=_("critical at"), unit
=_("MB/s"))
9414 title
=_("Write throughput"),
9416 Float(title
=_("warning at"), unit
=_("MB/s")),
9417 Float(title
=_("critical at"), unit
=_("MB/s"))
9422 help=_("When averaging is set, a floating average value "
9423 "of the disk throughput is computed and the levels for read "
9424 "and write will be applied to the average instead of the current "
9428 unit
=_("minutes")))]),
9430 title
=_("Instance"),
9431 help=_("Only needed if you have multiple MySQL Instances on one server"),
9436 register_check_parameters(
9437 RulespecGroupCheckParametersApplications
,
9438 "mysql_connections",
9439 _("MySQL Connections"),
9440 Dictionary(elements
=[
9443 title
=_("Max. parallel connections"),
9444 help=_("Compares the maximum number of connections that have been "
9445 "in use simultaneously since the server started with the maximum simultaneous "
9446 "connections allowed by the configuration of the server. This threshold "
9447 "makes the check raise warning/critical states if the percentage is equal to "
9448 "or above the configured levels."),
9450 Percentage(title
=_("Warning at")),
9451 Percentage(title
=_("Critical at")),
9455 title
=_("Instance"),
9456 help=_("Only needed if you have multiple MySQL Instances on one server"),
9461 register_check_parameters(
9462 RulespecGroupCheckParametersApplications
,
9467 ("seconds_behind_master",
9469 title
=_("Max. time behind the master"),
9471 "Compares the time which the slave can be behind the master. "
9472 "This rule makes the check raise warning/critical states if the time is equal to "
9473 "or above the configured levels."),
9475 Age(title
=_("Warning at")),
9476 Age(title
=_("Critical at")),
9479 optional_keys
=None),
9481 title
=_("Instance"),
9482 help=_("Only needed if you have multiple MySQL Instances on one server"),
9487 register_check_parameters(
9488 RulespecGroupCheckParametersApplications
, "db_bloat", _("Database Bloat (PostgreSQL)"),
9490 help=_("This rule allows you to configure bloat levels for a databases tablespace and "
9495 title
=_("Table absolute bloat levels"),
9497 Filesize(title
=_("Warning at")),
9498 Filesize(title
=_("Critical at")),
9500 ("table_bloat_perc",
9502 title
=_("Table percentage bloat levels"),
9503 help=_("Percentage in respect to the optimal utilization. "
9504 "For example if an alarm should raise at 50% wasted space, you need "
9505 "to configure 150%"),
9507 Percentage(title
=_("Warning at"), maxvalue
=None),
9508 Percentage(title
=_("Critical at"), maxvalue
=None),
9512 title
=_("Index absolute levels"),
9514 Filesize(title
=_("Warning at")),
9515 Filesize(title
=_("Critical at")),
9517 ("index_bloat_perc",
9519 title
=_("Index percentage bloat levels"),
9520 help=_("Percentage in respect to the optimal utilization. "
9521 "For example if an alarm should raise at 50% wasted space, you need "
9522 "to configure 150%"),
9524 Percentage(title
=_("Warning at"), maxvalue
=None),
9525 Percentage(title
=_("Critical at"), maxvalue
=None),
9527 ]), TextAscii(title
=_("Name of the database"),), "dict")
9529 register_check_parameters(
9530 RulespecGroupCheckParametersApplications
, "db_connections",
9531 _("Database Connections (PostgreSQL/MongoDB)"),
9533 help=_("This rule allows you to configure the number of maximum concurrent "
9534 "connections for a given database."),
9538 title
=_("Percentage of maximum available connections"),
9540 Percentage(title
=_("Warning at"), unit
=_("% of maximum connections")),
9541 Percentage(title
=_("Critical at"), unit
=_("% of maximum connections")),
9545 title
=_("Absolute number of connections"),
9547 Integer(title
=_("Warning at"), minvalue
=0, unit
=_("connections")),
9548 Integer(title
=_("Critical at"), minvalue
=0, unit
=_("connections")),
9550 ]), TextAscii(title
=_("Name of the database"),), "dict")
9552 register_check_parameters(
9553 RulespecGroupCheckParametersApplications
, "postgres_locks", _("PostgreSQL Locks"),
9556 "This rule allows you to configure the limits for the SharedAccess and Exclusive Locks "
9557 "for a PostgreSQL database."),
9561 title
=_("Shared Access Locks"),
9563 Integer(title
=_("Warning at"), minvalue
=0),
9564 Integer(title
=_("Critical at"), minvalue
=0),
9566 ("levels_exclusive",
9568 title
=_("Exclusive Locks"),
9570 Integer(title
=_("Warning at"), minvalue
=0),
9571 Integer(title
=_("Critical at"), minvalue
=0),
9573 ]), TextAscii(title
=_("Name of the database"),), "dict")
9575 register_check_parameters(
9576 RulespecGroupCheckParametersApplications
, "postgres_maintenance",
9577 _("PostgreSQL VACUUM and ANALYZE"),
9579 help=_("With this rule you can set limits for the VACUUM and ANALYZE operation of "
9580 "a PostgreSQL database. Keep in mind that each table within a database is checked "
9581 "with this limits."),
9585 title
=_("Time since the last VACUUM"),
9587 Age(title
=_("Warning if older than"), default_value
=86400 * 7),
9588 Age(title
=_("Critical if older than"), default_value
=86400 * 14)
9592 title
=_("Time since the last ANALYZE"),
9594 Age(title
=_("Warning if older than"), default_value
=86400 * 7),
9595 Age(title
=_("Critical if older than"), default_value
=86400 * 14)
9597 ("never_analyze_vacuum",
9599 title
=_("Age of never analyzed/vacuumed tables"),
9601 Age(title
=_("Warning if older than"), default_value
=86400 * 7),
9602 Age(title
=_("Critical if older than"), default_value
=86400 * 14)
9604 ]), TextAscii(title
=_("Name of the database"),), "dict")
9606 register_check_parameters(
9607 RulespecGroupCheckParametersApplications
, "f5_connections", _("F5 Loadbalancer Connections"),
9608 Dictionary(elements
=[
9611 title
=_("Max. number of connections"),
9613 default_levels
=(25000, 30000))),
9616 title
=_("Max. number of SSL connections"),
9618 default_levels
=(25000, 30000))),
9619 ("connections_rate",
9621 title
=_("Maximum connections per second"),
9623 default_levels
=(500, 1000))),
9624 ("connections_rate_lower",
9626 title
=_("Minimum connections per second"),
9628 Integer(title
=_("Warning at")),
9629 Integer(title
=_("Critical at")),
9634 title
=_("HTTP requests per second"), default_value
=None, default_levels
=(500, 1000))),
9637 register_check_parameters(
9638 RulespecGroupCheckParametersApplications
,
9639 "cisco_fw_connections",
9640 _("Cisco ASA Firewall Connections"),
9641 Dictionary(elements
=[
9644 help=_("This rule sets limits to the current number of connections through "
9645 "a Cisco ASA firewall."),
9646 title
=_("Maximum number of firewall connections"),
9648 Integer(title
=_("Warning at")),
9649 Integer(title
=_("Critical at")),
9657 register_check_parameters(
9658 RulespecGroupCheckParametersApplications
,
9659 "checkpoint_connections",
9660 _("Checkpoint Firewall Connections"),
9662 help=_("This rule sets limits to the current number of connections through "
9663 "a Checkpoint firewall."),
9664 title
=_("Maximum number of firewall connections"),
9666 Integer(title
=_("Warning at"), default_value
=40000),
9667 Integer(title
=_("Critical at"), default_value
=50000),
9674 register_check_parameters(
9675 RulespecGroupCheckParametersApplications
, "checkpoint_packets",
9676 _("Checkpoint Firewall Packet Rates"),
9677 Dictionary(elements
=[
9680 title
=_("Maximum Rate of Accepted Packets"),
9682 default_levels
=(100000, 200000),
9686 title
=_("Maximum Rate of Rejected Packets"),
9688 default_levels
=(100000, 200000),
9692 title
=_("Maximum Rate of Dropped Packets"),
9694 default_levels
=(100000, 200000),
9698 title
=_("Maximum Rate of Logged Packets"),
9700 default_levels
=(100000, 200000),
9704 register_check_parameters(
9705 RulespecGroupCheckParametersApplications
, "f5_pools", _("F5 Loadbalancer Pools"),
9707 title
=_("Minimum number of pool members"),
9709 Integer(title
=_("Warning if below"), unit
=_("Members ")),
9710 Integer(title
=_("Critical if below"), unit
=_("Members")),
9712 ), TextAscii(title
=_("Name of pool")), "first")
9714 register_check_parameters(
9715 RulespecGroupCheckParametersApplications
, "mysql_db_size", _("Size of MySQL databases"),
9718 Filesize(title
=_("warning at")),
9719 Filesize(title
=_("critical at")),
9721 help=_("The check will trigger a warning or critical state if the size of the "
9722 "database exceeds these levels."),
9723 title
=_("Impose limits on the size of the database"),
9726 title
=_("Name of the database"),
9727 help=_("Don't forget the instance: instance:dbname"),
9730 register_check_parameters(
9731 RulespecGroupCheckParametersApplications
,
9732 "postgres_sessions",
9733 _("PostgreSQL Sessions"),
9735 help=_("This check monitors the current number of active and idle sessions on PostgreSQL"),
9740 title
=_("Number of current sessions"),
9742 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
9743 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
9750 title
=_("Number of currently running sessions"),
9751 help=_("Levels for the number of sessions that are currently active"),
9753 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=10),
9754 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=20),
9764 register_check_parameters(
9765 RulespecGroupCheckParametersApplications
,
9766 "postgres_instance_sessions",
9767 _("PostgreSQL Sessions"),
9769 help=_("This check monitors the current number of active and idle sessions on PostgreSQL"),
9774 title
=_("Number of current sessions"),
9776 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
9777 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
9784 title
=_("Number of currently running sessions"),
9785 help=_("Levels for the number of sessions that are currently active"),
9787 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=10),
9788 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=20),
9793 TextAscii(title
=_("Instance")),
9797 register_check_parameters(
9798 RulespecGroupCheckParametersApplications
,
9800 _("Cisco SSl VPN Client Sessions"),
9802 title
=_("Number of active sessions"),
9803 help=_("This check monitors the current number of active sessions"),
9805 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
9806 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
9814 def convert_oracle_sessions(value
):
9815 if isinstance(value
, tuple):
9816 return {'sessions_abs': value
}
9817 if 'sessions_abs' not in value
:
9818 value
['sessions_abs'] = (100, 200)
9822 register_check_parameters(
9823 RulespecGroupCheckParametersApplications
,
9825 _("Oracle Sessions"),
9831 title
=_("Absolute levels of active sessions"),
9833 help=_("This check monitors the current number of active sessions on Oracle"),
9835 FixedValue(None, title
=_("Do not use absolute levels"), totext
=""),
9837 title
=_("Number of active sessions"),
9840 title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
9842 title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
9850 title
=_("Relative levels of active sessions."),
9852 _("Set upper levels of active sessions relative to max. number of sessions. This is optional."
9855 Percentage(title
=_("Warning at")),
9856 Percentage(title
=_("Critical at")),
9861 optional_keys
=["sessions_perc"],
9863 forth
=convert_oracle_sessions
),
9864 TextAscii(title
=_("Database name"), allow_empty
=False),
9868 register_check_parameters(
9869 RulespecGroupCheckParametersApplications
,
9872 Dictionary(elements
=[("levels",
9874 title
=_("Levels for minimum wait time for a lock"),
9876 Age(title
=_("warning if higher then"), default_value
=1800),
9877 Age(title
=_("critical if higher then"), default_value
=3600),
9879 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
9883 register_check_parameters(
9884 RulespecGroupCheckParametersApplications
,
9885 "oracle_longactivesessions",
9886 _("Oracle Long Active Sessions"),
9887 Dictionary(elements
=[("levels",
9889 title
=_("Levels of active sessions"),
9891 Integer(title
=_("Warning if more than"), unit
=_("sessions")),
9892 Integer(title
=_("Critical if more than"), unit
=_("sessions")),
9894 TextAscii(title
=_("Database SID"), size
=12, allow_empty
=False),
9898 register_check_parameters(
9899 RulespecGroupCheckParametersApplications
,
9900 "postgres_stat_database",
9901 _("PostgreSQL Database Statistics"),
9904 "This check monitors how often database objects in a PostgreSQL Database are accessed"),
9909 title
=_("Blocks read"),
9911 Float(title
=_("Warning at"), unit
=_("blocks/s")),
9912 Float(title
=_("Critical at"), unit
=_("blocks/s")),
9921 Float(title
=_("Warning at"), unit
=_("/s")),
9922 Float(title
=_("Critical at"), unit
=_("/s")),
9931 Float(title
=_("Warning at"), unit
=_("/s")),
9932 Float(title
=_("Critical at"), unit
=_("/s")),
9941 Float(title
=_("Warning at"), unit
=_("/s")),
9942 Float(title
=_("Critical at"), unit
=_("/s")),
9951 Float(title
=_("Warning at"), unit
=_("/s")),
9952 Float(title
=_("Critical at"), unit
=_("/s")),
9961 Float(title
=_("Warning at"), unit
=_("/s")),
9962 Float(title
=_("Critical at"), unit
=_("/s")),
9968 TextAscii(title
=_("Database name"), allow_empty
=False),
9972 register_check_parameters(
9973 RulespecGroupCheckParametersApplications
,
9975 _("DHCP Pools for Windows and Linux"),
9981 title
= _("Free leases levels"),
9984 title
= _("Free leases levels in percent"),
9986 Percentage(title
= _("Warning if below"), default_value
= 10.0),
9987 Percentage(title
= _("Critical if below"), default_value
= 5.0)
9991 title
= _("Absolute free leases levels"),
9993 Integer(title
= _("Warning if below"), unit
= _("free leases")),
9994 Integer(title
= _("Critical if below"), unit
= _("free leases"))
10002 title
= _("Used leases levels"),
10005 title
= _("Used leases levels in percent"),
10007 Percentage(title
= _("Warning if below")),
10008 Percentage(title
= _("Critical if below"))
10012 title
= _("Absolute used leases levels"),
10014 Integer(title
= _("Warning if below"), unit
= _("used leases")),
10015 Integer(title
= _("Critical if below"), unit
= _("used leases"))
10023 forth
= lambda params
: isinstance(params
, tuple) and {"free_leases" : (float(params
[0]), float(params
[1]))} or params
,
10026 title
= _("Pool name"),
10027 allow_empty
= False,
10029 match_type
= "first",
10032 register_check_parameters(
10033 RulespecGroupCheckParametersOperatingSystem
,
10035 _("Number of threads"),
10038 "These levels check the number of currently existing threads on the system. Each process has at "
10039 "least one thread."),
10041 Integer(title
=_("Warning at"), unit
=_("threads"), default_value
=1000),
10042 Integer(title
=_("Critical at"), unit
=_("threads"), default_value
=2000)
10045 match_type
="first",
10048 register_check_parameters(
10049 RulespecGroupCheckParametersOperatingSystem
,
10051 _("Number of Logins on System"),
10053 help=_("This rule defines upper limits for the number of logins on a system."),
10055 Integer(title
=_("Warning at"), unit
=_("users"), default_value
=20),
10056 Integer(title
=_("Critical at"), unit
=_("users"), default_value
=30)
10059 match_type
="first",
10062 register_check_parameters(
10063 RulespecGroupCheckParametersApplications
,
10065 _("Number of processes on OpenVMS"),
10068 Integer(title
=_("Warning at"), unit
=_("processes"), default_value
=100),
10069 Integer(title
=_("Critical at"), unit
=_("processes"), default_value
=200)
10071 title
=_("Impose levels on number of processes"),
10074 match_type
="first",
10077 register_check_parameters(
10078 RulespecGroupCheckParametersOperatingSystem
, "vm_counter",
10079 _("Number of kernel events per second"),
10081 help=_("This ruleset applies to several similar checks measing various kernel "
10082 "events like context switches, process creations and major page faults. "
10083 "Please create separate rules for each type of kernel counter you "
10084 "want to set levels for."),
10085 unit
=_("events per second"),
10086 default_levels
=(1000, 5000),
10087 default_difference
=(500.0, 1000.0),
10088 default_value
=None,
10091 title
=_("kernel counter"),
10092 choices
=[("Context Switches", _("Context Switches")),
10093 ("Process Creations", _("Process Creations")),
10094 ("Major Page Faults", _("Major Page Faults"))]), "first")
10096 register_check_parameters(
10097 RulespecGroupCheckParametersStorage
,
10098 "ibm_svc_total_latency",
10099 _("IBM SVC: Levels for total disk latency"),
10100 Dictionary(elements
=[
10103 title
=_("Read latency"),
10105 default_value
=None,
10106 default_levels
=(50.0, 100.0))),
10109 title
=_("Write latency"),
10111 default_value
=None,
10112 default_levels
=(50.0, 100.0))),
10116 ("Drives", _("Total latency for all drives")),
10117 ("MDisks", _("Total latency for all MDisks")),
10118 ("VDisks", _("Total latency for all VDisks")),
10120 title
=_("Disk/Drive type"),
10121 help=_("Please enter <tt>Drives</tt>, <tt>Mdisks</tt> or <tt>VDisks</tt> here.")),
10126 def transform_ibm_svc_host(params
):
10128 # Old inventory rule until version 1.2.7
10129 # params were None instead of emtpy dictionary
10130 params
= {'always_ok': False}
10132 if 'always_ok' in params
:
10133 if params
['always_ok'] is False:
10134 params
= {'degraded_hosts': (1, 1), 'offline_hosts': (1, 1), 'other_hosts': (1, 1)}
10140 register_check_parameters(
10141 RulespecGroupCheckParametersStorage
,
10143 _("IBM SVC: Options for SVC Hosts Check"),
10145 Dictionary(elements
=[
10149 title
=_("Count of active hosts"),
10151 Integer(title
=_("Warning at or below"), minvalue
=0, unit
=_("active hosts")),
10153 title
=_("Critical at or below"), minvalue
=0, unit
=_("active hosts")),
10159 title
=_("Count of inactive hosts"),
10162 title
=_("Warning at or above"), minvalue
=0, unit
=_("inactive hosts")),
10164 title
=_("Critical at or above"), minvalue
=0, unit
=_("inactive hosts")),
10170 title
=_("Count of degraded hosts"),
10173 title
=_("Warning at or above"), minvalue
=0, unit
=_("degraded hosts")),
10175 title
=_("Critical at or above"), minvalue
=0, unit
=_("degraded hosts")),
10181 title
=_("Count of offline hosts"),
10184 title
=_("Warning at or above"), minvalue
=0, unit
=_("offline hosts")),
10186 title
=_("Critical at or above"), minvalue
=0, unit
=_("offline hosts")),
10192 title
=_("Count of other hosts"),
10194 Integer(title
=_("Warning at or above"), minvalue
=0, unit
=_("other hosts")),
10195 Integer(title
=_("Critical at or above"), minvalue
=0, unit
=_("other hosts")),
10199 forth
=transform_ibm_svc_host
,
10205 register_check_parameters(
10206 RulespecGroupCheckParametersStorage
,
10208 _("IBM SVC: Options for SVC Disk Check"),
10210 optional_keys
=False,
10215 title
=_("Resulting state if disk is online"),
10222 title
=_("Resulting state if disk is degraded"),
10229 title
=_("Resulting state if disk is offline"),
10236 title
=_("Resulting state if disk is excluded"),
10243 title
=_("Resulting state if disk is in managed mode"),
10250 title
=_("Resulting state if disk is in array mode"),
10257 title
=_("Resulting state if disk is in image mode"),
10264 title
=_("Resulting state if disk is in unmanaged mode"),
10270 title
=_("IBM SVC disk"),
10271 help=_("Name of the disk, e.g. mdisk0"),
10276 register_check_parameters(
10277 RulespecGroupCheckParametersStorage
,
10279 _("Levels for disk IO"),
10282 "With this rule you can set limits for various disk IO statistics. "
10283 "Keep in mind that not all of these settings may be applicable for the actual "
10284 "check. For example, if the check doesn't provide a <i>Read wait</i> information in its "
10285 "output, any configuration setting referring to <i>Read wait</i> will have no effect."),
10289 title
=_("Read throughput"),
10291 default_levels
=(50.0, 100.0),
10295 title
=_("Write throughput"),
10297 default_levels
=(50.0, 100.0),
10301 title
=_("Disk Utilization"),
10303 default_levels
=(80.0, 90.0),
10305 ("latency", Levels(
10306 title
=_("Disk Latency"),
10308 default_levels
=(80.0, 160.0),
10310 ("read_wait", Levels(title
=_("Read wait"), unit
=_("ms"), default_levels
=(30.0, 50.0))),
10311 ("write_wait", Levels(title
=_("Write wait"), unit
=_("ms"), default_levels
=(30.0,
10315 title
=_("Averaging"),
10317 "When averaging is set, then all of the disk's metrics are averaged "
10318 "over the selected interval - rather then the check interval. This allows "
10319 "you to make your monitoring less reactive to short peaks. But it will also "
10320 "introduce a loss of accuracy in your graphs. "),
10324 Levels(title
=_("Read operations"), unit
=_("1/s"), default_levels
=(400.0, 600.0))),
10326 Levels(title
=_("Write operations"), unit
=_("1/s"), default_levels
=(300.0, 400.0))),
10331 "For a summarized throughput of all disks, specify <tt>SUMMARY</tt>, "
10332 "a per-disk IO is specified by the drive letter, a colon and a slash on Windows "
10333 "(e.g. <tt>C:/</tt>) or by the device name on Linux/UNIX (e.g. <tt>/dev/sda</tt>).")),
10337 register_check_parameters(
10338 RulespecGroupCheckParametersStorage
, "disk_io", _("Levels on disk IO (old style checks)"),
10339 Dictionary(elements
=[
10342 title
=_("Read throughput"),
10344 default_value
=None,
10345 default_levels
=(50.0, 100.0))),
10348 title
=_("Write throughput"),
10350 default_value
=None,
10351 default_levels
=(50.0, 100.0))),
10354 title
=_("Average"),
10355 help=_("When averaging is set, a floating average value "
10356 "of the disk throughput is computed and the levels for read "
10357 "and write will be applied to the average instead of the current "
10361 unit
=_("minutes"))),
10364 title
=_("IO Latency"),
10366 Float(title
=_("warning at"), unit
=_("ms"), default_value
=80.0),
10367 Float(title
=_("critical at"), unit
=_("ms"), default_value
=160.0),
10370 "latency_perfdata",
10372 title
=_("Performance Data for Latency"),
10373 label
=_("Collect performance data for disk latency"),
10374 help=_("Note: enabling performance data for the latency might "
10375 "cause incompatibilities with existing historical data "
10376 "if you are running PNP4Nagios in SINGLE mode.")),
10380 title
=_("Read Queue-Length"),
10382 Float(title
=_("warning at"), default_value
=80.0),
10383 Float(title
=_("critical at"), default_value
=90.0),
10387 title
=_("Write Queue-Length"),
10389 Float(title
=_("warning at"), default_value
=80.0),
10390 Float(title
=_("critical at"), default_value
=90.0),
10395 title
=_("Performance Data for Queue Length"),
10396 label
=_("Collect performance data for disk latency"),
10397 help=_("Note: enabling performance data for the latency might "
10398 "cause incompatibilities with existing historical data "
10399 "if you are running PNP4Nagios in SINGLE mode.")),
10405 "For a summarized throughput of all disks, specify <tt>SUMMARY</tt>, for a "
10406 "sum of read or write throughput write <tt>read</tt> or <tt>write</tt> resp. "
10407 "A per-disk IO is specified by the drive letter, a colon and a slash on Windows "
10408 "(e.g. <tt>C:/</tt>) or by the device name on Linux/UNIX (e.g. <tt>/dev/sda</tt>).")),
10412 RulespecGroupCheckParametersStorage
,
10413 "diskstat_inventory",
10415 title
=_("Discovery mode for Disk IO check"),
10416 help=_("This rule controls which and how many checks will be created "
10417 "for monitoring individual physical and logical disks. "
10418 "Note: the option <i>Create a summary for all read, one for "
10419 "write</i> has been removed. Some checks will still support "
10420 "this settings, but it will be removed there soon."),
10422 ("summary", _("Create a summary over all physical disks")),
10423 # This option is still supported by some checks, but is deprecated and
10424 # we fade it out...
10425 # ( "legacy", _("Create a summary for all read, one for write") ),
10426 ("physical", _("Create a separate check for each physical disk")),
10427 ("lvm", _("Create a separate check for each LVM volume (Linux)")),
10428 ("vxvm", _("Creata a separate check for each VxVM volume (Linux)")),
10429 ("diskless", _("Creata a separate check for each partition (XEN)")),
10431 default_value
=['summary'],
10436 def transform_if_groups_forth(params
):
10437 for param
in params
:
10438 if param
.get("name"):
10439 param
["group_name"] = param
["name"]
10441 if param
.get("include_items"):
10442 param
["items"] = param
["include_items"]
10443 del param
["include_items"]
10444 if param
.get("single") is not None:
10445 if param
["single"]:
10446 param
["group_presence"] = "instead"
10448 param
["group_presence"] = "separate"
10449 del param
["single"]
10453 vs_elements_if_groups_matches
= [
10457 title
=_("Select interface port type"),
10458 choices
=defines
.interface_port_types(),
10459 help=_("Only interfaces with the given port type are put into this group. "
10460 "For example 53 (propVirtual)."),
10467 title
=_("Restrict interface items"),
10468 help=_("Only interface with these item names are put into this group."),
10472 vs_elements_if_groups_group
= [
10475 title
=_("Group name"),
10476 help=_("Name of group in service description"),
10481 title
=_("Group interface presence"),
10482 help=_("Determine whether the group interface is created as an "
10483 "separate service or not. In second case the choosen interface "
10484 "services disapear."),
10486 ("separate", _("List grouped interfaces separately")),
10487 ("instead", _("List grouped interfaces instead")),
10489 default_value
="instead",
10494 RulespecGroupCheckParametersNetworking
,
10495 varname
="if_groups",
10496 title
=_('Network interface groups'),
10498 'Normally the Interface checks create a single service for interface. '
10499 'By defining if-group patterns multiple interfaces can be combined together. '
10500 'A single service is created for this interface group showing the total traffic amount '
10501 'of its members. You can configure if interfaces which are identified as group interfaces '
10502 'should not show up as single service. You can restrict grouped interfaces by iftype and the '
10503 'item name of the single interface.'),
10504 valuespec
=Transform(
10509 title
=_("Groups on single host"),
10510 add_label
=_("Add pattern"),
10511 valuespec
=Dictionary(
10512 elements
=vs_elements_if_groups_group
+ vs_elements_if_groups_matches
,
10513 required_keys
=["group_name", "group_presence"]),
10517 title
=_("Groups on cluster"),
10518 add_label
=_("Add pattern"),
10519 valuespec
=Dictionary(
10520 elements
=vs_elements_if_groups_group
+
10523 title
=_("Patterns for each node"),
10524 add_label
=_("Add pattern"),
10525 valuespec
=Dictionary(
10526 elements
=[("node_name", TextAscii(title
=_("Node name")))] +
10527 vs_elements_if_groups_matches
,
10528 required_keys
=["node_name"]),
10531 optional_keys
=[])),
10534 forth
=transform_if_groups_forth
),
10539 RulespecGroupCheckParametersDiscovery
,
10540 varname
="winperf_msx_queues_inventory",
10541 title
=_('MS Exchange Message Queues Discovery'),
10543 'Per default the offsets of all Windows performance counters are preconfigured in the check. '
10544 'If the format of your counters object is not compatible then you can adapt the counter '
10545 'offsets manually.'),
10548 orientation
="horizontal",
10551 title
=_("Name of Counter"),
10552 help=_("Name of the Counter to be monitored."),
10558 help=_("The offset of the information relative to counter base"),
10563 add_label
=_("Add Counter")),
10567 mailqueue_params
= Dictionary(
10572 title
=_("Mails in outgoing mail queue/deferred mails"),
10573 help=_("This rule is applied to the number of E-Mails currently "
10574 "in the deferred mail queue, or in the general outgoing mail "
10575 "queue, if such a distinction is not available."),
10577 Integer(title
=_("Warning at"), unit
=_("mails"), default_value
=10),
10578 Integer(title
=_("Critical at"), unit
=_("mails"), default_value
=20),
10585 title
=_("Mails in active mail queue"),
10586 help=_("This rule is applied to the number of E-Mails currently "
10587 "in the active mail queue"),
10589 Integer(title
=_("Warning at"), unit
=_("mails"), default_value
=800),
10590 Integer(title
=_("Critical at"), unit
=_("mails"), default_value
=1000),
10595 optional_keys
=["active"],
10598 register_check_parameters(
10599 RulespecGroupCheckParametersApplications
,
10600 "mailqueue_length",
10601 _("Number of mails in outgoing mail queue"),
10604 forth
=lambda old
: not isinstance(old
, dict) and {"deferred": old
} or old
,
10611 register_check_parameters(
10612 RulespecGroupCheckParametersApplications
,
10613 "mail_queue_length",
10614 _("Number of mails in outgoing mail queue"),
10617 forth
=lambda old
: not isinstance(old
, dict) and {"deferred": old
} or old
,
10619 TextAscii(title
=_("Mail queue name")),
10623 register_check_parameters(
10624 RulespecGroupCheckParametersApplications
, "mail_latency", _("Mail Latency"),
10626 title
=_("Upper levels for Mail Latency"),
10628 Age(title
=_("Warning at"), default_value
=40),
10629 Age(title
=_("Critical at"), default_value
=60),
10632 register_check_parameters(
10633 RulespecGroupCheckParametersStorage
,
10635 _("ZFS storage pool status"),
10638 match_type
="first",
10641 register_check_parameters(
10642 RulespecGroupCheckParametersVirtualization
,
10644 _("Overall state of a virtual machine (for example ESX VMs)"),
10647 match_type
="first",
10650 register_check_parameters(
10651 RulespecGroupCheckParametersHardware
,
10653 _("Simple checks for BIOS/Hardware errors"),
10656 match_type
="first",
10659 register_check_parameters(
10660 RulespecGroupCheckParametersApplications
, "omd_status", _("OMD site status"), None,
10662 title
=_("Name of the OMD site"),
10663 help=_("The name of the OMD site to check the status for")), "first")
10665 register_check_parameters(
10666 RulespecGroupCheckParametersStorage
, "network_fs",
10667 _("Network filesystem - overall status (e.g. NFS)"),
10673 title
=_("Performance data settings"),
10675 (True, _("Enable performance data")),
10676 (False, _("Disable performance data")),
10678 default_value
=False),
10682 title
=_("Name of the mount point"), help=_("For NFS enter the name of the mount point.")),
10685 register_check_parameters(
10686 RulespecGroupCheckParametersStorage
,
10687 "windows_multipath",
10688 _("Windows Multipath Count"),
10690 help=_("This rules sets the expected number of active paths for a multipath LUN."),
10691 title
=_("Expected number of active paths"),
10693 Integer(title
=_("Expected number of active paths")),
10695 title
=_("Expected percentage of active paths"),
10697 Integer(title
=_("Expected number of active paths")),
10698 Percentage(title
=_("Warning if less then")),
10699 Percentage(title
=_("Critical if less then")),
10706 register_check_parameters(
10707 RulespecGroupCheckParametersStorage
, "multipath", _("Linux and Solaris Multipath Count"),
10709 help=_("This rules sets the expected number of active paths for a multipath LUN "
10710 "on Linux and Solaris hosts"),
10711 title
=_("Expected number of active paths"),
10713 Integer(title
=_("Expected number of active paths")),
10715 title
=_("Expected percentage of active paths"),
10717 Percentage(title
=_("Warning if less then")),
10718 Percentage(title
=_("Critical if less then")),
10722 title
=_("Name of the MP LUN"),
10723 help=_("For Linux multipathing this is either the UUID (e.g. "
10724 "60a9800043346937686f456f59386741), or the configured "
10725 "alias.")), "first")
10728 RulespecGroupCheckParametersStorage
,
10729 varname
="inventory_multipath_rules",
10730 title
=_("Linux Multipath Inventory"),
10731 valuespec
=Dictionary(
10735 title
=_("Use the multipath alias as service name, if one is set"),
10736 label
=_("use alias"),
10738 "If a multipath device has an alias then you can use it for specifying "
10739 "the device instead of the UUID. The alias will then be part of the service "
10740 "description. The UUID will be displayed in the plugin output."))),
10743 "This rule controls whether the UUID or the alias is used in the service description during "
10744 "discovery of Multipath devices on Linux."),
10749 register_check_parameters(
10750 RulespecGroupCheckParametersStorage
, "multipath_count", _("ESX Multipath Count"),
10752 help=_("This rules sets the expected number of active paths for a multipath LUN "
10754 title
=_("Match type"),
10758 title
=_("OK if standby count is zero or equals active paths."),
10762 title
=_("Custom settings"),
10769 Integer(title
=_("Critical if less than")),
10770 Integer(title
=_("Warning if less than")),
10771 Integer(title
=_("Warning if more than")),
10772 Integer(title
=_("Critical if more than")),
10774 forth
=lambda x
: len(x
) == 2 and (0, 0, x
[0], x
[1]) or x
))
10776 description
) in [("active", _("Active paths")), (
10777 "dead", _("Dead paths")), (
10778 "disabled", _("Disabled paths")), (
10779 "standby", _("Standby paths")), ("unknown",
10780 _("Unknown paths"))]
10782 ]), TextAscii(title
=_("Path ID")), "first")
10784 register_check_parameters(
10785 RulespecGroupCheckParametersStorage
, "hpux_multipath", _("HP-UX Multipath Count"),
10787 title
=_("Expected path situation"),
10788 help=_("This rules sets the expected number of various paths for a multipath LUN "
10789 "on HPUX servers"),
10791 Integer(title
=_("Number of active paths")),
10792 Integer(title
=_("Number of standby paths")),
10793 Integer(title
=_("Number of failed paths")),
10794 Integer(title
=_("Number of unopen paths")),
10795 ]), TextAscii(title
=_("WWID of the LUN")), "first")
10797 register_check_parameters(
10798 RulespecGroupCheckParametersStorage
,
10800 _("DR:BD roles and diskstates"),
10801 Dictionary(elements
=[(
10806 FixedValue(None, totext
="", title
=_("Do not monitor")),
10809 orientation
="horizontal",
10812 title
=_("DRBD shows up as"),
10813 default_value
="running",
10814 choices
=[("primary_secondary", _("Primary / Secondary")
10815 ), ("primary_primary", _("Primary / Primary")
10816 ), ("secondary_primary", _("Secondary / Primary")
10817 ), ("secondary_secondary",
10818 _("Secondary / Secondary"))]),
10819 MonitoringState(title
=_("Resulting state"),),
10821 default_value
=("ignore", 0)),
10822 title
=_("Set roles"),
10823 add_label
=_("Add role rule"))
10828 title
=_("Diskstates"),
10830 FixedValue(None, totext
="", title
=_("Do not monitor")),
10835 title
=_("Diskstate"),
10837 ("primary_Diskless",
10838 _("Primary - Diskless")),
10839 ("primary_Attaching",
10840 _("Primary - Attaching")),
10841 ("primary_Failed", _("Primary - Failed")),
10842 ("primary_Negotiating",
10843 _("Primary - Negotiating")),
10844 ("primary_Inconsistent",
10845 _("Primary - Inconsistent")),
10846 ("primary_Outdated",
10847 _("Primary - Outdated")),
10848 ("primary_DUnknown",
10849 _("Primary - DUnknown")),
10850 ("primary_Consistent",
10851 _("Primary - Consistent")),
10852 ("primary_UpToDate",
10853 _("Primary - UpToDate")),
10854 ("secondary_Diskless",
10855 _("Secondary - Diskless")),
10856 ("secondary_Attaching",
10857 _("Secondary - Attaching")),
10858 ("secondary_Failed",
10859 _("Secondary - Failed")),
10860 ("secondary_Negotiating",
10861 _("Secondary - Negotiating")),
10862 ("secondary_Inconsistent",
10863 _("Secondary - Inconsistent")),
10864 ("secondary_Outdated",
10865 _("Secondary - Outdated")),
10866 ("secondary_DUnknown",
10867 _("Secondary - DUnknown")),
10868 ("secondary_Consistent",
10869 _("Secondary - Consistent")),
10870 ("secondary_UpToDate",
10871 _("Secondary - UpToDate")),
10873 MonitoringState(title
=_("Resulting state"))
10875 orientation
="horizontal",
10877 title
=_("Set diskstates"),
10878 add_label
=_("Add diskstate rule"))
10881 TextAscii(title
=_("DRBD device")),
10885 register_check_parameters(
10886 RulespecGroupCheckParametersStorage
,
10888 _("NetApp Snapvaults / Snapmirror Lag Time"),
10894 title
=_("Default levels"),
10896 Age(title
=_("Warning at")),
10897 Age(title
=_("Critical at")),
10901 ("policy_lag_time",
10904 orientation
="horizontal",
10906 TextAscii(title
=_("Policy name")),
10908 title
=_("Maximum age"),
10910 Age(title
=_("Warning at")),
10911 Age(title
=_("Critical at")),
10915 title
=_('Policy specific levels (Clustermode only)'),
10917 "Here you can specify levels for different policies which overrule the levels "
10918 "from the <i>Default levels</i> parameter. This setting only works in NetApp Clustermode setups."
10922 TextAscii(title
=_("Source Path"), allow_empty
=False),
10926 register_check_parameters(
10927 RulespecGroupCheckParametersStorage
,
10928 "netapp_snapshots",
10929 _("NetApp Snapshot Reserve"),
10934 title
=_("Levels for used configured reserve"),
10936 Percentage(title
=_("Warning at or above"), unit
="%", default_value
=85.0),
10937 Percentage(title
=_("Critical at or above"), unit
="%", default_value
=90.0),
10939 ("state_noreserve", MonitoringState(title
=_("State if no reserve is configured"),)),
10941 TextAscii(title
=_("Volume name")),
10945 register_check_parameters(
10946 RulespecGroupCheckParametersStorage
,
10948 _("Filer Disk Levels (NetApp, IBM SVC)"),
10952 ("failed_spare_ratio",
10954 title
=_("Failed to spare ratio"),
10955 help=_("You can set a limit to the failed to spare disk ratio. "
10956 "The ratio is calculated with <i>spare / (failed + spare)</i>."),
10958 Percentage(title
=_("Warning at or above"), default_value
=1.0),
10959 Percentage(title
=_("Critical at or above"), default_value
=50.0),
10961 ("offline_spare_ratio",
10963 title
=_("Offline to spare ratio"),
10964 help=_("You can set a limit to the offline to spare disk ratio. "
10965 "The ratio is calculated with <i>spare / (offline + spare)</i>."),
10967 Percentage(title
=_("Warning at or above"), default_value
=1.0),
10968 Percentage(title
=_("Critical at or above"), default_value
=50.0),
10970 ("number_of_spare_disks",
10972 title
=_("Number of spare disks"),
10973 help=_("You can set a lower limit to the absolute number of spare disks."),
10975 Integer(title
=_("Warning below"), default_value
=2, min_value
=0),
10976 Integer(title
=_("Critical below"), default_value
=1, min_value
=0),
10980 lambda a
: "broken_spare_ratio" in a
and {"failed_spare_ratio": a
["broken_spare_ratio"]} or a
10986 register_check_parameters(
10987 RulespecGroupCheckParametersStorage
,
10989 _("NetApp Volumes"),
10990 Dictionary(elements
=[
10993 title
=_("Levels for volume"),
10994 show_alternative_title
=True,
10995 default_value
=(80.0, 90.0),
10996 match
=match_dual_level_type
,
10998 get_free_used_dynamic_valuespec("used", "volume"),
11000 get_free_used_dynamic_valuespec("free", "volume", default_value
=(20.0, 10.0)),
11002 forth
=transform_filesystem_free
,
11003 back
=transform_filesystem_free
)
11007 title
=_("Performance data for protocols"),
11008 help=_("Specify for which protocol performance data should get recorded."),
11010 ("", _("Summarized data of all protocols")),
11012 ("cifs", _("CIFS")),
11015 ("iscsi", _("iSCSI")),
11020 title
=_("Magic factor (automatic level adaptation for large volumes)"),
11026 title
=_("Reference size for magic factor"), default_value
=20, minvalue
=1, unit
=_("GB"))
11030 title
=_("Minimum levels if using magic factor"),
11031 help=_("The volume levels will never fall below these values, when using "
11032 "the magic factor and the volume is very small."),
11035 title
=_("Warning if above"),
11040 title
=_("Critical if above"),
11047 title
=_("Levels for Inodes"),
11048 help=_("The number of remaining inodes on the filesystem. "
11049 "Please note that this setting has no effect on some filesystem checks."),
11052 title
=_("Percentage free"),
11054 Percentage(title
=_("Warning if less than")),
11055 Percentage(title
=_("Critical if less than")),
11058 title
=_("Absolute free"),
11061 title
=_("Warning if less than"),
11065 default_value
=10000),
11067 title
=_("Critical if less than"),
11071 default_value
=5000),
11074 default_value
=(10.0, 5.0),
11078 title
=_("Display inode usage in check output..."),
11080 ("onproblem", _("Only in case of a problem")),
11081 ("onlow", _("Only in case of a problem or if inodes are below 50%")),
11082 ("always", _("Always")),
11084 default_value
="onlow",
11089 title
=_("Time Range for filesystem trend computation"),
11093 title
=_("Trend computation"),
11094 label
=_("Enable trend computation"))),
11097 title
=_("Levels on trends in MB per time range"),
11099 Integer(title
=_("Warning at"), unit
=_("MB / range"), default_value
=100),
11100 Integer(title
=_("Critical at"), unit
=_("MB / range"), default_value
=200)
11104 title
=_("Levels for the percentual growth per time range"),
11107 title
=_("Warning at"),
11108 unit
=_("% / range"),
11112 title
=_("Critical at"),
11113 unit
=_("% / range"),
11119 title
=_("Levels on the time left until the filesystem gets full"),
11122 title
=_("Warning if below"),
11127 title
=_("Critical if below"),
11132 ("trend_showtimeleft",
11134 title
=_("Display time left in check output"),
11136 help=_("Normally, the time left until the disk is full is only displayed when "
11137 "the configured levels have been breached. If you set this option "
11138 "the check always reports this information"))),
11141 title
=_("Trend performance data"),
11142 label
=_("Enable generation of performance data from trends"))),
11144 TextAscii(title
=_("Volume name")),
11148 register_check_parameters(
11149 RulespecGroupCheckParametersStorage
,
11153 title
=_("Configure levels for used space"),
11157 title
=_("Ignore used space (this option disables any other options)"),
11159 "Some luns, e.g. jfs formatted, tend to report incorrect used space values"),
11160 label
=_("Ignore used space"),
11166 title
=_("Levels for LUN"),
11167 show_alternative_title
=True,
11168 default_value
=(80.0, 90.0),
11169 match
=match_dual_level_type
,
11171 get_free_used_dynamic_valuespec("used", "LUN"),
11173 get_free_used_dynamic_valuespec("free", "LUN", default_value
=(20.0, 10.0)),
11175 forth
=transform_filesystem_free
,
11176 back
=transform_filesystem_free
,
11182 title
=_("Time Range for lun filesystem trend computation"),
11186 title
=_("Trend computation"),
11187 label
=_("Enable trend computation"))),
11190 title
=_("Levels on trends in MB per time range"),
11192 Integer(title
=_("Warning at"), unit
=_("MB / range"), default_value
=100),
11193 Integer(title
=_("Critical at"), unit
=_("MB / range"), default_value
=200)
11197 title
=_("Levels for the percentual growth per time range"),
11200 title
=_("Warning at"),
11201 unit
=_("% / range"),
11205 title
=_("Critical at"),
11206 unit
=_("% / range"),
11212 title
=_("Levels on the time left until the lun filesystem gets full"),
11215 title
=_("Warning if below"),
11220 title
=_("Critical if below"),
11225 ("trend_showtimeleft",
11227 title
=_("Display time left in check output"),
11230 "Normally, the time left until the lun filesystem is full is only displayed when "
11231 "the configured levels have been breached. If you set this option "
11232 "the check always reports this information"))),
11235 title
=_("Trend performance data"),
11236 label
=_("Enable generation of performance data from trends"))),
11239 title
=_("LUN is read-only"),
11240 help=_("Display a warning if a LUN is not read-only. Without "
11241 "this setting a warning will be displayed if a LUN is "
11243 label
=_("Enable"))),
11245 TextAscii(title
=_("LUN name")),
11249 register_check_parameters(
11250 RulespecGroupCheckParametersApplications
,
11252 _("Windows Services"),
11253 Dictionary(elements
=[
11254 ("additional_servicenames",
11256 title
=_("Alternative names for the service"),
11257 help=_("Here you can specify alternative names that the service might have. "
11258 "This helps when the exact spelling of the services can changed from "
11259 "one version to another."),
11264 orientation
="horizontal",
11267 title
=_("Expected state"),
11268 default_value
="running",
11270 _("ignore the state")), ("running",
11271 _("running")), ("stopped",
11274 title
=_("Start type"),
11275 default_value
="auto",
11277 (None, _("ignore the start type")),
11280 ("disabled", _("disabled")),
11281 ("auto", _("auto")),
11282 ("unknown", _("unknown (old agent)")),
11284 MonitoringState(title
=_("Resulting state"),),
11286 default_value
=("running", "auto", 0)),
11287 title
=_("Services states"),
11288 help=_("You can specify a separate monitoring state for each possible "
11289 "combination of service state and start type. If you do not use "
11290 "this parameter, then only running/auto will be assumed to be OK."),
11294 title
=_("State if no entry matches"),
11300 title
=_("Add custom icon or action"),
11301 help=_("You can assign icons or actions to the found services in the status GUI."),
11305 title
=_("Name of the service"),
11306 help=_("Please Please note, that the agent replaces spaces in "
11307 "the service names with underscores. If you are unsure about the "
11308 "correct spelling of the name then please look at the output of "
11309 "the agent (cmk -d HOSTNAME). The service names are in the first "
11310 "column of the section <<<services>>>. Please "
11311 "do not mix up the service name with the display name of the service."
11312 "The latter one is just being displayed as a further information."),
11313 allow_empty
=False),
11317 register_check_parameters(
11318 RulespecGroupCheckParametersApplications
,
11319 "solaris_services",
11320 _("Solaris Services"),
11323 ("additional_servicenames",
11325 title
=_("Alternative names for the service"),
11326 help=_("Here you can specify alternative names that the service might have. "
11327 "This helps when the exact spelling of the services can changed from "
11328 "one version to another."),
11333 orientation
="horizontal",
11336 title
=_("Expected state"),
11338 (None, _("Ignore the state")),
11339 ("online", _("Online")),
11340 ("disabled", _("Disabled")),
11341 ("maintenance", _("Maintenance")),
11342 ("legacy_run", _("Legacy run")),
11347 (None, _("Ignore")),
11348 (True, _("Has changed")),
11349 (False, _("Did not changed")),
11351 MonitoringState(title
=_("Resulting state"),),
11354 title
=_("Services states"),
11355 help=_("You can specify a separate monitoring state for each possible "
11356 "combination of service state. If you do not use this parameter, "
11357 "then only online/legacy_run will be assumed to be OK."),
11359 ("else", MonitoringState(
11360 title
=_("State if no entry matches"),
11364 TextAscii(title
=_("Name of the service"), allow_empty
=False),
11368 register_check_parameters(
11369 RulespecGroupCheckParametersApplications
,
11370 "winperf_ts_sessions",
11371 _("Windows Terminal Server Sessions"),
11373 help=_("This check monitors number of active and inactive terminal "
11374 "server sessions."),
11379 title
=_("Number of active sessions"),
11381 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=100),
11382 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=200),
11389 title
=_("Number of inactive sessions"),
11390 help=_("Levels for the number of sessions that are currently inactive"),
11392 Integer(title
=_("Warning at"), unit
=_("sessions"), default_value
=10),
11393 Integer(title
=_("Critical at"), unit
=_("sessions"), default_value
=20),
11402 register_check_parameters(
11403 RulespecGroupCheckParametersStorage
, "raid", _("RAID: overall state"), None,
11405 title
=_("Name of the device"),
11406 help=_("For Linux MD specify the device name without the "
11407 "<tt>/dev/</tt>, e.g. <tt>md0</tt>, for hardware raids "
11408 "please refer to the manual of the actual check being used.")), "first")
11410 register_check_parameters(
11411 RulespecGroupCheckParametersStorage
, "raid_summary", _("RAID: summary state"),
11412 Dictionary(elements
=[
11413 ("use_device_states",
11415 title
=_("Use device states and overwrite expected status"),
11417 (False, _("Ignore")),
11418 (True, _("Use device states")),
11420 default_value
=True,
11424 register_check_parameters(
11425 RulespecGroupCheckParametersStorage
, "raid_disk", _("RAID: state of a single disk"),
11427 Dictionary(elements
=[
11431 title
=_("Expected state"),
11432 help=_("State the disk is expected to be in. Typical good states "
11433 "are online, host spare, OK and the like. The exact way of how "
11434 "to specify a state depends on the check and hard type being used. "
11435 "Please take examples from discovered checks for reference.")),
11437 ("use_device_states",
11439 title
=_("Use device states and overwrite expected status"),
11441 (False, _("Ignore")),
11442 (True, _("Use device states")),
11444 default_value
=True,
11447 forth
=lambda x
: isinstance(x
, str) and {"expected_state": x
} or x
,
11450 title
=_("Number or ID of the disk"),
11451 help=_("How the disks are named depends on the type of hardware being "
11452 "used. Please look at already discovered checks for examples.")), "first")
11454 register_check_parameters(
11455 RulespecGroupCheckParametersStorage
, "pfm_health", _("PCIe flash module"),
11459 "health_lifetime_perc",
11461 title
=_("Lower levels for health lifetime"),
11463 Percentage(title
=_("Warning if below"), default_value
=10),
11464 Percentage(title
=_("Critical if below"), default_value
=5)
11470 title
=_("Number or ID of the disk"),
11471 help=_("How the disks are named depends on the type of hardware being "
11472 "used. Please look at already discovered checks for examples.")), "dict")
11474 register_check_parameters(
11475 RulespecGroupCheckParametersEnvironment
,
11477 _("Switch contact state"),
11479 help=_("This rule sets the required state of a switch contact"),
11480 label
=_("Required switch contact state"),
11482 ("open", "Switch contact is <b>open</b>"),
11483 ("closed", "Switch contact is <b>closed</b>"),
11484 ("ignore", "Ignore switch contact state"),
11487 TextAscii(title
=_("Sensor"), allow_empty
=False),
11488 match_type
="first",
11491 register_check_parameters(
11492 RulespecGroupCheckParametersEnvironment
,
11494 _("State of PDU Plugs"),
11496 help=_("This rule sets the required state of a PDU plug. It is meant to "
11497 "be independent of the hardware manufacturer."),
11498 title
=_("Required plug state"),
11500 ("on", _("Plug is ON")),
11501 ("off", _("Plug is OFF")),
11503 default_value
="on"),
11505 title
=_("Plug item number or name"),
11507 _("Whether you need the number or the name depends on the check. Just take a look to the service description."
11510 match_type
="first",
11513 # New temperature rule for modern temperature checks that have the
11514 # sensor type (e.g. "CPU", "Chassis", etc.) as the beginning of their
11515 # item (e.g. "CPU 1", "Chassis 17/11"). This will replace all other
11516 # temperature rulesets in future. Note: those few temperature checks
11517 # that do *not* use an item, need to be converted to use one single
11518 # item (other than None).
11519 register_check_parameters(
11520 RulespecGroupCheckParametersEnvironment
,
11524 Dictionary(elements
=[
11527 title
=_("Upper Temperature Levels"),
11529 Float(title
=_("Warning at"), unit
=u
"°C", default_value
=26),
11530 Float(title
=_("Critical at"), unit
=u
"°C", default_value
=30),
11534 title
=_("Lower Temperature Levels"),
11536 Float(title
=_("Warning below"), unit
=u
"°C", default_value
=0),
11537 Float(title
=_("Critical below"), unit
=u
"°C", default_value
=-10),
11541 title
=_("Display values in "),
11543 ("c", _("Celsius")),
11544 ("f", _("Fahrenheit")),
11545 ("k", _("Kelvin")),
11549 title
=_("Override unit of sensor"),
11550 help=_("In some rare cases the unit that is signalled by the sensor "
11551 "is wrong and e.g. the sensor sends values in Fahrenheit while "
11552 "they are misinterpreted as Celsius. With this setting you can "
11553 "force the reading of the sensor to be interpreted as customized. "),
11555 ("c", _("Celsius")),
11556 ("f", _("Fahrenheit")),
11557 ("k", _("Kelvin")),
11559 ("device_levels_handling",
11561 title
=_("Interpretation of the device's own temperature status"),
11563 ("usr", _("Ignore device's own levels")),
11564 ("dev", _("Only use device's levels, ignore yours")),
11565 ("best", _("Use least critical of your and device's levels")),
11566 ("worst", _("Use most critical of your and device's levels")),
11567 ("devdefault", _("Use device's levels if present, otherwise yours")),
11568 ("usrdefault", _("Use your own levels if present, otherwise the device's")),
11570 default_value
="usrdefault",
11575 title
=_("Trend computation"),
11576 label
=_("Enable trend computation"),
11580 title
=_("Observation period for temperature trend computation"),
11583 unit
=_("minutes"))),
11586 title
=_("Levels on temperature increase per period"),
11589 title
=_("Warning at"),
11590 unit
=u
"°C / " + _("period"),
11593 title
=_("Critical at"),
11594 unit
=u
"°C / " + _("period"),
11597 ("trend_levels_lower",
11599 title
=_("Levels on temperature decrease per period"),
11602 title
=_("Warning at"),
11603 unit
=u
"°C / " + _("period"),
11606 title
=_("Critical at"),
11607 unit
=u
"°C / " + _("period"),
11613 _("Levels on the time left until a critical temperature (upper or lower) is reached"
11617 title
=_("Warning if below"),
11622 title
=_("Critical if below"),
11628 optional_keys
=["trend_levels", "trend_levels_lower", "trend_timeleft"],
11632 forth
=lambda v
: isinstance(v
, tuple) and {"levels": v
} or v
,
11634 TextAscii(title
=_("Sensor ID"), help=_("The identifier of the thermal sensor.")),
11638 register_check_parameters(
11639 RulespecGroupCheckParametersEnvironment
,
11640 "room_temperature",
11641 _("Room temperature (external thermal sensors)"),
11643 help=_("Temperature levels for external thermometers that are used "
11644 "for monitoring the temperature of a datacenter. An example "
11645 "is the webthem from W&T."),
11647 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=26),
11648 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=30),
11650 TextAscii(title
=_("Sensor ID"), help=_("The identifier of the thermal sensor.")),
11655 register_check_parameters(
11656 RulespecGroupCheckParametersEnvironment
,
11657 "hw_single_temperature",
11658 _("Host/Device temperature"),
11660 help=_("Temperature levels for hardware devices with "
11661 "a single temperature sensor."),
11663 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=35),
11664 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=40),
11671 register_check_parameters(
11672 RulespecGroupCheckParametersEnvironment
, "evolt",
11673 _("Voltage levels (UPS / PDU / Other Devices)"),
11675 help=_("Voltage Levels for devices like UPS or PDUs. "
11676 "Several phases may be addressed independently."),
11678 Integer(title
=_("warning if below"), unit
="V", default_value
=210),
11679 Integer(title
=_("critical if below"), unit
="V", default_value
=180),
11681 TextAscii(title
=_("Phase"),
11682 help=_("The identifier of the phase the power is related to.")), "first")
11684 register_check_parameters(
11685 RulespecGroupCheckParametersEnvironment
, "efreq", _("Nominal Frequencies"),
11687 help=_("Levels for the nominal frequencies of AC devices "
11688 "like UPSs or PDUs. Several phases may be addressed independently."),
11690 Integer(title
=_("warning if below"), unit
="Hz", default_value
=40),
11691 Integer(title
=_("critical if below"), unit
="Hz", default_value
=45),
11693 TextAscii(title
=_("Phase"), help=_("The identifier of the phase the power is related to.")),
11696 register_check_parameters(
11697 RulespecGroupCheckParametersEnvironment
, "epower", _("Electrical Power"),
11699 help=_("Levels for the electrical power consumption of a device "
11700 "like a UPS or a PDU. Several phases may be addressed independently."),
11702 Integer(title
=_("warning if below"), unit
="Watt", default_value
=20),
11703 Integer(title
=_("critical if below"), unit
="Watt", default_value
=1),
11705 TextAscii(title
=_("Phase"), help=_("The identifier of the phase the power is related to.")),
11708 register_check_parameters(
11709 RulespecGroupCheckParametersEnvironment
, "ups_out_load",
11710 _("Parameters for output loads of UPSs and PDUs"),
11712 Integer(title
=_("warning at"), unit
=u
"%", default_value
=85),
11713 Integer(title
=_("critical at"), unit
=u
"%", default_value
=90),
11714 ]), TextAscii(title
=_("Phase"), help=_("The identifier of the phase the power is related to.")),
11717 register_check_parameters(
11718 RulespecGroupCheckParametersEnvironment
, "epower_single",
11719 _("Electrical Power for Devices with only one phase"),
11721 help=_("Levels for the electrical power consumption of a device "),
11723 Integer(title
=_("warning if at"), unit
="Watt", default_value
=300),
11724 Integer(title
=_("critical if at"), unit
="Watt", default_value
=400),
11727 register_check_parameters(
11728 RulespecGroupCheckParametersEnvironment
,
11730 _("Hardware temperature, multiple sensors"),
11732 help=_("Temperature levels for hardware devices like "
11733 "Brocade switches with (potentially) several "
11734 "temperature sensors. Sensor IDs can be selected "
11737 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=35),
11738 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=40),
11740 TextAscii(title
=_("Sensor ID"), help=_("The identifier of the thermal sensor.")),
11745 register_check_parameters(
11746 RulespecGroupCheckParametersEnvironment
,
11747 "hw_temperature_single",
11748 _("Hardware temperature, single sensor"),
11750 help=_("Temperature levels for hardware devices like "
11751 "DELL Powerconnect that have just one temperature sensor. "),
11753 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=35),
11754 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=40),
11761 register_check_parameters(
11762 RulespecGroupCheckParametersEnvironment
,
11763 "disk_temperature",
11764 _("Harddisk temperature (e.g. via SMART)"),
11766 help=_("Temperature levels for hard disks, that is determined e.g. via SMART"),
11768 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=35),
11769 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=40),
11772 title
=_("Hard disk device"),
11773 help=_("The identificator of the hard disk device, e.g. <tt>/dev/sda</tt>.")),
11778 register_check_parameters(
11779 RulespecGroupCheckParametersEnvironment
, "eaton_enviroment",
11780 _("Temperature and Humidity for Eaton UPS"),
11781 Dictionary(elements
=[
11784 title
=_("Temperature"),
11786 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=26),
11787 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=30),
11791 title
=_("Remote Temperature"),
11793 Integer(title
=_("warning at"), unit
=u
"°C", default_value
=26),
11794 Integer(title
=_("critical at"), unit
=u
"°C", default_value
=30),
11798 title
=_("Humidity"),
11800 Integer(title
=_("warning at"), unit
=u
"%", default_value
=60),
11801 Integer(title
=_("critical at"), unit
=u
"%", default_value
=75),
11808 title
=_("Voltage"),
11810 Integer(title
=_("warning if below"), unit
=u
"V", default_value
=210),
11811 Integer(title
=_("critical if below"), unit
=u
"V", default_value
=200),
11818 Integer(title
=_("warning at"), unit
=u
"W", default_value
=1000),
11819 Integer(title
=_("critical at"), unit
=u
"W", default_value
=1200),
11824 title
=_("Apparent Power"),
11826 Integer(title
=_("warning at"), unit
=u
"VA", default_value
=1100),
11827 Integer(title
=_("critical at"), unit
=u
"VA", default_value
=1300),
11832 title
=_("Current"),
11834 Integer(title
=_("warning at"), unit
=u
"A", default_value
=5),
11835 Integer(title
=_("critical at"), unit
=u
"A", default_value
=10),
11840 title
=_("Frequency"),
11842 Integer(title
=_("warning if below"), unit
=u
"Hz", default_value
=45),
11843 Integer(title
=_("critical if below"), unit
=u
"Hz", default_value
=40),
11844 Integer(title
=_("warning if above"), unit
=u
"Hz", default_value
=55),
11845 Integer(title
=_("critical if above"), unit
=u
"Hz", default_value
=60),
11848 ("differential_current_ac",
11850 title
=_("Differential current AC"),
11852 Float(title
=_("warning at"), unit
=u
"mA", default_value
=3.5),
11853 Float(title
=_("critical at"), unit
=u
"mA", default_value
=30),
11856 ("differential_current_dc",
11858 title
=_("Differential current DC"),
11860 Float(title
=_("warning at"), unit
=u
"mA", default_value
=70),
11861 Float(title
=_("critical at"), unit
=u
"mA", default_value
=100),
11866 register_check_parameters(
11867 RulespecGroupCheckParametersEnvironment
, "ups_outphase",
11868 _("Parameters for output phases of UPSs and PDUs"),
11870 help=_("This rule allows you to specify levels for the voltage, current, load, power "
11871 "and apparent power of your device. The levels will only be applied if the device "
11872 "actually supplies values for these parameters."),
11873 elements
=phase_elements
+ [
11878 Integer(title
=_("warning at"), unit
=u
"%", default_value
=80),
11879 Integer(title
=_("critical at"), unit
=u
"%", default_value
=90),
11881 ("map_device_states",
11883 Tuple(elements
=[TextAscii(size
=10), MonitoringState()]),
11884 title
=_("Map device state"),
11885 help=_("Here you can enter either device state number (eg. from SNMP devices) "
11886 "or exact device state name and the related monitoring state."),
11890 title
=_("Output Name"),
11891 help=_("The name of the output, e.g. <tt>Phase 1</tt>/<tt>PDU 1</tt>")), "dict")
11893 register_check_parameters(
11894 RulespecGroupCheckParametersEnvironment
, "el_inphase",
11895 _("Parameters for input phases of UPSs and PDUs"),
11897 help=_("This rule allows you to specify levels for the voltage, current, power "
11898 "and apparent power of your device. The levels will only be applied if the device "
11899 "actually supplies values for these parameters."),
11900 elements
=phase_elements
+ [
11901 ("map_device_states",
11903 Tuple(elements
=[TextAscii(size
=10), MonitoringState()]),
11904 title
=_("Map device state"),
11905 help=_("Here you can enter either device state number (eg. from SNMP devices) "
11906 "or exact device state name and the related monitoring state."),
11909 ), TextAscii(title
=_("Input Name"), help=_("The name of the input, e.g. <tt>Phase 1</tt>")),
11912 register_check_parameters(
11913 RulespecGroupCheckParametersEnvironment
,
11915 _("FAN speed of Hardware devices"),
11921 help=_("Lower levels for the fan speed of a hardware device"),
11922 title
=_("Lower levels"),
11924 Integer(title
=_("warning if below"), unit
=u
"rpm"),
11925 Integer(title
=_("critical if below"), unit
=u
"rpm"),
11931 help=_("Upper levels for the fan speed of a hardware device"),
11932 title
=_("Upper levels"),
11934 Integer(title
=_("warning at"), unit
=u
"rpm", default_value
=8000),
11935 Integer(title
=_("critical at"), unit
=u
"rpm", default_value
=8400),
11939 Checkbox(title
=_("Performance data"), label
=_("Enable performance data"))),
11941 optional_keys
=["upper"],
11943 TextAscii(title
=_("Fan Name"), help=_("The identificator of the fan.")),
11947 register_check_parameters(
11948 RulespecGroupCheckParametersEnvironment
,
11950 _("Fan speed of hardware devices (in percent)"),
11951 Dictionary(elements
=[
11954 title
=_("Upper fan speed levels"),
11956 Percentage(title
=_("warning if at")),
11957 Percentage(title
=_("critical if at")),
11961 title
=_("Lower fan speed levels"),
11963 Percentage(title
=_("warning if below")),
11964 Percentage(title
=_("critical if below")),
11967 TextAscii(title
=_("Fan Name"), help=_("The identifier of the fan.")),
11971 register_check_parameters(
11972 RulespecGroupCheckParametersOperatingSystem
,
11974 _("Number of used states of OpenBSD PF engine"),
11980 title
=_("Limits for the number of used states"),
11982 Integer(title
=_("warning at")),
11983 Integer(title
=_("critical at")),
11987 optional_keys
=[None],
11993 register_check_parameters(
11994 RulespecGroupCheckParametersEnvironment
,
11996 _("Levels for Gude PDU Devices"),
11997 Dictionary(elements
=[
12000 title
=_("Total accumulated Active Energy of Power Channel"),
12002 Integer(title
=_("warning at"), unit
=_("kW")),
12003 Integer(title
=_("critical at"), unit
=_("kW")),
12007 title
=_("Active Power"),
12009 Integer(title
=_("warning at"), unit
=_("W")),
12010 Integer(title
=_("critical at"), unit
=_("W")),
12014 title
=_("Current on Power Channel"),
12016 Integer(title
=_("warning at"), unit
=_("A")),
12017 Integer(title
=_("critical at"), unit
=_("A")),
12021 title
=_("Voltage on Power Channel"),
12023 Integer(title
=_("warning if below"), unit
=_("V")),
12024 Integer(title
=_("critical if below"), unit
=_("V")),
12028 title
=_("Line Mean Apparent Power"),
12030 Integer(title
=_("warning at"), unit
=_("VA")),
12031 Integer(title
=_("critical at"), unit
=_("VA")),
12034 TextAscii(title
=_("Phase Number"), help=_("The Number of the power Phase.")),
12038 register_check_parameters(
12039 RulespecGroupCheckParametersEnvironment
, "hostsystem_sensors", _("Hostsystem sensor alerts"),
12042 help=_("This rule allows to override alert levels for the given sensor names."),
12044 ("name", TextAscii(title
=_("Sensor name"))),
12047 title
=_("Custom states"),
12048 elements
=[(element
,
12050 title
="Sensor %s" % description
,
12051 label
=_("Set state to"),
12052 default_value
=int(element
)))
12053 for (element
, description
) in [("0", _("OK")), (
12054 "1", _("WARNING")), ("2", _("CRITICAL")), ("3", _("UNKNOWN"))]],
12057 optional_keys
=False),
12058 add_label
=_("Add sensor name")), None, "first")
12060 register_check_parameters(
12061 RulespecGroupCheckParametersEnvironment
, "netapp_instance", _("Netapp Instance State"),
12064 help=_("This rule allows you to override netapp warnings"),
12065 elements
=[("name", TextAscii(title
=_("Warning starts with"))),
12066 ("state", MonitoringState(title
="Set state to", default_value
=1))],
12067 optional_keys
=False),
12068 add_label
=_("Add warning")), None, "first")
12070 register_check_parameters(
12071 RulespecGroupCheckParametersEnvironment
,
12072 "temperature_auto",
12073 _("Temperature sensors with builtin levels"),
12075 TextAscii(title
=_("Sensor ID"), help=_("The identificator of the thermal sensor.")),
12080 register_check_parameters(
12081 RulespecGroupCheckParametersEnvironment
,
12082 "temperature_trends",
12083 _("Temperature trends for devices with builtin levels"),
12085 title
=_("Temperature Trend Analysis"),
12087 "This rule enables and configures a trend analysis and corresponding limits for devices, "
12088 "which have their own limits configured on the device. It will only work for supported "
12089 "checks, right now the <tt>adva_fsp_temp</tt> check."),
12094 title
=_("Time range for temperature trend computation"),
12097 unit
=_("minutes")),
12098 title
=_("Trend computation"),
12099 label
=_("Enable trend computation"))),
12102 title
=_("Levels on trends in degrees Celsius per time range"),
12104 Integer(title
=_("Warning at"), unit
=u
"°C / " + _("range"), default_value
=5),
12105 Integer(title
=_("Critical at"), unit
=u
"°C / " + _("range"), default_value
=10)
12109 title
=_("Levels on the time left until limit is reached"),
12112 title
=_("Warning if below"),
12117 title
=_("Critical if below"),
12123 TextAscii(title
=_("Sensor ID"), help=_("The identifier of the thermal sensor.")),
12127 ntp_params
= Tuple(
12128 title
=_("Thresholds for quality of time"),
12131 title
=_("Critical at stratum"),
12134 "The stratum (\"distance\" to the reference clock) at which the check gets critical."
12138 title
=_("Warning at"),
12140 default_value
=200.0,
12141 help=_("The offset in ms at which a warning state is triggered."),
12144 title
=_("Critical at"),
12146 default_value
=500.0,
12147 help=_("The offset in ms at which a critical state is triggered."),
12151 register_check_parameters(
12152 RulespecGroupCheckParametersOperatingSystem
, "ntp_time", _("State of NTP time synchronisation"),
12154 Dictionary(elements
=[
12161 title
=_("Phases without synchronization"),
12164 title
=_("Warning at"),
12165 display
=["hours", "minutes"],
12169 title
=_("Critical at"),
12170 display
=["hours", "minutes"],
12171 default_value
=3600,
12175 forth
=lambda params
: isinstance(params
, tuple) and {"ntp_levels": params
} or params
), None,
12178 register_check_parameters(RulespecGroupCheckParametersOperatingSystem
, "ntp_peer",
12179 _("State of NTP peer"), ntp_params
,
12180 TextAscii(title
=_("Name of the peer")), "first")
12182 register_check_parameters(
12183 RulespecGroupCheckParametersEnvironment
,
12185 _("Smoke Detection"),
12187 help=_("For devices which measure smoke in percent"),
12189 Percentage(title
=_("Warning at"), allow_int
=True, default_value
=1),
12190 Percentage(title
=_("Critical at"), allow_int
=True, default_value
=5),
12192 TextAscii(title
=_("Sensor ID"), help=_("The identifier of the sensor.")),
12196 register_check_parameters(
12197 RulespecGroupCheckParametersEnvironment
,
12199 _("APC Automatic Transfer Switch Output"),
12201 title
=_("Levels for ATS Output parameters"),
12202 optional_keys
=True,
12204 ("output_voltage_max",
12206 title
=_("Maximum Levels for Voltage"),
12208 Integer(title
=_("Warning at"), unit
="Volt"),
12209 Integer(title
=_("Critical at"), unit
="Volt"),
12211 ("output_voltage_min",
12213 title
=_("Minimum Levels for Voltage"),
12215 Integer(title
=_("Warning if below"), unit
="Volt"),
12216 Integer(title
=_("Critical if below"), unit
="Volt"),
12220 title
=_("Maximum Levels for load in percent"),
12222 Percentage(title
=_("Warning at")),
12223 Percentage(title
=_("Critical at")),
12227 title
=_("Minimum Levels for load in percent"),
12229 Percentage(title
=_("Warning if below")),
12230 Percentage(title
=_("Critical if below")),
12234 TextAscii(title
=_("ID of phase")),
12238 register_check_parameters(
12239 RulespecGroupCheckParametersEnvironment
,
12241 _("Airflow levels"),
12243 title
=_("Levels for airflow"),
12247 title
=_("Lower levels"),
12250 title
=_("Warning if below"),
12255 title
=_("Critical if below"),
12262 title
=_("Upper levels"),
12265 title
=_("Warning at"), unit
=_("l/s"), default_value
=10.0, allow_int
=True),
12267 title
=_("Critical at"), unit
=_("l/s"), default_value
=11.0, allow_int
=True)
12274 register_check_parameters(
12275 RulespecGroupCheckParametersEnvironment
,
12279 title
=_("Levels for battery parameters"),
12280 optional_keys
=False,
12284 title
=_("Battery capacity"),
12287 title
=_("Warning at"),
12289 _("The battery capacity in percent at and below which a warning state is triggered"
12295 title
=_("Critical at"),
12297 _("The battery capacity in percent at and below which a critical state is triggered"
12308 title
=_("Time left on battery"),
12311 title
=_("Warning at"),
12313 _("Time left on Battery at and below which a warning state is triggered"
12319 title
=_("Critical at"),
12321 _("Time Left on Battery at and below which a critical state is triggered"
12334 register_check_parameters(
12335 RulespecGroupCheckParametersApplications
,
12336 "mbg_lantime_state",
12337 _("Meinberg Lantime State"),
12339 title
=_("Meinberg Lantime State"),
12343 title
=_("Warning levels for Stratum"),
12346 title
=_("Warning at"),
12350 title
=_("Critical at"),
12356 title
=_("Warning levels for Time Offset"),
12359 title
=_("Warning at"),
12360 unit
=_("microseconds"),
12364 title
=_("Critical at"),
12365 unit
=_("microseconds"),
12374 register_check_parameters(
12375 RulespecGroupCheckParametersApplications
, "sansymphony_pool", _("Sansymphony: pool allocation"),
12377 help=_("This rule sets the warn and crit levels for the percentage of allocated pools"),
12380 title
=_("Warning at"),
12385 title
=_("Critical at"),
12389 ]), TextAscii(title
=_("Name of the pool"),), "first")
12391 register_check_parameters(
12392 RulespecGroupCheckParametersApplications
, "sansymphony_alerts",
12393 _("Sansymphony: Number of unacknowlegded alerts"),
12395 help=_("This rule sets the warn and crit levels for the number of unacknowlegded alerts"),
12398 title
=_("Warning at"),
12403 title
=_("Critical at"),
12409 register_check_parameters(
12410 RulespecGroupCheckParametersApplications
, "jvm_threads", _("JVM threads"),
12412 help=_("This rule sets the warn and crit levels for the number of threads "
12413 "running in a JVM."),
12416 title
=_("Warning at"),
12421 title
=_("Critical at"),
12427 title
=_("Name of the virtual machine"),
12428 help=_("The name of the application server"),
12432 register_check_parameters(
12433 RulespecGroupCheckParametersApplications
,
12434 "sym_brightmail_queues",
12435 "Symantec Brightmail Queues",
12437 help=_("This check is used to monitor successful email delivery through "
12438 "Symantec Brightmail Scanner appliances."),
12442 title
=_("Number of connections"),
12444 Integer(title
=_("Warning at")),
12445 Integer(title
=_("Critical at")),
12449 title
=_("Number of messages delivered"),
12451 Integer(title
=_("Warning at")),
12452 Integer(title
=_("Critical at")),
12456 title
=_("Amount of data processed"),
12458 Integer(title
=_("Warning at")),
12459 Integer(title
=_("Cricital at")),
12463 title
=_("Number of messages currently queued"),
12465 Integer(title
=_("Warning at")),
12466 Integer(title
=_("Critical at")),
12470 title
=_("Size of the queue"),
12472 Integer(title
=_("Warning at")),
12473 Integer(title
=_("Critical at")),
12475 ("deferredMessages",
12477 title
=_("Number of messages in deferred state"),
12479 Integer(title
=_("Warning at")),
12480 Integer(title
=_("Critical at")),
12484 TextAscii(title
=_("Instance name"), allow_empty
=True),
12488 register_check_parameters(
12489 RulespecGroupCheckParametersApplications
, "db2_logsize", _("DB2 logfile usage"),
12490 Dictionary(elements
=[(
12493 get_free_used_dynamic_valuespec("free", "logfile", default_value
=(20.0, 10.0)),
12494 title
=_("Logfile levels"),
12496 forth
=transform_filesystem_free
,
12497 back
=transform_filesystem_free
))]),
12499 title
=_("Instance"), help=_("DB2 instance followed by database name, e.g db2taddm:CMDBS1")),
12502 register_check_parameters(
12503 RulespecGroupCheckParametersApplications
,
12504 "db2_sortoverflow",
12505 _("DB2 Sort Overflow"),
12507 help=_("This rule allows you to set percentual limits for sort overflows."),
12512 title
=_("Overflows"),
12514 Percentage(title
=_("Warning at"), unit
=_("%"), default_value
=2.0),
12515 Percentage(title
=_("Critical at"), unit
=_("%"), default_value
=4.0),
12521 title
=_("Instance"), help=_("DB2 instance followed by database name, e.g db2taddm:CMDBS1")),
12525 register_check_parameters(
12526 RulespecGroupCheckParametersApplications
, "db2_tablespaces", _("DB2 Tablespaces"),
12528 help=_("A tablespace is a container for segments (tables, indexes, etc). A "
12529 "database consists of one or more tablespaces, each made up of one or "
12530 "more data files. Tables and indexes are created within a particular "
12532 "This rule allows you to define checks on the size of tablespaces."),
12533 elements
=db_levels_common
,
12536 title
=_("Instance"),
12537 help=_("The instance name, the database name and the tablespace name combined "
12538 "like this db2wps8:WPSCOMT8.USERSPACE1")), "dict")
12540 register_check_parameters(
12541 RulespecGroupCheckParametersApplications
, "db2_connections", _("DB2 Connections"),
12543 help=_("This rule allows you to set limits for the maximum number of DB2 connections"),
12548 title
=_("Number of current connections"),
12550 Integer(title
=_("Warning at"), unit
=_("connections"), default_value
=150),
12551 Integer(title
=_("Critical at"), unit
=_("connections"), default_value
=200),
12557 title
=_("Instance"), help=_("DB2 instance followed by database name, e.g db2taddm:CMDBS1")),
12560 register_check_parameters(
12561 RulespecGroupCheckParametersApplications
,
12565 help=_("This rule allows you to configure limits for the deadlocks and lockwaits "
12566 "counters of a DB2."),
12571 title
=_("Deadlocks"),
12573 Float(title
=_("Warning at"), unit
=_("deadlocks/sec")),
12574 Float(title
=_("Critical at"), unit
=_("deadlocks/sec")),
12581 title
=_("Lockwaits"),
12583 Float(title
=_("Warning at"), unit
=_("lockwaits/sec")),
12584 Float(title
=_("Critical at"), unit
=_("lockwaits/sec")),
12590 title
=_("Instance"), help=_("DB2 instance followed by database name, e.g db2taddm:CMDBS1")),
12594 register_check_parameters(
12595 RulespecGroupCheckParametersApplications
, "db2_backup",
12596 _("DB2 Time since last database Backup"),
12599 Age(title
=_("Warning at"),
12600 display
=["days", "hours", "minutes"],
12601 default_value
=86400 * 14),
12602 Age(title
=_("Critical at"),
12603 display
=["days", "hours", "minutes"],
12604 default_value
=86400 * 28)
12606 title
=_("Specify time since last successful backup"),
12609 title
=_("Instance"),
12610 help=_("DB2 instance followed by database name, e.g db2taddm:CMDBS1")), "first")
12612 register_check_parameters(
12613 RulespecGroupCheckParametersApplications
, "db2_mem", _("Memory levels for DB2 memory usage"),
12616 Percentage(title
=_("Warning if less than"), unit
=_("% memory left")),
12617 Percentage(title
=_("Critical if less than"), unit
=_("% memory left")),
12618 ],), TextAscii(title
=_("Instance name"), allow_empty
=True), "first")
12620 register_check_parameters(
12621 RulespecGroupCheckParametersApplications
, "windows_updates", _("WSUS (Windows Updates)"),
12623 title
=_("Parameters for the Windows Update Check with WSUS"),
12624 help=_("Set the according numbers to 0 if you want to disable alerting."),
12626 Integer(title
=_("Warning if at least this number of important updates are pending")),
12627 Integer(title
=_("Critical if at least this number of important updates are pending")),
12628 Integer(title
=_("Warning if at least this number of optional updates are pending")),
12629 Integer(title
=_("Critical if at least this number of optional updates are pending")),
12630 Age(title
=_("Warning if time until forced reboot is less then"), default_value
=604800),
12631 Age(title
=_("Critical if time time until forced reboot is less then"),
12632 default_value
=172800),
12633 Checkbox(title
=_("display all important updates verbosely"), default_value
=True),
12637 synology_update_states
= [
12639 (2, "Unavailable"),
12640 (4, "Disconnected"),
12644 register_check_parameters(
12645 RulespecGroupCheckParametersApplications
,
12647 _("Synology Updates"),
12649 title
=_("Update State"),
12653 title
=_("States which result in OK"),
12654 choices
=synology_update_states
,
12655 default_value
=[2])),
12658 title
=_("States which result in Warning"),
12659 choices
=synology_update_states
,
12660 default_value
=[5])),
12663 title
=_("States which result in Critical"),
12664 choices
=synology_update_states
,
12665 default_value
=[1, 4])),
12667 optional_keys
=None,
12673 register_check_parameters(
12674 RulespecGroupCheckParametersApplications
, "antivir_update_age",
12675 _("Age of last AntiVirus update"),
12677 title
=_("Age of last AntiVirus update"),
12679 Age(title
=_("Warning level for time since last update")),
12680 Age(title
=_("Critical level for time since last update")),
12683 register_check_parameters(RulespecGroupCheckParametersApplications
,
12685 _('Logwatch Event Console Forwarding'),
12687 title
= _("Forwarding"),
12688 help = _("Instead of using the regular logwatch check all lines received by logwatch can "
12689 "be forwarded to a Check_MK event console daemon to be processed. The target event "
12690 "console can be configured for each host in a separate rule."),
12691 style
= "dropdown",
12695 totext
= _("Messages are handled by logwatch."),
12696 title
= _("No forwarding"),
12699 title
= _('Forward Messages to Event Console'),
12701 ('method', Transform(
12702 # TODO: Clean this up to some CascadingDropdown()
12704 style
= "dropdown",
12705 title
= _("Forwarding Method"),
12709 title
= _("Local: Send events to local Event Console in same OMD site"),
12710 totext
= _("Directly forward to Event Console"),
12713 title
= _("Local: Send events to local Event Console into unix socket"),
12714 allow_empty
= False,
12719 title
= _("Local: Spooling - Send events to local event console in same OMD site"),
12720 totext
= _("Spool to Event Console"),
12724 title
= _("Local: Spooling - Send events to local Event Console into given spool directory"),
12725 allow_empty
= False,
12726 forth
= lambda x
: x
[6:], # remove prefix
12727 back
= lambda x
: "spool:" + x
, # add prefix
12730 title
= _("Remote: Send events to remote syslog host"),
12732 ("tcp", _("Send via TCP"), Dictionary(
12734 ("address", TextAscii(
12735 title
= _("Address"),
12736 allow_empty
= False,
12740 allow_empty
= False,
12741 default_value
= 514,
12746 ("spool", Dictionary(
12747 title
= _("Spool messages that could not be sent"),
12748 help = _("Messages that can not be forwarded, e.g. when the target Event Console is "
12749 "not running, can temporarily be stored locally. Forwarding is tried again "
12750 "on next execution. When messages are spooled, the check will go into WARNING "
12751 "state. In case messages are dropped by the rules below, the check will shortly "
12752 "go into CRITICAL state for this execution."),
12755 title
= _("Maximum spool duration"),
12756 help = _("Messages that are spooled longer than this time will be thrown away."),
12757 default_value
= 60*60*24*7, # 1 week should be fine (if size is not exceeded)
12759 ("max_size", Filesize(
12760 title
= _("Maximum spool size"),
12761 help = _("When the total size of spooled messages exceeds this number, the oldest "
12762 "messages of the currently spooled messages is thrown away until the left "
12763 "messages have the half of the maximum size."),
12764 default_value
= 500000, # do not save more than 500k of message
12767 optional_keys
= [],
12770 optional_keys
= [ "spool" ],
12772 ("udp", _("Send via UDP"), Dictionary(
12774 ("address", TextAscii(
12775 title
= _("Address"),
12776 allow_empty
= False,
12780 allow_empty
= False,
12781 default_value
= 514,
12787 optional_keys
= [],
12792 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)))
12794 # migrate old (tcp, address, port) tuple to new dict
12795 forth
= lambda v
: (v
[0], {"address": v
[1], "port": v
[2]}) if (isinstance(v
, tuple) and not isinstance(v
[1], dict)) else v
,
12797 ('facility', DropdownChoice(
12798 title
= _("Syslog facility for forwarded messages"),
12799 help = _("When forwarding messages and no facility can be extracted from the "
12800 "message this facility is used."),
12801 choices
= mkeventd
.syslog_facilities
,
12802 default_value
= 17, # local1
12804 ('restrict_logfiles',
12806 title
= _('Restrict Logfiles (Prefix matching regular expressions)'),
12807 help = _("Put the item names of the logfiles here. For example \"System$\" "
12808 "to select the service \"LOG System\". You can use regular expressions "
12809 "which must match the beginning of the logfile name."),
12812 ('monitor_logfilelist',
12814 title
= _("Monitoring of forwarded logfiles"),
12815 label
= _("Warn if list of forwarded logfiles changes"),
12816 help = _("If this option is enabled, the check monitors the list of forwarded "
12817 "logfiles and will warn you if at any time a logfile is missing or exceeding "
12818 "when compared to the initial list that was snapshotted during service detection. "
12819 "Reinventorize this check in order to make it OK again."),
12822 ('expected_logfiles',
12824 title
= _("List of expected logfiles"),
12825 help = _("When the monitoring of forwarded logfiles is enabled, the check verifies that "
12826 "all of the logfiles listed here are reported by the monitored system."),
12829 ('logwatch_reclassify',
12831 title
= _("Reclassify messages before forwarding them to the EC"),
12832 label
= _("Apply logwatch patterns"),
12833 help = _("If this option is enabled, the logwatch lines are first reclassified by the logwatch "
12834 "patterns before they are sent to the event console. If you reclassify specific lines to "
12835 "IGNORE they are not forwarded to the event console. This takes the burden from the "
12836 "event console to process the message itself through all of its rulesets. The reclassifcation "
12837 "of each line takes into account from which logfile the message originates. So you can create "
12838 "logwatch reclassification rules specifically designed for a logfile <i>access.log</i>, "
12839 "which do not apply to other logfiles."),
12842 ('separate_checks',
12844 title
= _("Create a separate check for each logfile"),
12845 label
= _("Separate check"),
12846 help = _("If this option is enabled, there will be one separate check for each logfile found during "
12847 "the service discovery. This option also changes the behaviour for unknown logfiles. "
12848 "The default logwatch check forwards all logfiles to the event console, even logfiles "
12849 "which were not known during the service discovery. Creating one check per logfile changes "
12850 "this behaviour so that any data from unknown logfiles is discarded."),
12854 optional_keys
= ['restrict_logfiles', 'expected_logfiles', 'logwatch_reclassify', 'separate_checks'],
12857 default_value
= '',
12864 RulespecGroupCheckParametersApplications
,
12865 varname
="logwatch_groups",
12866 title
=_('Logfile Grouping Patterns'),
12867 help=_('The check <tt>logwatch</tt> normally creates one service for each logfile. '
12868 'By defining grouping patterns you can switch to the check <tt>logwatch.groups</tt>. '
12869 'If the pattern begins with a tilde then this pattern is interpreted as a regular '
12870 'expression instead of as a filename globbing pattern and <tt>*</tt> and <tt>?</tt> '
12871 'are treated differently. '
12872 'That check monitors a list of logfiles at once. This is useful if you have '
12873 'e.g. a folder with rotated logfiles where the name of the current logfile'
12874 'also changes with each rotation'),
12877 help=_("This defines one logfile grouping pattern"),
12879 orientation
="horizontal",
12881 TextAscii(title
=_("Name of group"),),
12884 orientation
="vertical",
12886 TextAscii(title
=_("Include Pattern")),
12887 TextAscii(title
=_("Exclude Pattern"))
12892 add_label
=_("Add pattern group"),
12898 RulespecGroupCheckParametersNetworking
,
12899 "if_disable_if64_hosts",
12900 title
=_("Hosts forced to use <tt>if</tt> instead of <tt>if64</tt>"),
12901 help=_("A couple of switches with broken firmware report that they "
12902 "support 64 bit counters but do not output any actual data "
12903 "in those counters. Listing those hosts in this rule forces "
12904 "them to use the interface check with 32 bit counters instead."))
12906 # wmic_process does not support inventory at the moment
12907 register_check_parameters(
12908 RulespecGroupCheckParametersApplications
, "wmic_process",
12909 _("Memory and CPU of processes on Windows"),
12913 title
=_("Name of the process"),
12916 Integer(title
=_("Memory warning at"), unit
="MB"),
12917 Integer(title
=_("Memory critical at"), unit
="MB"),
12918 Integer(title
=_("Pagefile warning at"), unit
="MB"),
12919 Integer(title
=_("Pagefile critical at"), unit
="MB"),
12920 Percentage(title
=_("CPU usage warning at")),
12921 Percentage(title
=_("CPU usage critical at")),
12924 title
=_("Process name for usage in the Nagios service description"), allow_empty
=False),
12928 # Add checks that have parameters but are only configured as manual checks
12929 def ps_convert_from_tuple(params
):
12930 if isinstance(params
, (list, tuple)):
12931 if len(params
) == 5:
12932 procname
, warnmin
, okmin
, okmax
, warnmax
= params
12934 elif len(params
) == 6:
12935 procname
, user
, warnmin
, okmin
, okmax
, warnmax
= params
12937 "process": procname
,
12938 "warnmin": warnmin
,
12941 "warnmax": warnmax
,
12943 if user
is not None:
12944 params
["user"] = user
12948 register_check_parameters(
12949 RulespecGroupCheckParametersOperatingSystem
,
12951 _("Zypper Updates"),
12954 match_type
="first",
12957 register_check_parameters(
12958 RulespecGroupCheckParametersOperatingSystem
,
12961 Dictionary(elements
=[
12964 title
=_("State when normal updates are pending"),
12969 title
=_("State when security updates are pending"),
12977 register_check_parameters(
12978 RulespecGroupCheckParametersEnvironment
, "airflow_deviation", _("Airflow Deviation in Percent"),
12980 help=_("Levels for Airflow Deviation measured at airflow sensors "),
12982 Float(title
=_("critical if below or equal"), unit
=u
"%", default_value
=-20),
12983 Float(title
=_("warning if below or equal"), unit
=u
"%", default_value
=-20),
12984 Float(title
=_("warning if above or equal"), unit
=u
"%", default_value
=20),
12985 Float(title
=_("critical if above or equal"), unit
=u
"%", default_value
=20),
12986 ]), TextAscii(title
=_("Detector ID"), help=_("The identifier of the detector.")), "first")
12988 register_check_parameters(
12989 RulespecGroupCheckParametersApplications
,
12991 _("Load of Citrix Server"),
12994 title
=_("Citrix Server load"),
12996 Percentage(title
=_("Warning at"), default_value
=85.0, unit
="percent"),
12997 Percentage(title
=_("Critical at"), default_value
=95.0, unit
="percent"),
12999 forth
=lambda x
: (x
[0] / 100.0, x
[1] / 100.0),
13000 back
=lambda x
: (int(x
[0] * 100), int(x
[1] * 100))),
13002 match_type
="first",
13005 register_check_parameters(
13006 RulespecGroupCheckParametersNetworking
, "adva_ifs", _("Adva Optical Transport Laser Power"),
13007 Dictionary(elements
=[
13008 ("limits_output_power",
13010 title
=_("Sending Power"),
13012 Float(title
=_("lower limit"), unit
="dBm"),
13013 Float(title
=_("upper limit"), unit
="dBm"),
13015 ("limits_input_power",
13017 title
=_("Received Power"),
13019 Float(title
=_("lower limit"), unit
="dBm"),
13020 Float(title
=_("upper limit"), unit
="dBm"),
13023 title
=_("Interface"),
13027 bluecat_operstates
= [
13028 (1, "running normally"),
13029 (2, "not running"),
13030 (3, "currently starting"),
13031 (4, "currently stopping"),
13035 register_check_parameters(
13036 RulespecGroupCheckParametersNetworking
,
13038 _("Bluecat NTP Settings"),
13039 Dictionary(elements
=[
13042 title
=_("Operations States"),
13046 title
=_("States treated as warning"),
13047 choices
=bluecat_operstates
,
13048 default_value
=[2, 3, 4],
13052 title
=_("States treated as critical"),
13053 choices
=bluecat_operstates
,
13057 required_keys
=['warning', 'critical'],
13061 title
=_("Levels for Stratum "),
13063 Integer(title
=_("Warning at")),
13064 Integer(title
=_("Critical at")),
13071 register_check_parameters(
13072 RulespecGroupCheckParametersNetworking
,
13074 _("Bluecat DHCP Settings"),
13079 title
=_("Operations States"),
13083 title
=_("States treated as warning"),
13084 choices
=bluecat_operstates
,
13085 default_value
=[2, 3, 4],
13089 title
=_("States treated as critical"),
13090 choices
=bluecat_operstates
,
13094 required_keys
=['warning', 'critical'],
13097 required_keys
=['oper_states'], # There is only one value, so its required
13103 register_check_parameters(
13104 RulespecGroupCheckParametersNetworking
,
13105 "bluecat_command_server",
13106 _("Bluecat Command Server Settings"),
13111 title
=_("Operations States"),
13115 title
=_("States treated as warning"),
13116 choices
=bluecat_operstates
,
13117 default_value
=[2, 3, 4],
13121 title
=_("States treated as critical"),
13122 choices
=bluecat_operstates
,
13126 required_keys
=['warning', 'critical'],
13129 required_keys
=['oper_states'], # There is only one value, so its required
13135 register_check_parameters(
13136 RulespecGroupCheckParametersNetworking
,
13138 _("Bluecat DNS Settings"),
13143 title
=_("Operations States"),
13147 title
=_("States treated as warning"),
13148 choices
=bluecat_operstates
,
13149 default_value
=[2, 3, 4],
13153 title
=_("States treated as critical"),
13154 choices
=bluecat_operstates
,
13158 required_keys
=['warning', 'critical'],
13161 required_keys
=['oper_states'], # There is only one value, so its required
13167 bluecat_ha_operstates
= [
13173 (6, "becoming active"),
13174 (7, "becomming passive"),
13178 register_check_parameters(
13179 RulespecGroupCheckParametersNetworking
,
13181 _("Bluecat HA Settings"),
13186 title
=_("Operations States"),
13191 title
=_("States treated as warning"),
13192 choices
=bluecat_ha_operstates
,
13193 default_value
=[5, 6, 7],
13199 title
=_("States treated as critical"),
13200 choices
=bluecat_ha_operstates
,
13201 default_value
=[8, 4],
13205 required_keys
=['warning', 'critical'],
13208 required_keys
=['oper_states'], # There is only one value, so its required
13214 register_check_parameters(
13215 RulespecGroupCheckParametersNetworking
,
13216 "steelhead_connections",
13217 _("Steelhead connections"),
13222 title
=_("Levels for total amount of connections"),
13224 Integer(title
=_("Warning at")),
13225 Integer(title
=_("Critical at")),
13230 title
=_("Levels for optimized connections"),
13232 Integer(title
=_("Warning at")),
13233 Integer(title
=_("Critical at")),
13238 title
=_("Levels for passthrough connections"),
13240 Integer(title
=_("Warning at")),
13241 Integer(title
=_("Critical at")),
13246 title
=_("Levels for half opened connections"),
13248 Integer(title
=_("Warning at")),
13249 Integer(title
=_("Critical at")),
13254 title
=_("Levels for half closed connections"),
13256 Integer(title
=_("Warning at")),
13257 Integer(title
=_("Critical at")),
13262 title
=_("Levels for established connections"),
13264 Integer(title
=_("Warning at")),
13265 Integer(title
=_("Critical at")),
13270 title
=_("Levels for active connections"),
13272 Integer(title
=_("Warning at")),
13273 Integer(title
=_("Critical at")),
13281 register_check_parameters(
13282 RulespecGroupCheckParametersStorage
,
13284 _("FibreChannel Ports (FCMGMT MIB)"),
13285 Dictionary(elements
=[
13288 title
=_("Throughput levels"),
13289 help=_("Please note: in a few cases the automatic detection of the link speed "
13290 "does not work. In these cases you have to set the link speed manually "
13291 "below if you want to monitor percentage values"),
13294 title
=_("Used bandwidth of port relative to the link speed"),
13296 Percentage(title
=_("Warning at"), unit
=_("percent")),
13297 Percentage(title
=_("Critical at"), unit
=_("percent")),
13300 title
=_("Used Bandwidth of port in megabyte/s"),
13302 Integer(title
=_("Warning at"), unit
=_("MByte/s")),
13303 Integer(title
=_("Critical at"), unit
=_("MByte/s")),
13308 title
=_("Assumed link speed"),
13309 help=_("If the automatic detection of the link speed does "
13310 "not work you can set the link speed here."),
13311 unit
=_("Gbit/s"))),
13314 title
=_("CRC errors rate"),
13316 Percentage(title
=_("Warning at"), unit
=_("percent")),
13317 Percentage(title
=_("Critical at"), unit
=_("percent")),
13321 title
=_("Enc-Out frames rate"),
13323 Percentage(title
=_("Warning at"), unit
=_("percent")),
13324 Percentage(title
=_("Critical at"), unit
=_("percent")),
13328 title
=_("No-TxCredits errors"),
13330 Percentage(title
=_("Warning at"), unit
=_("percent")),
13331 Percentage(title
=_("Critical at"), unit
=_("percent")),
13335 title
=_("C3 discards"),
13337 Percentage(title
=_("Warning at"), unit
=_("percent")),
13338 Percentage(title
=_("Critical at"), unit
=_("percent")),
13342 title
=_("Averaging"),
13343 help=_("If this parameter is set, all throughputs will be averaged "
13344 "over the specified time interval before levels are being applied. Per "
13345 "default, averaging is turned off. "),
13353 # title = _("Allowed states (otherwise check will be critical)"),
13354 # choices = [ (1, _("unknown") ),
13355 # (2, _("failed") ),
13356 # (3, _("bypassed") ),
13357 # (4, _("active") ),
13358 # (5, _("loopback") ),
13359 # (6, _("txfault") ),
13360 # (7, _("nomedia") ),
13361 # (8, _("linkdown") ),
13364 # title = _("Physical state of port") ,
13366 # label = _("ignore physical state"),
13372 # title = _("Allowed states (otherwise check will be critical)"),
13373 # choices = [ (1, _("unknown") ),
13374 # (2, _("unused") ),
13375 # (3, _("ready") ),
13376 # (4, _("warning") ),
13377 # (5, _("failure") ),
13378 # (6, _("not participating") ),
13379 # (7, _("initializing") ),
13380 # (8, _("bypass") ),
13384 # title = _("Operational state") ,
13386 # label = _("ignore operational state"),
13392 # title = _("Allowed states (otherwise check will be critical)"),
13393 # choices = [ (1, _("unknown") ),
13394 # (2, _("online") ),
13395 # (3, _("offline") ),
13396 # (4, _("bypassed") ),
13397 # (5, _("diagnostics") ),
13400 # title = _("Administrative state") ,
13402 # label = _("ignore administrative state"),
13407 title
=_("port name"),
13408 help=_("The name of the FC port"),
13413 register_check_parameters(
13414 RulespecGroupCheckParametersEnvironment
, "plug_count", _("Number of active Plugs"),
13416 help=_("Levels for the number of active plugs in a device."),
13418 Integer(title
=_("critical if below or equal"), default_value
=30),
13419 Integer(title
=_("warning if below or equal"), default_value
=32),
13420 Integer(title
=_("warning if above or equal"), default_value
=38),
13421 Integer(title
=_("critical if above or equal"), default_value
=40),
13424 # Rules for configuring parameters of checks (services)
13425 register_check_parameters(
13426 RulespecGroupCheckParametersEnvironment
, "ucs_bladecenter_chassis_voltage",
13427 _("UCS Bladecenter Chassis Voltage Levels"),
13429 help=_("Here you can configure the 3.3V and 12V voltage levels for each chassis."),
13431 ("levels_3v_lower",
13433 title
=_("3.3 Volt Output Lower Levels"),
13435 Float(title
=_("warning if below or equal"), unit
="V", default_value
=3.25),
13436 Float(title
=_("critical if below or equal"), unit
="V", default_value
=3.20),
13438 ("levels_3v_upper",
13440 title
=_("3.3 Volt Output Upper Levels"),
13442 Float(title
=_("warning if above or equal"), unit
="V", default_value
=3.4),
13443 Float(title
=_("critical if above or equal"), unit
="V", default_value
=3.45),
13445 ("levels_12v_lower",
13447 title
=_("12 Volt Output Lower Levels"),
13449 Float(title
=_("warning if below or equal"), unit
="V", default_value
=11.9),
13450 Float(title
=_("critical if below or equal"), unit
="V", default_value
=11.8),
13452 ("levels_12v_upper",
13454 title
=_("12 Volt Output Upper Levels"),
13456 Float(title
=_("warning if above or equal"), unit
="V", default_value
=12.1),
13457 Float(title
=_("critical if above or equal"), unit
="V", default_value
=12.2),
13459 ]), TextAscii(title
=_("Chassis"), help=_("The identifier of the chassis.")), "dict")
13461 register_check_parameters(
13462 RulespecGroupCheckParametersEnvironment
, "hp_msa_psu_voltage",
13463 _("HP MSA Power Supply Voltage Levels"),
13465 help=_("Here you can configure the 3.3V and 12V voltage levels for each power supply."),
13467 ("levels_33v_lower",
13469 title
=_("3.3 Volt Output Lower Levels"),
13471 Float(title
=_("warning if below or equal"), unit
="V", default_value
=3.25),
13472 Float(title
=_("critical if below or equal"), unit
="V", default_value
=3.20),
13474 ("levels_33v_upper",
13476 title
=_("3.3 Volt Output Upper Levels"),
13478 Float(title
=_("warning if above or equal"), unit
="V", default_value
=3.4),
13479 Float(title
=_("critical if above or equal"), unit
="V", default_value
=3.45),
13481 ("levels_5v_lower",
13483 title
=_("5 Volt Output Lower Levels"),
13485 Float(title
=_("warning if below or equal"), unit
="V", default_value
=3.25),
13486 Float(title
=_("critical if below or equal"), unit
="V", default_value
=3.20),
13488 ("levels_5v_upper",
13490 title
=_("5 Volt Output Upper Levels"),
13492 Float(title
=_("warning if above or equal"), unit
="V", default_value
=3.4),
13493 Float(title
=_("critical if above or equal"), unit
="V", default_value
=3.45),
13495 ("levels_12v_lower",
13497 title
=_("12 Volt Output Lower Levels"),
13499 Float(title
=_("warning if below or equal"), unit
="V", default_value
=11.9),
13500 Float(title
=_("critical if below or equal"), unit
="V", default_value
=11.8),
13502 ("levels_12v_upper",
13504 title
=_("12 Volt Output Upper Levels"),
13506 Float(title
=_("warning if above or equal"), unit
="V", default_value
=12.1),
13507 Float(title
=_("critical if above or equal"), unit
="V", default_value
=12.2),
13509 ]), TextAscii(title
=_("Power Supply name"), help=_("The identifier of the power supply.")),
13512 register_check_parameters(
13513 RulespecGroupCheckParametersApplications
, "jvm_gc", _("JVM garbage collection levels"),
13515 help=_("This ruleset also covers Tomcat, Jolokia and JMX. "),
13519 title
=_("Collection time levels"),
13522 title
=_("Time of garbage collection in ms per minute"),
13524 Integer(title
=_("Warning at"), unit
=_("ms"), allow_empty
=False),
13525 Integer(title
=_("Critical at"), unit
=_("ms"), allow_empty
=False),
13528 ("CollectionCount",
13530 title
=_("Collection count levels"),
13533 title
=_("Count of garbage collection per minute"),
13535 Integer(title
=_("Warning at"), allow_empty
=False),
13536 Integer(title
=_("Critical at"), allow_empty
=False),
13541 title
=_("Name of the virtual machine and/or<br>garbage collection type"),
13542 help=_("The name of the application server"),
13546 register_check_parameters(
13547 RulespecGroupCheckParametersApplications
, "jvm_tp", _("JVM tomcat threadpool levels"),
13549 help=_("This ruleset also covers Tomcat, Jolokia and JMX. "),
13551 ("currentThreadCount",
13553 title
=_("Current thread count levels"),
13556 title
=_("Percentage levels of current thread count in threadpool"),
13558 Integer(title
=_("Warning at"), unit
=_(u
"%"), allow_empty
=False),
13559 Integer(title
=_("Critical at"), unit
=_(u
"%"), allow_empty
=False),
13562 ("currentThreadsBusy",
13564 title
=_("Current threads busy levels"),
13567 title
=_("Percentage of current threads busy in threadpool"),
13569 Integer(title
=_("Warning at"), unit
=_(u
"%"), allow_empty
=False),
13570 Integer(title
=_("Critical at"), unit
=_(u
"%"), allow_empty
=False),
13575 title
=_("Name of the virtual machine and/or<br>threadpool"),
13576 help=_("The name of the application server"),
13580 register_check_parameters(
13581 RulespecGroupCheckParametersApplications
, "docker_node_containers",
13582 _("Docker node container levels"),
13585 "Allows to define absolute levels for all, running, paused, and stopped containers."),
13589 title
=_("Containers upper levels"),
13591 Integer(title
=_("Warning at"), allow_empty
=False),
13592 Integer(title
=_("Critical at"), allow_empty
=False),
13596 title
=_("Containers lower levels"),
13598 Integer(title
=_("Warning at"), allow_empty
=False),
13599 Integer(title
=_("Critical at"), allow_empty
=False),
13601 ("running_upper_levels",
13603 title
=_("Running containers upper levels"),
13605 Integer(title
=_("Warning at"), allow_empty
=False),
13606 Integer(title
=_("Critical at"), allow_empty
=False),
13608 ("running_lower_levels",
13610 title
=_("Running containers lower levels"),
13612 Integer(title
=_("Warning at"), allow_empty
=False),
13613 Integer(title
=_("Critical at"), allow_empty
=False),
13615 ("paused_upper_levels",
13617 title
=_("Paused containers upper levels"),
13619 Integer(title
=_("Warning at"), allow_empty
=False),
13620 Integer(title
=_("Critical at"), allow_empty
=False),
13622 ("paused_lower_levels",
13624 title
=_("Paused containers lower levels"),
13626 Integer(title
=_("Warning at"), allow_empty
=False),
13627 Integer(title
=_("Critical at"), allow_empty
=False),
13629 ("stopped_upper_levels",
13631 title
=_("Stopped containers upper levels"),
13633 Integer(title
=_("Warning at"), allow_empty
=False),
13634 Integer(title
=_("Critical at"), allow_empty
=False),
13636 ("stopped_lower_levels",
13638 title
=_("Stopped containers lower levels"),
13640 Integer(title
=_("Warning at"), allow_empty
=False),
13641 Integer(title
=_("Critical at"), allow_empty
=False),
13645 register_check_parameters(
13646 RulespecGroupCheckParametersApplications
, "docker_node_disk_usage", _("Docker node disk usage"),
13649 _("Allows to define levels for the counts and size of Docker Containers, Images, Local Volumes, and the Build Cache."
13656 Filesize(title
=_("Warning at"), allow_empty
=False),
13657 Filesize(title
=_("Critical at"), allow_empty
=False),
13661 title
=_("Reclaimable"),
13663 Filesize(title
=_("Warning at"), allow_empty
=False),
13664 Filesize(title
=_("Critical at"), allow_empty
=False),
13668 title
=_("Total count"),
13670 Integer(title
=_("Warning at"), allow_empty
=False),
13671 Integer(title
=_("Critical at"), allow_empty
=False),
13677 Integer(title
=_("Warning at"), allow_empty
=False),
13678 Integer(title
=_("Critical at"), allow_empty
=False),
13683 help=_("Either Containers, Images, Local Volumes or Build Cache"),
13687 register_check_parameters(
13688 RulespecGroupCheckParametersStorage
,
13690 _("Heartbeat CRM general status"),
13693 title
=_("Maximum age"),
13694 help=_("Maximum accepted age of the reported data in seconds"),
13699 TextAscii(allow_empty
=False),
13700 title
=_("Expected DC"),
13701 help=_("The hostname of the expected distinguished controller of the cluster"),
13704 Integer(min_value
=2, default_value
=2),
13705 title
=_("Number of Nodes"),
13706 help=_("The expected number of nodes in the cluster"),
13709 Integer(min_value
=0,),
13710 title
=_("Number of Resources"),
13711 help=_("The expected number of resources in the cluster"),
13715 match_type
="first",
13718 register_check_parameters(
13719 RulespecGroupCheckParametersStorage
, "heartbeat_crm_resources",
13720 _("Heartbeat CRM resource status"),
13722 TextAscii(allow_empty
=False),
13723 title
=_("Expected node"),
13724 help=_("The hostname of the expected node to hold this resource."),
13725 none_label
=_("Do not enforce the resource to be hold by a specific node."),
13728 title
=_("Resource Name"),
13729 help=_("The name of the cluster resource as shown in the service description."),
13733 register_check_parameters(
13734 RulespecGroupCheckParametersApplications
,
13736 _("Lotus Domino Tasks"),
13742 title
=_("Name of the task"),
13746 title
=_("Exact name of the task"),
13752 mode
=RegExp
.prefix
,
13754 title
=_("Regular expression matching tasks"),
13755 help=_("This regex must match the <i>beginning</i> of the complete "
13756 "command line of the task including arguments"),
13757 forth
=lambda x
: x
[1:], # remove ~
13758 back
=lambda x
: "~" + x
, # prefix ~
13763 title
=_("Match all tasks"),
13766 match
=lambda x
: (not x
and 2) or (x
[0] == '~' and 1 or 0))),
13769 title
=_("Minimum number of matched tasks for WARNING state"),
13774 title
=_("Minimum number of matched tasks for OK state"),
13779 title
=_("Maximum number of matched tasks for OK state"),
13780 default_value
=99999,
13784 title
=_("Maximum number of matched tasks for WARNING state"),
13785 default_value
=99999,
13788 required_keys
=['warnmin', 'okmin', 'okmax', 'warnmax', 'process'],
13791 title
=_("Name of service"),
13792 help=_("This name will be used in the description of the service"),
13794 regex
="^[a-zA-Z_0-9 _.-]*$",
13795 regex_error
=_("Please use only a-z, A-Z, 0-9, space, underscore, "
13796 "dot and hyphen for your service description"),
13799 has_inventory
=False)
13801 register_check_parameters(
13802 RulespecGroupCheckParametersApplications
,
13803 "domino_mailqueues",
13804 _("Lotus Domino Mail Queues"),
13809 title
=_("Number of Mails in Queue"),
13811 Integer(title
=_("warning at"), default_value
=300),
13812 Integer(title
=_("critical at"), default_value
=350),
13815 required_keys
=['queue_length'],
13819 ('lnDeadMail', _('Mails in Dead Queue')),
13820 ('lnWaitingMail', _('Mails in Waiting Queue')),
13821 ('lnMailHold', _('Mails in Hold Queue')),
13822 ('lnMailTotalPending', _('Total Pending Mails')),
13823 ('InMailWaitingforDNS', _('Mails Waiting for DNS Queue')),
13825 title
=_("Domino Mail Queue Names"),
13830 register_check_parameters(
13831 RulespecGroupCheckParametersApplications
,
13833 _("Lotus Domino Users"),
13835 title
=_("Number of Lotus Domino Users"),
13837 Integer(title
=_("warning at"), default_value
=1000),
13838 Integer(title
=_("critical at"), default_value
=1500),
13841 match_type
="first",
13844 register_check_parameters(
13845 RulespecGroupCheckParametersApplications
,
13846 "domino_transactions",
13847 _("Lotus Domino Transactions"),
13849 title
=_("Number of Transactions per Minute on a Lotus Domino Server"),
13851 Integer(title
=_("warning at"), default_value
=30000),
13852 Integer(title
=_("critical at"), default_value
=35000),
13855 match_type
="first",
13858 register_check_parameters(
13859 RulespecGroupCheckParametersApplications
, "netscaler_dnsrates",
13860 _("Citrix Netscaler DNS counter rates"),
13862 help=_("Counter rates of DNS parameters for Citrix Netscaler Loadbalancer "
13868 title
=_("Upper Levels for Total Number of DNS queries"),
13870 Float(title
=_("Warning at"), default_value
=1500.0, unit
="/sec"),
13871 Float(title
=_("Critical at"), default_value
=2000.0, unit
="/sec")
13878 title
=_("Upper Levels for Total Number of DNS replies"),
13880 Float(title
=_("Warning at"), default_value
=1500.0, unit
="/sec"),
13881 Float(title
=_("Critical at"), default_value
=2000.0, unit
="/sec")
13887 register_check_parameters(
13888 RulespecGroupCheckParametersApplications
, "netscaler_tcp_conns",
13889 _("Citrix Netscaler Loadbalancer TCP Connections"),
13890 Dictionary(elements
=[
13894 title
=_("Max. number of client connections"),
13897 title
=_("Warning at"),
13898 default_value
=25000,
13901 title
=_("Critical at"),
13902 default_value
=30000,
13909 title
=_("Max. number of server connections"),
13912 title
=_("Warning at"),
13913 default_value
=25000,
13916 title
=_("Critical at"),
13917 default_value
=30000,
13923 register_check_parameters(
13924 RulespecGroupCheckParametersApplications
,
13925 "netscaler_sslcerts",
13926 _("Citrix Netscaler SSL certificates"),
13932 title
=_("Remaining days of validity"),
13934 Integer(title
=_("Warning below"), default_value
=30, min_value
=0),
13935 Integer(title
=_("Critical below"), default_value
=10, min_value
=0),
13940 TextAscii(title
=_("Name of Certificate"),),
13943 register_check_parameters(
13944 RulespecGroupCheckParametersEnvironment
,
13945 "siemens_plc_flag",
13946 _("State of Siemens PLC Flags"),
13948 help=_("This rule sets the expected state, the one which should result in an OK state, "
13949 "of the monitored flags of Siemens PLC devices."),
13950 title
=_("Expected flag state"),
13952 (True, _("Expect the flag to be: On")),
13953 (False, _("Expect the flag to be: Off")),
13955 default_value
=True),
13957 title
=_("Device Name and Value Ident"),
13958 help=_("You need to concatenate the device name which is configured in the special agent "
13959 "for the PLC device separated by a space with the ident of the value which is also "
13960 "configured in the special agent."),
13962 match_type
="first",
13965 register_check_parameters(
13966 RulespecGroupCheckParametersEnvironment
,
13967 "siemens_plc_duration",
13968 _("Siemens PLC Duration"),
13973 title
=_("Duration"),
13975 Age(title
=_("Warning at"),),
13976 Age(title
=_("Critical at"),),
13979 help=_("This rule is used to configure thresholds for duration values read from "
13980 "Siemens PLC devices."),
13981 title
=_("Duration levels"),
13984 title
=_("Device Name and Value Ident"),
13985 help=_("You need to concatenate the device name which is configured in the special agent "
13986 "for the PLC device separated by a space with the ident of the value which is also "
13987 "configured in the special agent."),
13992 register_check_parameters(
13993 RulespecGroupCheckParametersEnvironment
,
13994 "siemens_plc_counter",
13995 _("Siemens PLC Counter"),
14000 title
=_("Counter level"),
14002 Integer(title
=_("Warning at"),),
14003 Integer(title
=_("Critical at"),),
14006 help=_("This rule is used to configure thresholds for counter values read from "
14007 "Siemens PLC devices."),
14008 title
=_("Counter levels"),
14011 title
=_("Device Name and Value Ident"),
14012 help=_("You need to concatenate the device name which is configured in the special agent "
14013 "for the PLC device separated by a space with the ident of the value which is also "
14014 "configured in the special agent."),
14019 register_check_parameters(
14020 RulespecGroupCheckParametersStorage
, "bossock_fibers", _("Number of Running Bossock Fibers"),
14022 title
=_("Number of fibers"),
14024 Integer(title
=_("Warning at"), unit
=_("fibers")),
14025 Integer(title
=_("Critical at"), unit
=_("fibers")),
14026 ]), TextAscii(title
=_("Node ID")), "first")
14028 register_check_parameters(
14029 RulespecGroupCheckParametersEnvironment
, "carbon_monoxide", ("Carbon monoxide"),
14030 Dictionary(elements
=[
14033 title
="Levels in parts per million",
14035 Integer(title
=_("Warning at"), unit
=_("ppm"), default
=10),
14036 Integer(title
=_("Critical at"), unit
=_("ppm"), default
=25),