Esempio n. 1
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"),
    ))
Esempio n. 2
0
from cmk.gui.i18n import _
from cmk.gui.valuespec import (
    Dictionary,
    MonitoringState,
    TextInput,
)

from cmk.gui.plugins.wato import (
    CheckParameterRulespecWithItem,
    rulespec_registry,
    RulespecGroupCheckParametersApplications,
)


def _parameter_valuespec_mssql_instance():
    return Dictionary(elements=[("map_connection_state",
                                 MonitoringState(title=_("Connection status"),
                                                 default_value=2))], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="mssql_instance",
        group=RulespecGroupCheckParametersApplications,
        item_spec=lambda: TextInput(title=_("Instance identifier"), ),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_mssql_instance,
        title=lambda: _("MSSQL Instance"),
    ))
Esempio n. 3
0
    CheckParameterRulespecWithItem,
    rulespec_registry,
    RulespecGroupCheckParametersApplications,
)


def _parameter_valuespec_hacmp_resources():
    return Dictionary(
        elements=[
            ("expect_online_on",
             DropdownChoice(
                 title=_(u"Expect resource to be online on"),
                 choices=[
                     ("first", _(u"the first node")),
                     ("any", _(u"any node")),
                 ],
             )),
        ],
        optional_keys=[],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="hacmp_resources",
        group=RulespecGroupCheckParametersApplications,
        item_spec=lambda: TextAscii(title=_("Resource Group")),
        parameter_valuespec=_parameter_valuespec_hacmp_resources,
        title=lambda: _("AIX HACMP Resource Groups"),
    ))
Esempio n. 4
0
            default_value=0,
        )),
        ("unknown", MonitoringState(
            title=_("unknown"),
            default_value=3,
        )),
        ("init", MonitoringState(
            title=_("init"),
            default_value=0,
        )),
        ("backup", MonitoringState(
            title=_("backup"),
            default_value=0,
        )),
        ("fault", MonitoringState(
            title=_("fault"),
            default_value=2,
        )),
    ])


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="keepalived",
        group=RulespecGroupCheckParametersApplications,
        item_spec=lambda: TextInput(title=_("VRRP Instance"), ),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_keepalived,
        title=lambda: _("Keepalived Parameters"),
    ))
Esempio n. 5
0
                            Percentage(
                                title=_("Critical at usage of"),
                                default_value=90.0,
                                maxvalue=None,
                            ),
                        ], ),
                    ),
                    (
                        "fd_abs",
                        _("Absolut level for total number of used sockets"),
                        Tuple(elements=[
                            Integer(title=_("Warning at"), unit="sockets"),
                            Integer(title=_("Critical at"), unit="sockets"),
                        ], ),
                    ),
                ],
            ),
        ),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="rabbitmq_nodes_sockets",
        group=RulespecGroupCheckParametersApplications,
        item_spec=lambda: TextInput(title=_("Node name")),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_rabbitmq_nodes_sockets,
        title=lambda: _("RabbitMQ nodes sockets"),
    ))
Esempio n. 6
0
             Tuple(
                 title=_("Packet loss in percentage"),
                 elements=[
                     Integer(title=_("Warning at"),
                             default_value=10,
                             unit=_("%"),
                             min_value=0),
                     Integer(title=_("Critical at"),
                             default_value=25,
                             unit=_("%"),
                             min_value=0),
                 ],
                 help=_(
                     "The maximum allowed percentage of packet loss to the destination before this service "
                     "goes into warning/critical."),
             )),
        ],
        optional_keys=False,
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="mtr",
        group=RulespecGroupCheckParametersNetworking,
        item_spec=_item_spec_mtr,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_mtr,
        title=lambda: _("Traceroute with MTR"),
    ))
Esempio n. 7
0
            )
        ])


def _item_spec_citrix_licenses():
    return TextInput(
        title=_("ID of the license, e.g. <tt>PVSD_STD_CCS</tt>"),
        allow_empty=False,
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="citrix_licenses",
        group=RulespecGroupCheckParametersApplications,
        item_spec=_item_spec_citrix_licenses,
        parameter_valuespec=_vs_license,
        title=lambda: _("Number of used Citrix licenses"),
    ))


