Ejemplo n.º 1
0
                            default_value=2),
                    ),
                    (
                        "STOPPED",
                        MonitoringState(
                            title=_("State when channel is stopped"),
                            default_value=1),
                    ),
                    (
                        "other",
                        MonitoringState(
                            title=_("State when channel status is unknown"),
                            default_value=2),
                    ),
                ],
                optional_keys=[],
            ),
        ),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="websphere_mq_channels",
        group=RulespecGroupCheckParametersApplications,
        item_spec=lambda: TextInput(title=_("Name of channel")),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_websphere_mq_channels,
        title=lambda: _("Websphere MQ Channels"),
    ))
Ejemplo n.º 2
0
                            MonitoringState(title=_("Is unlicensed"), default_value=3),
                        ),
                        (
                            "children_pool_members_down_if_not_available",
                            # Special handling, see check plugin
                            MonitoringState(
                                title=_(
                                    "The children pool member(s) are down if VServer is not available"
                                ),
                                default_value=0,
                            ),
                        ),
                    ],
                    optional_keys=False,
                ),
            ),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="f5_bigip_vserver",
        group=RulespecGroupCheckParametersApplications,
        item_spec=lambda: TextInput(title=_("VServer name"), allow_empty=False),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_f5_bigip_vserver,
        title=lambda: _("F5 Loadbalancer VServer"),
    )
)
Ejemplo n.º 3
0
                default_value=1),
        ),
        (
            "aof_last_rewrite_state",
            MonitoringState(
                title=_("State when Last AOF rewrite operation was faulty"),
                default_value=1),
        ),
        (
            "rdb_changes_count",
            Tuple(
                title=_("Number of changes since last dump"),
                elements=[
                    Integer(title=_("Warning at"), unit="changes"),
                    Integer(title=_("Critical at"), unit="changes"),
                ],
            ),
        ),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="redis_info_persistence",
        group=RulespecGroupCheckParametersApplications,
        item_spec=lambda: TextInput(title=_("Redis server name")),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_redis_info_persistence,
        title=lambda: _("Redis persistence"),
    ))
Ejemplo n.º 4
0
                    default_value=1,
                ),
            ),
            (
                "Online",
                MonitoringState(
                    title=_("State for <i>Online</i>"),
                    default_value=0,
                ),
            ),
            (
                "Offline",
                MonitoringState(
                    title=_("State for <i>Offline</i>"),
                    default_value=2,
                ),
            ),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="storcli_pdisks",
        group=RulespecGroupCheckParametersStorage,
        item_spec=_item_spec_storcli_pdisks,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_storcli_pdisks,
        title=lambda: _("LSI RAID physical disks"),
    ))
Ejemplo n.º 5
0
def _parameter_valuespec_mssql_datafiles():
    return Dictionary(
        title=_("File Size Levels"),
        help=_(
            "Specify levels for datafiles of a database. Please note that relative "
            "levels will only work if there is a max_size set for the file on the database "
            "side."
        ),
        elements=[
            ("used_levels", levels_absolute_or_dynamic(_("Datafile"), _("used"))),
            (
                "allocated_used_levels",
                levels_absolute_or_dynamic(_("Datafile"), _("used of allocation")),
            ),
            ("allocated_levels", levels_absolute_or_dynamic(_("Datafile"), _("allocated"))),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="mssql_datafiles",
        group=RulespecGroupCheckParametersApplications,
        item_spec=mssql_item_spec_instance_database_file,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_mssql_datafiles,
        title=lambda: _("MSSQL Datafile Sizes"),
    )
)
Ejemplo n.º 6
0
            Tuple(
                title=_("Read"),
                elements=[
                    Filesize(title=_("Warning if below")),
                    Filesize(title=_("Critical if below")),
                ],
            ),
        ),
        (
            "write",
            Tuple(
                title=_("Write"),
                elements=[
                    Filesize(title=_("Warning at")),
                    Filesize(title=_("Critical at")),
                ],
            ),
        ),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="netapp_fcportio",
        group=RulespecGroupCheckParametersStorage,
        item_spec=lambda: TextInput(title=_("File name"), allow_empty=True),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_netapp_fcportio,
        title=lambda: _("Netapp FC Port throughput"),
    ))
