def item_spec(self): return TextAscii( title=_("Port"), help=_("Name or number of the port"), )
def item_spec(self): return TextAscii(title=_("Name of queue"))
def item_spec(self): return TextAscii( title=_("Name of the MP LUN"), help=_("For Linux multipathing this is either the UUID (e.g. " "60a9800043346937686f456f59386741), or the configured " "alias."))
def item_spec(self): return TextAscii( title=_("Phase"), help=_("The identifier of the phase the power is related to."), )
), elements=[ ("age", Tuple( title=_("Upper levels for the age"), elements=[ Age(title=_("Warning at")), Age(title=_("Critical at")), ], )), ("state", MonitoringState(title=_( "State if LGETTIME and LGETDATE are available but not set" ), default_value=1)), ], )), ], ), forth=transform_websphere_mq_queues) rulespec_registry.register( CheckParameterRulespecWithItem( check_group_name="websphere_mq", group=RulespecGroupCheckParametersApplications, item_spec=lambda: TextAscii(title=_("Name of queue")), match_type="dict", parameter_valuespec=_parameter_valuespec_websphere_mq, title=lambda: _("Websphere MQ"), ))
forth=str, back=int, )), ("items", ListOfStrings( title=_("Restrict interface items"), help=_( "Only interface with these item names are put into this group."), )), ] vs_elements_if_groups_group = [ ("group_name", TextAscii( title=_("Group name"), help=_("Name of group in service description"), allow_empty=False, )), ("group_presence", DropdownChoice( title=_("Group interface presence"), help=_( "Determine whether the group interface is created as an " "separate service or not. In second case the choosen interface " "services disapear."), choices=[ ("separate", _("List grouped interfaces separately")), ("instead", _("List grouped interfaces instead")), ], default_value="instead", )),
def _item_spec_mysql_db_size(): return TextAscii( title=_("Name of the database"), help=_("Don't forget the instance: instance:dbname"), )
def _parameter_valuespec_bonding(): return Dictionary(elements=[ ("expect_active", DropdownChoice( title=_("Warn on unexpected active interface"), choices=[ ("ignore", _("ignore which one is active")), ("primary", _("require primary interface to be active")), ("lowest", _("require interface that sorts lowest alphabetically")), ], default_value="ignore", )), ("ieee_302_3ad_agg_id_missmatch_state", MonitoringState( title=_("State for missmatching Aggregator IDs for LACP"), default_value=1, )), ],) rulespec_registry.register( CheckParameterRulespecWithItem( check_group_name="bonding", group=RulespecGroupCheckParametersNetworking, item_spec=lambda: TextAscii(title=_("Name of the bonding interface")), match_type="dict", parameter_valuespec=_parameter_valuespec_bonding, title=lambda: _("Status of Linux bonding interfaces"), ))
def _vs_rules(self): if config.user.may('wato.add_or_modify_executables'): ds_option: List[DictionaryEntry] = [( 'datasource_program', TextAscii( title=_( "Individual program call (<a href=\"%s\">Rules</a>)") % watolib.folder_preserving_link( [('mode', 'edit_ruleset'), ('varname', 'datasource_programs')]), help= _("For agent based checks Check_MK allows you to specify an alternative " "program that should be called by Check_MK instead of connecting the agent " "via TCP. That program must output the agent's data on standard output in " "the same format the agent would do. This is for example useful for monitoring " "via SSH.") + monitoring_macro_help() + " " + _("This option can only be used with the permission \"Can add or modify executables\"." ), ))] else: ds_option = [] return Dictionary( optional_keys = False, elements = [ ('agent_port', Integer( minvalue = 1, maxvalue = 65535, default_value = 6556, title = _("Checkmk Agent Port (<a href=\"%s\">Rules</a>)") % watolib.folder_preserving_link([('mode', 'edit_ruleset'), ('varname', 'agent_ports')]), help = _("This variable allows to specify the TCP port to " "be used to connect to the agent on a per-host-basis.") )), ('tcp_connect_timeout', Float( minvalue = 1.0, default_value = 5.0, unit = _("sec"), display_format = "%.0f", # show values consistent to size = 2, # SNMP-Timeout title = _("TCP Connection Timeout (<a href=\"%s\">Rules</a>)") % \ watolib.folder_preserving_link([('mode', 'edit_ruleset'), ('varname', 'tcp_connect_timeouts')]), help = _("This variable allows to specify a timeout for the " "TCP connection to the Check_MK agent on a per-host-basis." "If the agent does not respond within this time, it is considered to be unreachable.") )), ('snmp_timeout', Integer( title = _("SNMP-Timeout (<a href=\"%s\">Rules</a>)") % \ watolib.folder_preserving_link([('mode', 'edit_ruleset'), ('varname', 'snmp_timing')]), help = _("After a request is sent to the remote SNMP agent we will wait up to this " "number of seconds until assuming the answer get lost and retrying."), default_value = 1, minvalue = 1, maxvalue = 60, unit = _("sec"), )), ('snmp_retries', Integer( title = _("SNMP-Retries (<a href=\"%s\">Rules</a>)") % \ watolib.folder_preserving_link([('mode', 'edit_ruleset'), ('varname', 'snmp_timing')]), default_value = 5, minvalue = 0, maxvalue = 50, )), ] + ds_option, )
(9, "securityEstablished"), (10, "paramTransferComplete"), (11, "registrationComplete"), (12, "operational"), (13, "accessDenied"), ], default_value=[1, 2, 13], )), ("tx_power", Tuple( title=_("Transmit Power"), help=_("The operational transmit power"), elements=[ Float(title=_("warning at"), unit="dBmV", default_value=20.0), Float(title=_("critical at"), unit="dBmV", default_value=10.0), ], )), ], ) rulespec_registry.register( CheckParameterRulespecWithItem( check_group_name="docsis_cm_status", group=RulespecGroupCheckParametersNetworking, item_spec=lambda: TextAscii(title=_("ID of the Entry")), match_type="dict", parameter_valuespec=_parameter_valuespec_docsis_cm_status, title=lambda: _("Docsis Cable Modem Status"), ))
def item_spec(self): return TextAscii(title=_("Volume Group"), allow_empty=False)
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2 # This file is part of Checkmk (https://checkmk.com). It is subject to the terms and # conditions defined in the file COPYING, which is part of this source code package. from cmk.gui.i18n import _ from cmk.gui.valuespec import ( Dictionary, MonitoringState, TextAscii, ) from cmk.gui.plugins.wato import ( RulespecGroupCheckParametersApplications, register_check_parameters, ) register_check_parameters( RulespecGroupCheckParametersApplications, "oracle_sql", _("Oracle Custom SQLs"), Dictionary(elements=[ ("instance_error_state", MonitoringState(title=_("Instance error state"))), ("perfdata_error_state", MonitoringState(title=_("Perfdata error state"))), ],), TextAscii(title=_("Custom SQL")), "dict")
)), ('alert_on_loss', FixedValue( False, totext="", title=_("Do not alert on connection loss"), )), ("warn_states", ListChoice( title=_("States treated as warning"), choices=hivemanger_states, default_value=['Maybe', 'Major', 'Minor'], )), ("crit_states", ListChoice( title=_("States treated as critical"), choices=hivemanger_states, default_value=['Critical'], )), ],) rulespec_registry.register( CheckParameterRulespecWithItem( check_group_name="hivemanager_devices", group=RulespecGroupCheckParametersNetworking, item_spec=lambda: TextAscii(title=_("Hostname of the Device")), match_type="dict", parameter_valuespec=_parameter_valuespec_hivemanager_devices, title=lambda: _("Hivemanager Devices"), ))
"connections for a given VSID."), elements=[ ("levels_perc", Tuple( title=_("Percentage of maximum available connections"), elements=[ Percentage(title=_("Warning at"), unit=_("% of maximum connections")), Percentage(title=_("Critical at"), unit=_("% of maximum connections")), ], )), ("levels_abs", Tuple( title=_("Absolute number of connections"), elements=[ Integer(title=_("Warning at"), minvalue=0, unit=_("connections")), Integer(title=_("Critical at"), minvalue=0, unit=_("connections")), ], )), ], ) rulespec_registry.register( CheckParameterRulespecWithItem( check_group_name="checkpoint_vsx_connections", group=RulespecGroupCheckParametersNetworking, item_spec=lambda: TextAscii(title=_("VSID")), parameter_valuespec=_parameter_valuespec_checkpoint_vsx_connections, title=lambda: _("Checkpoint VSID connections"), ))
def item_spec(self): return TextAscii(title=_("Service descriptions"), allow_empty=False)
("4_link", MonitoringState(title=_("Link State: READY"), default_value=0)), ("5_link", MonitoringState(title=_("Link State: LOSS_SYNC"), default_value=2)), ("6_link", MonitoringState(title=_("Link State: ERROR_STATE"), default_value=2)), ("7_link", MonitoringState(title=_("Link State: XXX"), default_value=1)), ("8_link", MonitoringState(title=_("Link State: NOPARTICIPATE"), default_value=0)), ("9_link", MonitoringState(title=_("Link State: COREDUMP"), default_value=1)), ("10_link", MonitoringState(title=_("Link State: OFFLINE"), default_value=1)), ("11_link", MonitoringState(title=_("Link State: FWDEAD"), default_value=1)), ("12_link", MonitoringState(title=_("Link State: IDLE_FOR_RESET"), default_value=1)), ("13_link", MonitoringState(title=_("Link State: DHCP_IN_PROGESS"), default_value=1)), ("14_link", MonitoringState(title=_("Link State: PENDING_RESET"), default_value=1)), ("1_fail", MonitoringState(title=_("Failover State: NONE"), default_value=0)), ("2_fail", MonitoringState(title=_("Failover State: FAILOVER_PENDING"), default_value=2)), ("3_fail", MonitoringState(title=_("Failover State: FAILED_OVER"), default_value=2)), ("4_fail", MonitoringState(title=_("Failover State: ACTIVE"), default_value=2)), ("5_fail", MonitoringState(title=_("Failover State: ACTIVE_DOWN"), default_value=2)), ("6_fail", MonitoringState(title=_("Failover State: ACTIVE_FAILED"), default_value=2)), ("7_fail", MonitoringState(title=_("Failover State: FAILBACK_PENDING"), default_value=1)), ],) rulespec_registry.register( CheckParameterRulespecWithItem( check_group_name="threepar_ports", group=RulespecGroupCheckParametersNetworking, item_spec=lambda: TextAscii(title=_("Port"), help=_("The Port Description")), match_type="dict", parameter_valuespec=_parameter_valuespec_threepar_ports, title=lambda: _("3PAR Ports"), ))
def _item_spec_hr_ps(): return TextAscii(title=_("Process name as defined at discovery"), )
def _item_spec_win_dhcp_pools(): return TextAscii( title=_("Pool name"), allow_empty=False, )
def item_spec(self): return TextAscii( title=_("Instance"), help=_("Only needed if you have multiple MySQL Instances on one server"), )
choices=iostat_ios_choices, ), title=_("Levels for IO Stats Requests"), ), ), ( 'waitclasses', ListOf( CascadingDropdown( title=_("Field"), orientation="horizontal", choices=waitclasses_choices, ), title=_("Levels for System Wait"), ), ), ], ) rulespec_registry.register( CheckParameterRulespecWithItem( check_group_name="oracle_performance", group=RulespecGroupCheckParametersApplications, item_spec=lambda: TextAscii( title=_("Database SID"), size=12, allow_empty=False), match_type="dict", parameter_valuespec=_parameter_valuespec_oracle_performance, title=lambda: _("Oracle Performance"), ))
from cmk.gui.plugins.wato import ( CheckParameterRulespecWithItem, rulespec_registry, RulespecGroupCheckParametersStorage, ) def _parameter_valuespec_emcvnx_storage_pools(): return Dictionary(elements=[ ("percent_full", Tuple( title=_("Upper levels for physical capacity in percent"), elements=[ Percentage(title=_("Warning at"), default_value=70.0), Percentage(title=_("Critical at"), default_value=90.0), ], )), ],) rulespec_registry.register( CheckParameterRulespecWithItem( check_group_name="emcvnx_storage_pools", group=RulespecGroupCheckParametersStorage, item_spec=lambda: TextAscii(title=_("Pool name")), match_type="dict", parameter_valuespec=_parameter_valuespec_emcvnx_storage_pools, title=lambda: _("EMC VNX storage pools"), ))
def _item_spec_if(): return TextAscii(title=_("port specification"), allow_empty=False)
maxvalue=None), Percentage( title=_("Critical at a memory usage of"), default_value=90.0, maxvalue=None) ], ), Tuple( title=_("Specify levels in absolute usage values"), elements=[ Filesize(title=_("Warning at")), Filesize(title=_("Critical at")) ], ), ], )), ], optional_keys=[], ) rulespec_registry.register( CheckParameterRulespecWithItem( check_group_name="memory_multiitem", group=RulespecGroupCheckParametersOperatingSystem, item_spec=lambda: TextAscii(title=_("Module name"), allow_empty=False), match_type="dict", parameter_valuespec=_parameter_valuespec_memory_multiitem, title=lambda: _("Main memory usage of devices with modules"), ))
unit=_("packets/s"), default_difference=(5, 8), default_value=None, )), ("if_total_pkts", Levels( title=_("Total Packets Maximum"), unit=_("packets/s"), default_difference=(5, 8), default_value=None, )), ("if_total_pkts_lower", Levels( title=_("Total Packets Minimum"), unit=_("packets/s"), default_difference=(5, 8), default_value=None, ))], ) rulespec_registry.register( CheckParameterRulespecWithItem( check_group_name="f5_bigip_snat", group=RulespecGroupCheckParametersApplications, item_spec=lambda: TextAscii(title=_("Source NAT Name"), allow_empty=False), match_type="dict", parameter_valuespec=_parameter_valuespec_f5_bigip_snat, title=lambda: _("F5 Loadbalancer Source NAT"), ))
def item_spec(self): return TextAscii(title=_("Port"), help=_("The Port Description"))
return Dictionary( elements=[ ("state", MonitoringState(title=_("State if license is expired"), default_value=2)), ("expiration_time", Tuple( title=_("Time until license expiration"), help=_("Remaining days until the Windows license expires"), elements=[ Age(title=_("Warning at"), default_value=14 * 24 * 60 * 60), Age(title=_("Critical at"), default_value=7 * 24 * 60 * 60) ], )), ], optional_keys=["state", "expiration_time", "usage_bytes"], ) rulespec_registry.register( CheckParameterRulespecWithItem( check_group_name="splunk_license_state", group=RulespecGroupCheckParametersApplications, item_spec=lambda: TextAscii(title=_("Name of license")), match_type="dict", parameter_valuespec=_parameter_valuespec_splunk_license_state, title=lambda: _("Splunk License State"), ))
from cmk.gui.plugins.wato import ( CheckParameterRulespecWithItem, rulespec_registry, RulespecGroupCheckParametersApplications, ) def _parameter_valuespec_fireeye_lic(): return Dictionary(elements=[( "days", Tuple( title=_("Levels for Fireeye License Expiration"), elements=[ Integer(title="Warning at", default_value=90, unit="days"), Integer(title="Critical at", default_value=120, unit="days"), ], ), )], ) rulespec_registry.register( CheckParameterRulespecWithItem( check_group_name="fireeye_lic", group=RulespecGroupCheckParametersApplications, item_spec=lambda: TextAscii(title=_("License Feature")), match_type="dict", parameter_valuespec=_parameter_valuespec_fireeye_lic, title=lambda: _("Fireeye Licenses"), ))