def _item_spec_esx_licenses():
    return TextInput(
        title=_("Name of the license"),
        help=_("For example <tt>VMware vSphere 5 Standard</tt>"),
        allow_empty=False,
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
Esempio n. 8
0
                 title=_("Map device state"),
                 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"}
    return {changed_keys.get(k, k): v for k, v in params.items()}
Esempio n. 9
0
from cmk.gui.i18n import _
from cmk.gui.valuespec import (
    Percentage,
    TextAscii,
    Tuple,
)

from cmk.gui.plugins.wato import (
    CheckParameterRulespecWithItem,
    rulespec_registry,
    RulespecGroupCheckParametersNetworking,
)


def _parameter_valuespec_signal_quality():
    return Tuple(elements=[
        Percentage(title=_("Warning if under"), maxvalue=100),
        Percentage(title=_("Critical if under"), maxvalue=100),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="signal_quality",
        group=RulespecGroupCheckParametersNetworking,
        item_spec=lambda: TextAscii(title=_("Network specification"),
                                    allow_empty=True),
        parameter_valuespec=_parameter_valuespec_signal_quality,
        title=lambda: _("Signal quality of Wireless device"),
    ))
Esempio n. 10
0
        elements=[
            ('curr_items', _int_tuple(_('Levels for active items'))),
            ('non_residents', _int_tuple(_('Levels for non-resident items'))),
            ('curr_items_tot',
             _int_tuple(_('Levels for total number of items'))),
            ('fetched_items',
             _int_tuple(
                 _('Buckets only: Levels for number of items fetched from disk'
                   ))),
            ('disk_write_ql',
             _int_tuple(
                 _('Buckets only: Levels for length of disk write queue'))),
            ('disk_fill_rate',
             _float_tuple(_('Buckets only: Levels for disk queue fill rate'))),
            ('disk_drain_rate',
             _float_tuple(
                 _('Buckets only: Levels for disk queue drain rate'))),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="couchbase_items",
        group=RulespecGroupCheckParametersApplications,
        match_type="dict",
        item_spec=lambda: TextInput(title=_('Node or Bucket name')),
        parameter_valuespec=_parameter_valuespec_couchbase_operations,
        title=lambda: _("Couchbase Items"),
    ))
Esempio n. 11
0
                 FixedValue(
                     False,
                     title=_("All must be online"),
                     totext="",
                 ),
                 Tuple(
                     title=_("Specify levels"),
                     elements=[
                         Integer(title=_("Warning below"),
                                 minvalue=-1,
                                 unit=_("online canisters")),
                         Integer(title=_("Critical below"),
                                 minvalue=-1,
                                 unit=_("online canisters")),
                     ],
                 ),
             ],
         ))
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="ibm_svc_enclosure",
        group=RulespecGroupCheckParametersStorage,
        item_spec=_item_spec_ibm_svc_enclosure,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_ibm_svc_enclosure,
        title=lambda: _("IBM SVC Enclosure"),
    ))
Esempio n. 12
0
                      Integer(title=_("Warning at"), unit=_("per second"), default_value=20),
                      Integer(title=_("Critical at"), unit=_("per second"), default_value=40),
                  ],)),
             ],
             optional_keys=[],
         )),
        ('packets_dropped',
         Dictionary(
             title=_("Packets Dropped"),
             elements=[
                 ("upper",
                  Tuple(elements=[
                      Integer(title=_("Warning at"), unit=_("per second"), default_value=200),
                      Integer(title=_("Critical at"), unit=_("per second"), default_value=400),
                  ],)),
             ],
             optional_keys=[],
         )),
    ],)


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="skype_edge",
        group=RulespecGroupCheckParametersApplications,
        item_spec=_item_spec_skype_edge,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_skype_edge,
        title=lambda: _("Skype for Business Edge"),
    ))
Esempio n. 13
0
                     )),
                 Dictionary(elements=[
                     ("lower",
                      Tuple(
                          title=_("Lower levels"),
                          elements=[Float(), Float()],
                      )),
                     ("upper",
                      Tuple(
                          title=_("Upper levels"),
                          elements=[Float(), Float()],
                      )),
                 ], ),
             ], ),
                    title=_(
                        "Set lower and upper levels for numerical sensors"))),
        ],
        ignored_keys=["ignored_sensors", "ignored_sensor_states"],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="ipmi",
        group=RulespecGroupCheckParametersEnvironment,
        item_spec=lambda: TextAscii(title=_("The sensor name")),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_ipmi,
        title=lambda: _("IPMI sensors"),
    ))