Ejemplo n.º 7
0
def _item_spec_filesystem():
    return TextInput(
        title=_("Mount point"),
        help=
        _("For Linux/UNIX systems, specify the mount point, for Windows systems "
          "the drive letter uppercase followed by a colon and a slash, e.g. <tt>C:/</tt>"
          ),
        allow_empty=False,
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="filesystem",
        group=RulespecGroupCheckParametersStorage,
        item_spec=_item_spec_filesystem,
        match_type="dict",
        parameter_valuespec=vs_filesystem,
        title=lambda: _("Filesystems (used space and growth)"),
    ))


def _discovery_valuespec_qtree_quota() -> Dictionary:
    return Dictionary(
        elements=[
            (
                "exclude_volume",
                Checkbox(
                    title=_("Exclude volume from service name"),
                    help=
                    _("The service description of qtree services is composed of the "
                      "quota, quota-users and the volume name by default. Check this box"
Ejemplo n.º 8
0
from cmk.gui.valuespec import Dictionary, Integer, TextInput, Tuple


def _parameter_valuespec_oracle_longactivesessions():
    return Dictionary(
        elements=[
            (
                "levels",
                Tuple(
                    title=_("Levels of active sessions"),
                    elements=[
                        Integer(title=_("Warning if more than"), unit=_("sessions")),
                        Integer(title=_("Critical if more than"), unit=_("sessions")),
                    ],
                ),
            )
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="oracle_longactivesessions",
        group=RulespecGroupCheckParametersApplications,
        item_spec=lambda: TextInput(title=_("Database SID"), size=12, allow_empty=False),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_oracle_longactivesessions,
        title=lambda: _("Oracle Long Active Sessions"),
    )
)
Ejemplo n.º 9
0
# 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.plugins.wato.utils import (
    CheckParameterRulespecWithItem,
    rulespec_registry,
    RulespecGroupCheckParametersStorage,
)
from cmk.gui.valuespec import Float, TextInput, Tuple


def _parameter_valuespec_read_hits() -> Tuple:
    return Tuple(
        title=_("Prefetch hits"),
        elements=[
            Float(title=_("Warning below"), default_value=95.0),
            Float(title=_("Critical below"), default_value=90.0),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="read_hits",
        group=RulespecGroupCheckParametersStorage,
        item_spec=lambda: TextInput(title=_("Port index or 'Total'")),
        parameter_valuespec=_parameter_valuespec_read_hits,
        title=lambda: _("DDN S2A read prefetch hits"),
    ))
Ejemplo n.º 10
0
        help=
        _("You need to concatenate the device name which is configured in the special agent "
          "for the PLC device separated by a space with the ident of the value which is also "
          "configured in the special agent."),
        allow_empty=True,
    )


def _parameter_valuespec_siemens_plc_flag():
    return DropdownChoice(
        help=_(
            "This rule sets the expected state, the one which should result in an OK state, "
            "of the monitored flags of Siemens PLC devices."),
        title=_("Expected flag state"),
        choices=[
            (True, _("Expect the flag to be: On")),
            (False, _("Expect the flag to be: Off")),
        ],
        default_value=True,
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="siemens_plc_flag",
        group=RulespecGroupCheckParametersEnvironment,
        item_spec=_item_spec_siemens_plc_flag,
        parameter_valuespec=_parameter_valuespec_siemens_plc_flag,
        title=lambda: _("Siemens PLC Flag state"),
    ))
Ejemplo n.º 11
0
from cmk.gui.plugins.wato.utils import (
    CheckParameterRulespecWithItem,
    rulespec_registry,
    RulespecGroupCheckParametersApplications,
)
from cmk.gui.valuespec import Dictionary, MonitoringState


def _parameter_valuespec():
    return Dictionary(elements=[
        (
            "failed_state",
            MonitoringState(
                title=
                _("Monitoring state if a container terminates unsuccessfully (exit code 1)."
                  ),
                default_value=2,
            ),
        ),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="kube_pod_containers",
        group=RulespecGroupCheckParametersApplications,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec,
        title=lambda: _("Pod containers"),
    ))
Ejemplo n.º 12
0
                                ], ),
                            ),
                        ],
                    ),
                ),
                (
                    "swap_errors",
                    MonitoringState(
                        title=_("Monitoring state in case of swap errors"),
                        default_value=0,
                    ),
                ),
            ],
            optional_keys=True,
        ),
        # Convert default levels from discovered checks
        forth=lambda v: not isinstance(v, dict) and
        {"levels": ("perc_used", v)} or v,
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="memory_simple",
        group=RulespecGroupCheckParametersOperatingSystem,
        item_spec=_item_spec_memory_simple,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_memory_simple,
        title=lambda: _("Main memory usage of simple devices"),
    ))
Ejemplo n.º 13
0
                                            ("secondary_Outdated", _("Secondary - Outdated")),
                                            ("secondary_DUnknown", _("Secondary - DUnknown")),
                                            ("secondary_Consistent", _("Secondary - Consistent")),
                                            ("secondary_UpToDate", _("Secondary - UpToDate")),
                                        ],
                                    ),
                                    MonitoringState(title=_("Resulting state")),
                                ],
                                orientation="horizontal",
                            ),
                            title=_("Set diskstates"),
                            add_label=_("Add diskstate rule"),
                        ),
                    ],
                ),
            ),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="drbd",
        group=RulespecGroupCheckParametersStorage,
        item_spec=lambda: TextInput(title=_("DRBD device")),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_drbd,
        title=lambda: _("DR:BD roles and diskstates"),
    )
)
Ejemplo n.º 14
0
                MonitoringState(
                    title=_("Monitoring state for any other service state"),
                    default_value=2,
                ),
            ),
            (
                "else",
                MonitoringState(
                    title=_("Monitoring state if a monitored service is not found at all."),
                    default_value=2,
                ),
            ),
        ],
        help=_(
            "This ruleset only applies when individual Systemd services are discovered. The user "
            "needs to configure this option in the discovery section."
        ),
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="systemd_services",
        group=RulespecGroupCheckParametersApplications,
        item_spec=lambda: TextInput(title=_("Name of the service")),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_systemd_services,
        title=lambda: _("Systemd single services"),
    )
)
Ejemplo n.º 15
0
    CheckParameterRulespecWithItem,
    rulespec_registry,
    RulespecGroupCheckParametersStorage,
)
from cmk.gui.valuespec import Integer, TextInput, Tuple


def _parameter_valuespec_hpux_multipath():
    return Tuple(
        title=_("Expected path situation"),
        help=_(
            "This rules sets the expected number of various paths for a multipath LUN "
            "on HPUX servers"),
        elements=[
            Integer(title=_("Number of active paths")),
            Integer(title=_("Number of standby paths")),
            Integer(title=_("Number of failed paths")),
            Integer(title=_("Number of unopen paths")),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="hpux_multipath",
        group=RulespecGroupCheckParametersStorage,
        item_spec=lambda: TextInput(title=_("WWID of the LUN")),
        parameter_valuespec=_parameter_valuespec_hpux_multipath,
        title=lambda: _("HP-UX Multipath Count"),
    ))
                        ),
                    ],
                ),
            ),
            (
                "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: TextInput(title=_("VSID")),
        parameter_valuespec=_parameter_valuespec_checkpoint_vsx_connections,
        title=lambda: _("Checkpoint VSID connections"),
    ))