Esempio n. 14
0
from cmk.gui.valuespec import Dictionary, Percentage, TextInput, Tuple


def _parameter_valuespec_printer_output():
    return Dictionary(
        elements=[
            (
                "capacity_levels",
                Tuple(
                    title=_("Capacity filled"),
                    elements=[
                        Percentage(title=_("Warning at"), default_value=0.0),
                        Percentage(title=_("Critical at"), default_value=0.0),
                    ],
                ),
            ),
        ],
        default_keys=["capacity_levels"],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="printer_output",
        group=RulespecGroupCheckParametersPrinters,
        item_spec=lambda: TextInput(title=_("Unit Name"), allow_empty=True),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_printer_output,
        title=lambda: _("Printer Output Units"),
    ))
         )),
        ('correcteds',
         Tuple(
             title=_("Levels for rate of corrected errors"),
             elements=[
                 Percentage(title=_("Warning at"), default_value=5.0),
                 Percentage(title=_("Critical at"), default_value=8.0),
             ],
         )),
        ('uncorrectables',
         Tuple(
             title=_("Levels for rate of uncorrectable errors"),
             elements=[
                 Percentage(title=_("Warning at"), default_value=1.0),
                 Percentage(title=_("Critical at"), default_value=2.0),
             ],
         )),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="docsis_channels_upstream",
        group=RulespecGroupCheckParametersNetworking,
        item_spec=lambda: TextAscii(title=_(
            "ID of the channel (usually ranging from 1)")),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_docsis_channels_upstream,
        title=lambda: _("Docsis Upstream Channels"),
    ))
Esempio n. 16
0
             elements=[
                 Tuple(
                     title=_("Percentual levels (in relation to policy speed)"),
                     elements=[
                         Percentage(title=_("Warning at"),
                                    maxvalue=1000,
                                    label=_("% of port speed")),
                         Percentage(title=_("Critical at"),
                                    maxvalue=1000,
                                    label=_("% of port speed")),
                     ],
                 ),
                 Tuple(elements=[
                     Integer(title=_("Warning at"), size=8, label=_("bits / bytes per second")),
                     Integer(title=_("Critical at"), size=8, label=_("bits / bytes per second")),
                 ],)
             ],
         )),
    ],)


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="cisco_qos",
        group=RulespecGroupCheckParametersNetworking,
        item_spec=lambda: TextAscii(title=_("port specification"), allow_empty=False),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_cisco_qos,
        title=lambda: _("Cisco quality of service"),
    ))
Esempio n. 17
0
                title=_("Map auto close status"),
                optional_keys=[],
            ),
        ),
        (
            "map_auto_shrink_state",
            Dictionary(
                elements=[
                    ("on",
                     MonitoringState(title=_("Auto shrink on"),
                                     default_value=1)),
                    ("off", MonitoringState(title=_("Auto shrink off"))),
                ],
                title=_("Map auto shrink status"),
                optional_keys=[],
            ),
        ),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="mssql_databases",
        group=RulespecGroupCheckParametersApplications,
        item_spec=lambda: TextInput(title=_("Database identifier"),
                                    allow_empty=False),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_mssql_databases,
        title=lambda: _("MSSQL Databases properties"),
    ))
Esempio n. 18
0
STATES_CHECK_RES = [("deleted", 2), ("read-only", 1), ("read-write", 0),
                    ("replication destination", 0),
                    ("retention lock disabled", 0),
                    ("retention lock enabled", 0), ("unknown", 3)]


def _parameter_valuespec_emc_datadomain_mtree():
    return Dictionary(
        title=_("Mapping of MTree state to monitoring state"),
        help=
        _("Define a translation of the possible states of the MTree to monitoring "
          "states, i.e. to the result of the check. This overwrites the default "
          "mapping used by the check."),
        elements=[(state,
                   MonitoringState(title=_(
                       "Monitoring state if MTree state is '%s'" % state),
                                   default_value=check_res))
                  for state, check_res in STATES_CHECK_RES])


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="emc_datadomain_mtree",
        group=RulespecGroupCheckParametersStorage,
        item_spec=lambda: TextAscii(title=_("MTree name")),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_emc_datadomain_mtree,
        title=lambda: _("State of EMC Data Domain MTree"),
    ))