Ejemplo n.º 17
0
                    help=
                    _("Here you can enter either device state number (eg. from SNMP devices) "
                      "or exact device state name and the related monitoring state."
                      ),
                ),
            ),
        ],
        ignored_keys=["_item_key"],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="el_inphase",
        group=RulespecGroupCheckParametersEnvironment,
        item_spec=_item_spec_el_inphase,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_el_inphase,
        title=lambda: _("Parameters for input phases of UPSs and PDUs"),
    ))


def _item_spec_ups_outphase():
    return TextInput(
        title=_("Output Name"),
        help=_("The name of the output, e.g. <tt>Phase 1</tt>/<tt>PDU 1</tt>"),
    )


def _transform_parameter_valuespec_ups_outphase(
        params: Dict[str, Any]) -> Dict[str, Any]:
    changed_keys = {"load": "output_load"}
Ejemplo n.º 18
0
                        Float(title=_("Frequencies up to"), unit="MHz"),
                        Float(title=_("Warning below"), unit="V"),
                        Float(title=_("Critical below"), unit="V"),
                        Float(title=_("Warning at or above"), unit="V"),
                        Float(title=_("Critical at or above"), unit="V"),
                    ], ),
                    title=_("Lock voltages for TX PLL"),
                    help=
                    _("Specify frequency ranges by the upper boundary of the range "
                      "to which the voltage levels are to apply. The list is sorted "
                      "automatically when saving."),
                    movable=False,
                ),
            ),
        ],
        optional_keys=["rx", "tx"],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="pll_lock_voltage",
        group=RulespecGroupCheckParametersEnvironment,
        item_spec=lambda: DropdownChoice(title=_("RX/TX"),
                                         choices=[("RX", _("RX")),
                                                  ("TX", _("TX"))]),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_pll_lock_voltage,
        title=lambda: _("Lock Voltage for PLLs"),
    ))
Ejemplo n.º 19
0
            (
                "perc_conn_threads",
                Tuple(
                    title=("Currently open connections"),
                    help=_(
                        "Compares the number of currently open connections to the server "
                        "with the maximum simultaneous connections allowed by the configuration "
                        "of the server. This threshold raises warning/critical states if the "
                        "percentage is equal to or above the configured levels."
                    ),
                    elements=[
                        Percentage(title=_("Warning at")),
                        Percentage(title=_("Critical at")),
                    ],
                ),
            ),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="mysql_connections",
        group=RulespecGroupCheckParametersApplications,
        item_spec=_item_spec_mysql_connections,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_mysql_connections,
        title=lambda: _("MySQL Connections"),
    )
)
Ejemplo n.º 20
0
                        default_value=default_value,
                    ),
                ) for vm_state, default_value in VM_STATES_DEFVALS],
            ),
            FixedValue(
                value={"compare_discovery": True},
                title=_("Compare against discovered state"),
                totext=
                _("Compare the current state of the VM against the discovered state"
                  ),
                help=
                _("Compare the current state of the VM against the state at the point in time "
                  "when the VM was discovered. If the two states do not match, the service "
                  "will go to CRIT. Note that this only works if the check is not executed as "
                  "a manual check. If you choose this option for manual checks, the service "
                  "will go always to UNKN."),
            ),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="hyperv_vms",
        group=RulespecGroupCheckParametersApplications,
        item_spec=_item_spec_hyperv_vms,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_hyperv_vms,
        title=lambda: _("Microsoft Hyper-V Server VM state"),
    ))