Esempio n. 19
0
         Levels(title=_("Maximum rate of accepted packets"),
                default_value=None,
                default_levels=(100000, 200000),
                unit="pkts/sec")),
        ("packets_rejected",
         Levels(title=_("Maximum rate of rejected packets"),
                default_value=None,
                default_levels=(100000, 200000),
                unit="pkts/sec")),
        ("packets_dropped",
         Levels(title=_("Maximum rate of dropped packets"),
                default_value=None,
                default_levels=(100000, 200000),
                unit="pkts/sec")),
        ("packets_logged",
         Levels(title=_("Maximum rate of sent logs"),
                default_value=None,
                default_levels=(100000, 200000),
                unit="pkts/sec")),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="checkpoint_vsx_packets",
        group=RulespecGroupCheckParametersNetworking,
        item_spec=lambda: TextInput(title=_("VSID")),
        parameter_valuespec=_parameter_valuespec_checkpoint_vsx_packets,
        title=lambda: _("Checkpoint VSID packet rate"),
    ))
Esempio n. 20
0
                 ],
             )),
            ("maxcount",
             Tuple(
                 title=_("Maximal file count"),
                 elements=[
                     Integer(title=_("Warning if above")),
                     Integer(title=_("Critical if above")),
                 ],
             )),
        ],
        help=
        _("Here you can impose various levels the results reported by the"
          " mk_filstats plugin. Note that some levels only apply to a matching"
          " putput format (e.g. max/min count levels are not applied if only the"
          " smallest, largest, oldes 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)"),
    ))
Esempio n. 21
0

def _parameter_valuespec_jvm_threads():
    return Tuple(
        help=_("This rule sets the warn and crit levels for the number of threads "
               "running in a JVM."),
        elements=[
            Integer(
                title=_("Warning at"),
                unit=_("threads"),
                default_value=80,
            ),
            Integer(
                title=_("Critical at"),
                unit=_("threads"),
                default_value=100,
            ),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="jvm_threads",
        group=RulespecGroupCheckParametersApplications,
        is_deprecated=True,
        item_spec=_item_spec_jvm_threads,
        parameter_valuespec=_parameter_valuespec_jvm_threads,
        title=lambda: _("JVM threads"),
    ))
Esempio n. 22
0
        ("levels",
         Tuple(
             title=_("Levels for remaining undo retention"),
             elements=[
                 Age(title=_("warning if less then"), default_value=600),
                 Age(title=_("critical if less then"), default_value=300),
             ],
         )),
        (
            'nospaceerrcnt_state',
            MonitoringState(
                default_value=2,
                title=_(
                    "State in case of non space error count is greater then 0: "
                ),
            ),
        ),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="oracle_undostat",
        group=RulespecGroupCheckParametersApplications,
        item_spec=lambda: TextAscii(
            title=_("Database SID"), size=12, allow_empty=False),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_oracle_undostat,
        title=lambda: _("Oracle Undo Retention"),
    ))
Esempio n. 23
0
    rulespec_registry,
    RulespecGroupCheckParametersStorage,
)
from cmk.gui.plugins.wato.check_parameters.utils import vs_filesystem


def _parameter_valuespec_threepar_capacity():
    return vs_filesystem([
        (
            "failed_capacity_levels",
            Tuple(
                title=_("Levels for failed capacity in percent"),
                elements=[
                    Percentage(title=_("Warning at"), default_value=0.0),
                    Percentage(title=_("Critical at"), default_value=0.0),
                ],
            ),
        ),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="threepar_capacity",
        group=RulespecGroupCheckParametersStorage,
        item_spec=lambda: TextAscii(title=_("Device type"), allow_empty=False),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_threepar_capacity,
        title=lambda: _("3Par Capacity (used space and growth)"),
    ))
Esempio n. 24
0
def _parameter_valuespec_pci_io_utilization_multiitem():
    return Dictionary(
        help=
        _("The PCI IO utilization of components of a device (e.g. PCI Express card IO"
          "utilization of the rack units as components of a rack server as device)"
          "in the last check interval. The possible range is from 0% to 100%"),
        elements=[
            (
                "upper_levels",
                Tuple(
                    title=_("Alert on too high PCI IO utilization"),
                    elements=[
                        Percentage(title=_("Warning at"), default_value=90.0),
                        Percentage(title=_("Critical at"), default_value=95.0),
                    ],
                ),
            ),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="pci_io_utilization_multiitem",
        group=RulespecGroupCheckParametersEnvironment,
        item_spec=lambda: TextInput(title=_("Component"), allow_empty=False),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_pci_io_utilization_multiitem,
        title=lambda: _("Device Component PCI IO Utilization"),
    ))
Esempio n. 25
0
             )),
            ("count",
             Tuple(
                 title=_("Total count"),
                 elements=[
                     Integer(title=_("Warning at")),
                     Integer(title=_("Critical at")),
                 ],
             )),
            ("active",
             Tuple(
                 title=_("Active"),
                 elements=[
                     Integer(title=_("Warning at")),
                     Integer(title=_("Critical at")),
                 ],
             )),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="docker_node_disk_usage",
        group=RulespecGroupCheckParametersApplications,
        item_spec=_item_spec_docker_node_disk_usage,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_docker_node_disk_usage,
        title=lambda: _("Docker node disk usage"),
    ))
Esempio n. 26
0
    TextAscii,
)

from cmk.gui.plugins.wato import (
    CheckParameterRulespecWithItem,
    rulespec_registry,
    RulespecGroupCheckParametersEnvironment,
)


def _parameter_valuespec_switch_contact():
    return DropdownChoice(
        help=_("This rule sets the required state of a switch contact"),
        label=_("Required switch contact state"),
        choices=[
            ("open", "Switch contact is <b>open</b>"),
            ("closed", "Switch contact is <b>closed</b>"),
            ("ignore", "Ignore switch contact state"),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="switch_contact",
        group=RulespecGroupCheckParametersEnvironment,
        item_spec=lambda: TextAscii(title=_("Sensor"), allow_empty=False),
        parameter_valuespec=_parameter_valuespec_switch_contact,
        title=lambda: _("Switch contact state"),
    ))
Esempio n. 27
0
                                    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: TextInput(title=_("Name of queue")),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_websphere_mq,
        title=lambda: _("Websphere MQ"),
    ))
Esempio n. 28
0
def _item_spec_siemens_plc_flag():
    return TextAscii(
        title=_("Device Name and Value Ident"),
        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"),
    ))
Esempio n. 29
0
            (
                "total_size",
                Tuple(
                    title=_("Maximum size of all files on backup space"),
                    help=
                    _("The maximum size of all files on the backup space. "
                      "This might be set to the allowed quotas on the configured "
                      "FTP server to be notified if the space limit is reached."
                      ),
                    elements=[
                        Filesize(title=_("Warning at")),
                        Filesize(title=_("Critical at")),
                    ],
                ),
            ),
        ],
        optional_keys=['backup_age', 'total_size'],
    )


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="plesk_backups",
        group=RulespecGroupCheckParametersApplications,
        item_spec=lambda: TextInput(title=_("Service descriptions"),
                                    allow_empty=False),
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_plesk_backups,
        title=lambda: _("Plesk Backups"),
    ))
Esempio n. 30
0
         )),
        ("write",
         Tuple(
             title=_("Write throughput"),
             elements=[
                 Float(title=_("warning at"), unit=_("MB/s")),
                 Float(title=_("critical at"), unit=_("MB/s"))
             ],
         )),
        ("average",
         Integer(title=_("Average"),
                 help=_("When averaging is set, a floating average value "
                        "of the disk throughput is computed and the levels for read "
                        "and write will be applied to the average instead of the current "
                        "value."),
                 minvalue=1,
                 default_value=5,
                 unit=_("minutes")))
    ],)


rulespec_registry.register(
    CheckParameterRulespecWithItem(
        check_group_name="mysql_innodb_io",
        group=RulespecGroupCheckParametersApplications,
        item_spec=_item_spec_mysql_innodb_io,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_mysql_innodb_io,
        title=lambda: _("MySQL InnoDB Throughput"),
    ))