Ejemplo n.º 21
0
            Tuple(
                title=_("Upper level for file descriptor open attempts rate"),
                elements=[
                    Float(title=_("Warning at"), unit="1/s"),
                    Float(title=_("Critical at"), unit="1/s"),
                ],
            ),
        ),
        (
            "fd_open_rate_lower",
            Tuple(
                title=_("Lower level for file descriptor open attempts rate"),
                elements=[
                    Float(title=_("Warning below"), unit="1/s"),
                    Float(title=_("Critical below"), unit="1/s"),
                ],
            ),
        ),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="rabbitmq_nodes_filedesc",
        group=RulespecGroupCheckParametersApplications,
        item_spec=lambda: TextInput(title=_("Node name")),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_rabbitmq_nodes_filedesc,
        title=lambda: _("RabbitMQ nodes filedescriptors"),
    ))
Ejemplo n.º 22
0
                    title=_("Upper levels"),
                    elements=[
                        Integer(title=_("warning at"), unit="rpm"),
                        Integer(title=_("critical at"), unit="rpm"),
                    ],
                ),
            ),
            (
                "output_metrics",
                Checkbox(title=_("Performance data"), label=_("Enable performance data")),
            ),
        ],
        optional_keys=["upper", "output_metrics"],
    )
    return Transform(
        valuespec=hw_fans_dict,
        forth=lambda spec: spec if isinstance(spec, dict) else {"lower": spec},
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="hw_fans",
        group=RulespecGroupCheckParametersEnvironment,
        item_spec=lambda: TextInput(title=_("Fan Name"), help=_("The identificator of the fan.")),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_hw_fans,
        title=lambda: _("FAN speed of Hardware devices"),
    )
)
Ejemplo n.º 23
0
                    _("This feature is to apply different rules to files that are "
                      "inconsistent with the files expected in this file group. "
                      "This means that the rules set for the file group are overwritten. "
                      "You can specify a filename or a regular expresion, and additional "
                      "rules that are applied to the matching files. In case of multiple "
                      "matching rules, the first matching rule is applied. "
                      "Note: this feature is intended for outliers, and is therefore not "
                      "suitable to configure subgroups. "),
                ),
            ),
        ],
        help=
        _("Here you can impose various levels on the results reported by the"
          " mk_filstats plugin. Note that some levels only apply to a matching"
          " output format (e.g. max/min count levels are not applied if only the"
          " smallest, largest, oldest and newest file is reported). In order to"
          " receive the required data, you must configure the plugin mk_filestats."
          ),
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="filestats",
        group=RulespecGroupCheckParametersStorage,
        item_spec=_item_spec_filestats,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_filestats,
        title=lambda: _("Size, age and count of file groups (mk_filestats)"),
    ))
def _parameter_valuespec_docsis_channels_downstream():
    return Dictionary(elements=[
        (
            "power",
            Tuple(
                title=_("Transmit Power"),
                help=_("The operational transmit power"),
                elements=[
                    Float(title=_("warning at or below"),
                          unit="dBmV",
                          default_value=5.0),
                    Float(title=_("critical at or below"),
                          unit="dBmV",
                          default_value=1.0),
                ],
            ),
        ),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="docsis_channels_downstream",
        group=RulespecGroupCheckParametersNetworking,
        item_spec=lambda: TextInput(title=_(
            "ID of the channel (usually ranging from 1)")),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_docsis_channels_downstream,
        title=lambda: _("Docsis Downstream Channels"),
    ))
Ejemplo n.º 25
0
                title=_("Policy specific levels (Clustermode only)"),
                help=
                _("Here you can specify levels for different policies which overrule the levels "
                  "from the <i>Default levels</i> parameter. This setting only works in NetApp Clustermode setups."
                  ),
                allow_empty=False,
            ),
        ),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="snapvault",
        group=RulespecGroupCheckParametersStorage,
        item_spec=lambda: TextInput(title=_("Source Path"), allow_empty=False),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_snapvault,
        title=lambda: _("NetApp Snapvaults / Snapmirror Lag Time"),
    ))


def _discovery_valuespec_snapvault():
    return Dictionary(
        elements=[
            (
                "exclude_destination_vserver",
                Checkbox(
                    title=_("Exclude destination vserver"),
                    help=
                    _("Only applicable to clustermode installations. "
                      "The service description of snapvault services is composed of the "
Ejemplo n.º 26
0
def _parameter_valuespec_websphere_mq_instance():
    return Dictionary(elements=[
        (
            "map_instance_states",
            ListOf(
                Tuple(
                    orientation="horizontal",
                    elements=[
                        DropdownChoice(choices=[
                            ("active", _("Active")),
                            ("standby", _("Standby")),
                        ], ),
                        MonitoringState(),
                    ],
                ),
                title=_("Map instance state"),
            ),
        ),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="websphere_mq_instance",
        group=RulespecGroupCheckParametersApplications,
        item_spec=lambda: TextInput(title=_("Name of manager or instance")),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_websphere_mq_instance,
        title=lambda: _("Websphere MQ Instance"),
    ))
Ejemplo n.º 27
0
                    elements=[
                        Float(title=_("warning if below or equal"), unit="V", default_value=11.9),
                        Float(title=_("critical if below or equal"), unit="V", default_value=11.8),
                    ],
                ),
            ),
            (
                "levels_12v_upper",
                Tuple(
                    title=_("12 Volt Output Upper Levels"),
                    elements=[
                        Float(title=_("warning if above or equal"), unit="V", default_value=12.1),
                        Float(title=_("critical if above or equal"), unit="V", default_value=12.2),
                    ],
                ),
            ),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="hp_msa_psu_voltage",
        group=RulespecGroupCheckParametersEnvironment,
        item_spec=_item_spec_hp_msa_psu_voltage,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_hp_msa_psu_voltage,
        title=lambda: _("HP MSA Power Supply Voltage Levels"),
    )
)
Ejemplo n.º 28
0
            Tuple(
                title=_("Write throughput per second"),
                elements=[
                    Filesize(title=_("Warning at")),
                    Filesize(title=_("Critical at")),
                ],
            ),
        ),
        (
            "total",
            Tuple(
                title=_("Total throughput per second"),
                elements=[
                    Filesize(title=_("Warning at")),
                    Filesize(title=_("Critical at")),
                ],
            ),
        ),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="storage_throughput",
        group=RulespecGroupCheckParametersStorage,
        item_spec=lambda: TextInput(title=_("Port index or 'Total'")),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_storage_throughput,
        title=lambda: _("DDN S2A throughput"),
    ))
Ejemplo n.º 29
0
def _parameter_valuespec_sansymphony_pool():
    return Tuple(
        help=_("This rule sets the warn and crit levels for the percentage of allocated pools"),
        elements=[
            Integer(
                title=_("Warning at"),
                unit=_("percent"),
                default_value=80,
            ),
            Integer(
                title=_("Critical at"),
                unit=_("percent"),
                default_value=90,
            ),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="sansymphony_pool",
        group=RulespecGroupCheckParametersApplications,
        item_spec=lambda: TextInput(
            title=_("Name of the pool"),
        ),
        parameter_valuespec=_parameter_valuespec_sansymphony_pool,
        title=lambda: _("Sansymphony pool allocation"),
    )
)
Ejemplo n.º 30
0
    CheckParameterRulespecWithItem,
    rulespec_registry,
    RulespecGroupCheckParametersApplications,
)
from cmk.gui.valuespec import Dictionary, ListOf, MonitoringState, TextInput, Tuple


def _parameter_valuespec_generic_string():
    return Dictionary(elements=[
        ("default_status", MonitoringState(title=_("Default Status"))),
        (
            "match_strings",
            ListOf(
                Tuple(elements=[
                    TextInput(title=_("Search string")),
                    MonitoringState(),
                ], )),
        ),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="generic_string",
        group=RulespecGroupCheckParametersApplications,
        item_spec=lambda: TextInput(title=_("Item"), ),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_generic_string,
        title=lambda: _("Generic string"),
    ))