Exemplo n.º 1
0
        title=_("Number of signed-in web users"),
        elements=[(
            "upper_number_of_users",
            Tuple(elements=[
                Integer(title=_("warning at")),
                Integer(title=_("critical at")),
            ], ),
        )],
        optional_keys=False,
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="pulse_secure_users",
        group=RulespecGroupCheckParametersApplications,
        parameter_valuespec=_parameter_valuespec_pulse_secure_users,
        title=lambda: _("Pulse Secure users"),
    ))


def _parameter_valuespec_pulse_secure_disk_util():
    return Dictionary(
        title=_("Upper levels for disk utilization"),
        elements=[(
            "upper_levels",
            Tuple(elements=[
                Percentage(title=_("warning at"),
                           allow_int=True,
                           default_value=80),
                Percentage(title=_("critical at"),
                           allow_int=True,
Exemplo n.º 2
0
            ("show_failed_actions",
             DropdownChoice(
                 title=_('Show "Failed Actions"'),
                 choices=[
                     (False,
                      _('Don\'t show or warn if "Failed Actions" are present (default)'
                        )),
                     (True,
                      _('Show "Failed Actions" and warn if any is present')),
                 ],
                 default_value=False,
                 help=_(
                     'If activated, any "Failed Action" entry will be shown in the main check '
                     'and the check will go to the WARN state.'),
             )),
        ],
        optional_keys=[
            "dc", "num_nodes", "num_resources", "show_failed_actions"
        ],
    ),
                     forth=_heartbeat_crm_transform_heartbeat_crm)


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="heartbeat_crm",
        group=RulespecGroupCheckParametersStorage,
        parameter_valuespec=_parameter_valuespec_heartbeat_crm,
        title=lambda: _("Heartbeat CRM general status"),
    ))
Exemplo n.º 3
0
def _parameter_valuespec_asa_svc_sessions():
    return Transform(
        Dictionary(title=_("Number of active sessions"),
                   elements=[(
                       "levels_%s" % vpn_type.lower(),
                       Tuple(
                           title="Active %s sessions" % vpn_type,
                           elements=[
                               Integer(
                                   title=_("Warning at"),
                                   unit=_("sessions"),
                               ),
                               Integer(
                                   title=_("Critical at"),
                                   unit=_("sessions"),
                               ),
                           ],
                       ),
                   ) for vpn_type in ["SVC", "WebVPN", "IPsec"]]),
        forth=_transform_asa_svc_sessions,
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="asa_svc_sessions",
        group=RulespecGroupCheckParametersApplications,
        parameter_valuespec=_parameter_valuespec_asa_svc_sessions,
        title=lambda: _("Cisco SVC/WebVPN/IPsec Sessions"),
    ))
Exemplo n.º 4
0
# 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 (
    Integer,
    Tuple,
)
from cmk.gui.plugins.wato import (
    RulespecGroupCheckParametersStorage,
    CheckParameterRulespecWithoutItem,
    rulespec_registry,
)


def _parameter_valuespec_blank_tapes():
    return Tuple(elements=[
        Integer(title=_("Warning below"), default_value=5),
        Integer(title=_("Critical below"), default_value=1),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="blank_tapes",
        group=RulespecGroupCheckParametersStorage,
        parameter_valuespec=_parameter_valuespec_blank_tapes,
        title=lambda: _("DIVA CSM: remaining blank tapes"),
    ))
Exemplo n.º 5
0
# to the Free Software Foundation, Inc., 51 Franklin St,  Fifth Floor,
# Boston, MA 02110-1301 USA.

from cmk.gui.i18n import _
from cmk.gui.valuespec import (Integer, Tuple)

from cmk.gui.plugins.wato import (
    CheckParameterRulespecWithoutItem,
    rulespec_registry,
    RulespecGroupCheckParametersStorage,
)


def _parameter_valuespec_disk_failures():
    return Tuple(
        title=_("Number of disk failures"),
        elements=[
            Integer(title="Warning at", default_value=1),
            Integer(title="Critical at", default_value=2),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="disk_failures",
        group=RulespecGroupCheckParametersStorage,
        parameter_valuespec=_parameter_valuespec_disk_failures,
        title=lambda: _("Number of disk failures"),
    ))
Exemplo n.º 6
0
                ),
                (
                    "average",
                    Integer(
                        title=_("Averaging"),
                        help=_(
                            "If this parameter is set, all measured values will be averaged "
                            "over the specified time interval before levels are being applied. Per "
                            "default, averaging is turned off."
                        ),
                        unit=_("minutes"),
                        minvalue=1,
                        default_value=60,
                    ),
                ),
            ],
            optional_keys=["average"],
        ),
        forth=lambda t: isinstance(t, tuple) and {"levels": t} or t,
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="memory",
        group=RulespecGroupCheckParametersOperatingSystem,
        parameter_valuespec=_parameter_valuespec_memory,
        title=lambda: _("Main memory usage (UNIX / Other Devices)"),
    )
)
Exemplo n.º 7
0
# 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,
)

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


def _parameter_valuespec_check_mk_agent_update():
    return Dictionary(elements=[
        ("error_deployment_globally_disabled",
         MonitoringState(title=_("State if agent deployment is globally disabled"),
                         default_value=1)),
    ],)


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="agent_update",
        group=RulespecGroupCheckParametersApplications,
        parameter_valuespec=_parameter_valuespec_check_mk_agent_update,
        title=lambda: _("Agent update"),
    ))
Exemplo n.º 8
0
    return Tuple(
        title=_("Time since last UPS selftest"),
        elements=[
            Integer(
                title=_("Warning Level for time since last self test"),
                help=_(
                    "Warning Level for time since last diagnostic test of the device. "
                    "For a value of 0 the warning level will not be used"),
                unit=_("days"),
                default_value=0,
            ),
            Integer(
                title=_("Critical Level for time since last self test"),
                help=_(
                    "Critical Level for time since last diagnostic test of the device. "
                    "For a value of 0 the critical level will not be used"),
                unit=_("days"),
                default_value=0,
            ),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="ups_test",
        group=RulespecGroupCheckParametersEnvironment,
        parameter_valuespec=_parameter_valuespec_ups_test,
        title=lambda: _("Time since last UPS selftest"),
    ))
Exemplo n.º 9
0
                      default_value=[2, 3, 4],
                  )),
                 ("critical",
                  ListChoice(
                      title=_("States treated as critical"),
                      choices=bluecat_operstates,
                      default_value=[5],
                  )),
             ],
             required_keys=['warning', 'critical'],
         )),
        ("stratum",
         Tuple(
             title=_("Levels for Stratum "),
             elements=[
                 Integer(title=_("Warning at")),
                 Integer(title=_("Critical at")),
             ],
         )),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="bluecat_ntp",
        group=RulespecGroupCheckParametersNetworking,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_bluecat_ntp,
        title=lambda: _("Bluecat NTP Settings"),
    ))
Exemplo n.º 10
0
    Tuple,
)

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


def _parameter_valuespec_checkpoint_connections():
    return Tuple(
        help=_(
            "This rule sets limits to the current number of connections through "
            "a Checkpoint firewall."),
        title=_("Maximum number of firewall connections"),
        elements=[
            Integer(title=_("Warning at"), default_value=40000),
            Integer(title=_("Critical at"), default_value=50000),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="checkpoint_connections",
        group=RulespecGroupCheckParametersApplications,
        parameter_valuespec=_parameter_valuespec_checkpoint_connections,
        title=lambda: _("Checkpoint Firewall Connections"),
    ))
Exemplo n.º 11
0
    RulespecGroupCheckParametersStorage,
)
from cmk.gui.valuespec import Dictionary, Float, Tuple


def _parameter_valuespec_mongodb_asserts():
    return Dictionary(elements=[(
        "%s_assert_rate" % what,
        Tuple(
            title=_("%s rate") % what.title(),
            elements=[
                Float(title=_("Warning at"),
                      unit=_("Asserts / s"),
                      default_value=1.0),
                Float(title=_("Critical at"),
                      unit=_("Asserts / s"),
                      default_value=2.0),
            ],
        ),
    ) for what in ["msg", "rollovers", "regular", "warning", "user"]], )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="mongodb_asserts",
        group=RulespecGroupCheckParametersStorage,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_mongodb_asserts,
        title=lambda: _("MongoDB Assert Rates"),
    ))
Exemplo n.º 12
0
                default_value=True,
                valuespec=TextInput(
                    title=_("Warn if node status value is not"),
                    default_value="online",
                ),
            ),
        ),
        (
            "required_subscription_status",
            Optional(
                title=_("Subscription Status"),
                label=_("Activate Check (off: ignore subscription status)"),
                default_value=True,
                valuespec=TextInput(
                    title=_("Warn if subscription status value is not"),
                    default_value="Active",
                ),
            ),
        ),
    ])


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        title=lambda: _("Proxmox VE Node Info"),
        check_group_name="proxmox_ve_node_info",
        group=RulespecGroupCheckParametersApplications,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_proxmox_ve_node_info,
    ))
Exemplo n.º 13
0
    Integer,
    Tuple,
)

from cmk.gui.plugins.wato import (
    CheckParameterRulespecWithoutItem,
    rulespec_registry,
    RulespecGroupCheckParametersStorage,
)


def ceph_epoch_element(title):
    return [("epoch",
             Tuple(title=title,
                   elements=[
                       Float(title=_("Warning at")),
                       Float(title=_("Critical at")),
                       Integer(title=_("Average interval"), unit=_("minutes")),
                   ]))]


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="ceph_mgrs",
        group=RulespecGroupCheckParametersStorage,
        match_type="dict",
        parameter_valuespec=lambda: Dictionary(elements=ceph_epoch_element(
            _("MGRs epoch levels and average")), ),
        title=lambda: _("Ceph MGRs"),
    ))
Exemplo n.º 14
0
            (
                "offset",
                Tuple(
                    title=_("Warning levels for Time Offset"),
                    elements=[
                        Integer(
                            title=_("Warning at"),
                            unit=_("microseconds"),
                            default_value=10,
                        ),
                        Integer(
                            title=_("Critical at"),
                            unit=_("microseconds"),
                            default_value=20,
                        ),
                    ],
                ),
            ),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="mbg_lantime_state",
        group=RulespecGroupCheckParametersApplications,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_mbg_lantime_state,
        title=lambda: _("Meinberg Lantime State"),
    ))
Exemplo n.º 15
0
                 Float(title=_("Critical at"), unit=_("packets/s")),
             ],
         )),
        ("udp",
         Tuple(
             title=_("UDP packets"),
             elements=[
                 Float(title=_("Warning at"), unit=_("packets/s")),
                 Float(title=_("Critical at"), unit=_("packets/s")),
             ],
         )),
        ("icmp",
         Tuple(
             title=_("ICMP packets"),
             elements=[
                 Float(title=_("Warning at"), unit=_("packets/s")),
                 Float(title=_("Critical at"), unit=_("packets/s")),
             ],
         )),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="mcafee_emailgateway_bridge",
        group=RulespecGroupCheckParametersApplications,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_mcafee_emailgateway_bridge,
        title=lambda: _("McAfee email gateway bridge"),
    ))
Exemplo n.º 16
0
             )),
            ("condition",
             DropdownChoice(
                 title=_("'Condition' state"),
                 choices=status_choices,
                 default_value=0,
             )),
            ("cleared",
             DropdownChoice(
                 title=_("'Cleared' state"),
                 choices=status_choices,
                 default_value=0,
             )),
        ],
        title=_("Translate UCS Bladecenter state to monitoring state"),
        optional_keys=[
            "critical", "major", "warning", "minor", "info", "condition",
            "cleared"
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="ucs_bladecenter_faultinst",
        group=RulespecGroupCheckParametersApplications,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_ucs_bladecenter_faultinst,
        title=lambda: _("UCS Bladecenter Fault instances"),
    ))
Exemplo n.º 17
0
from cmk.gui.valuespec import (
    Integer,
    OptionalDropdownChoice,
    Tuple,
)

from cmk.gui.plugins.wato import (
    CheckParameterRulespecWithoutItem,
    rulespec_registry,
    RulespecGroupCheckParametersOperatingSystem,
)


def _parameter_valuespec_memory_relative():
    return OptionalDropdownChoice(title=_("Memory usage"),
                                  choices=[(None, _("Do not impose levels"))],
                                  otherlabel=_("Percentual levels ->"),
                                  explicit=Tuple(elements=[
                                      Integer(title=_("Warning at"), default_value=85, unit="%"),
                                      Integer(title=_("Critical at"), default_value=90, unit="%"),
                                  ],))


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="memory_relative",
        group=RulespecGroupCheckParametersOperatingSystem,
        parameter_valuespec=_parameter_valuespec_memory_relative,
        title=lambda: _("Main memory usage for Brocade fibre channel switches"),
    ))
Exemplo n.º 18
0
                    ('separate_checks',
                     Checkbox(
                         title=_("Create a separate check for each logfile"),
                         label=_("Separate check"),
                         help=
                         _("If this option is enabled, there will be one separate check for each logfile found during "
                           "the service discovery. This option also changes the behaviour for unknown logfiles. "
                           "The default logwatch check forwards all logfiles to the event console, even logfiles "
                           "which were not known during the service discovery. Creating one check per logfile changes "
                           "this behaviour so that any data from unknown logfiles is discarded."),
                     ))
                ],
                optional_keys=[
                    'restrict_logfiles', 'expected_logfiles', 'logwatch_reclassify',
                    'separate_checks'
                ],
                ignored_keys=['service_level'],
            ),
        ],
        default_value='',
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="logwatch_ec",
        group=RulespecGroupCheckParametersApplications,
        parameter_valuespec=_parameter_valuespec_logwatch_ec,
        title=lambda: _("Logwatch Event Console Forwarding"),
    ))
Exemplo n.º 19
0
)
from cmk.gui.valuespec import Dictionary, Percentage, Tuple


def _parameter_valuespec_proxmox_ve_mem_usage():
    return Dictionary(
        required_keys=["levels"],
        elements=[
            (
                "levels",
                Tuple(
                    title=_("Levels"),
                    elements=[
                        Percentage(title=_("Warning at"), default_value=70.0),
                        Percentage(title=_("Critical at"), default_value=80.0),
                    ],
                ),
            ),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="proxmox_ve_mem_usage",
        group=RulespecGroupCheckParametersOperatingSystem,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_proxmox_ve_mem_usage,
        title=lambda: _("Proxmox VE memory percentage used"),
    ))
Exemplo n.º 20
0
                    ],
                ),
            ),
            (
                "other_hosts",
                Tuple(
                    title=_("Count of other hosts"),
                    elements=[
                        Integer(title=_("Warning at or above"),
                                minvalue=0,
                                unit=_("other hosts")),
                        Integer(title=_("Critical at or above"),
                                minvalue=0,
                                unit=_("other hosts")),
                    ],
                ),
            ),
        ], ),
        forth=transform_ibm_svc_host,
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="ibm_svc_host",
        group=RulespecGroupCheckParametersStorage,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_ibm_svc_host,
        title=lambda: _("IBM SVC Hosts"),
    ))
Exemplo n.º 21
0
         )),
        ('cpu',
         Tuple(
             title=_('CPU'),
             default_value=(80.0, 90.0),
             elements=[
                 Percentage(title=_("Warning above")),
                 Percentage(title=_("Critical above")),
             ],
         )),
        ('memory',
         Tuple(
             title=_('Memory'),
             default_value=(80.0, 90.0),
             elements=[
                 Percentage(title=_("Warning above")),
                 Percentage(title=_("Critical above")),
             ],
         )),
    ],)


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="k8s_resources",
        group=RulespecGroupCheckParametersApplications,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_k8s_resources,
        title=lambda: _("Kubernetes resources"),
    ))
Exemplo n.º 22
0
                 elements=[
                     Tuple(
                         title=_("Upper absolute levels"),
                         elements=[
                             Filesize(title=_("Warning at")),
                             Filesize(title=_("Critical at"))
                         ],
                     ),
                     Tuple(
                         title=_("Upper percentage levels"),
                         elements=[
                             Percentage(title=_("Warning at"), default_value=80.0),
                             Percentage(title=_("Critical at"), default_value=90.0)
                         ],
                     ),
                 ],
             )),
        ],
        optional_keys=["usage_bytes"],
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="splunk_license_usage",
        group=RulespecGroupCheckParametersApplications,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_splunk_license_usage,
        title=lambda: _("Splunk License Usage"),
    ))
Exemplo n.º 23
0
from cmk.gui.valuespec import (
    Integer,
    Optional,
    Tuple,
)

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


def _parameter_valuespec_vms_procs():
    return Optional(
        Tuple(elements=[
            Integer(title=_("Warning at"), unit=_("processes"), default_value=100),
            Integer(title=_("Critical at"), unit=_("processes"), default_value=200)
        ],),
        title=_("Impose levels on number of processes"),
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="vms_procs",
        group=RulespecGroupCheckParametersApplications,
        parameter_valuespec=_parameter_valuespec_vms_procs,
        title=lambda: _("Number of processes on OpenVMS"),
    ))
Exemplo n.º 24
0
                 title=_("Number of failed jobs"),
                 elements=[
                     Integer(title=_("Warning at")),
                     Integer(title=_("Critical at")),
                 ],
             )),
            ("zombie_count",
             Tuple(
                 title=_("Number of zombie jobs"),
                 help=_(
                     "Splunk calls a search a zombie when the search is "
                     "no longer running, but did not declare explicitly that "
                     "it has finished its work."),
                 elements=[
                     Integer(title=_("Warning at")),
                     Integer(title=_("Critical at")),
                 ],
             )),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="splunk_jobs",
        group=RulespecGroupCheckParametersApplications,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_splunk_jobs,
        title=lambda: _("Splunk Jobs"),
    ))
Exemplo n.º 25
0
                 Integer(title=_("Critical at")),
             ],
         )),
        ("established",
         Tuple(
             title=_("Levels for established connections"),
             elements=[
                 Integer(title=_("Warning at")),
                 Integer(title=_("Critical at")),
             ],
         )),
        ("active",
         Tuple(
             title=_("Levels for active connections"),
             elements=[
                 Integer(title=_("Warning at")),
                 Integer(title=_("Critical at")),
             ],
         )),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="steelhead_connections",
        group=RulespecGroupCheckParametersNetworking,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_steelhead_connections,
        title=lambda: _("Steelhead connections"),
    ))
Exemplo n.º 26
0

def _parameter_valuespec_skype_edgeauth():
    return Dictionary(
        elements=[
            ('bad_requests',
             Dictionary(
                 title=_("Bad Requests Received"),
                 elements=[
                     ("upper",
                      Tuple(elements=[
                          Integer(title=_("Warning at"), unit=_("per second"), default_value=20),
                          Integer(title=_("Critical at"), unit=_("per second"), default_value=40),
                      ],)),
                 ],
                 optional_keys=[],
             )),
        ],
        optional_keys=[],
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="skype_edgeauth",
        group=RulespecGroupCheckParametersApplications,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_skype_edgeauth,
        title=lambda: _("Skype for Business Edge Auth"),
    ))
Exemplo n.º 27
0
    return Dictionary(elements=[
        ("failures",
         Tuple(
             title=_("Total index failure count upper levels"),
             elements=[
                 Integer(title=_("Warning at")),
                 Integer(title=_("Critical at")),
             ],
         )),
        ("failures_last",
         Tuple(
             title=_("Index failure in the defined timerange upper levels"),
             help=_("Here you can set levels on failures in the timerange "
                    "specified in the datasource (default: 30m)."),
             elements=[
                 Integer(title=_("Warning at")),
                 Integer(title=_("Critical at")),
             ],
         )),
    ], )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="graylog_failures",
        group=RulespecGroupCheckParametersApplications,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_graylog_failures,
        title=lambda: _("Graylog index failures"),
    ))
Exemplo n.º 28
0
    rulespec_registry,
)


def _parameter_valuespec_general_flash_usage():
    return Alternative(elements=[
        Tuple(title=_("Specify levels in percentage of total Flash"),
              elements=[
                  Percentage(title=_("Warning at a usage of"),
                             label=_("% of Flash"),
                             maxvalue=None),
                  Percentage(title=_("Critical at a usage of"),
                             label=_("% of Flash"),
                             maxvalue=None)
              ]),
        Tuple(title=_("Specify levels in absolute usage values"),
              elements=[
                  Integer(title=_("Warning at"), unit=_("MB")),
                  Integer(title=_("Critical at"), unit=_("MB"))
              ]),
    ])


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="general_flash_usage",
        group=RulespecGroupCheckParametersOperatingSystem,
        parameter_valuespec=_parameter_valuespec_general_flash_usage,
        title=lambda: _("Flash Space Usage"),
    ))
Exemplo n.º 29
0
                 ],
             )),
            ("stopped_upper_levels",
             Tuple(
                 title=_("Stopped containers upper levels"),
                 elements=[
                     Integer(title=_("Warning at")),
                     Integer(title=_("Critical at")),
                 ],
             )),
            ("stopped_lower_levels",
             Tuple(
                 title=_("Stopped containers lower levels"),
                 elements=[
                     Integer(title=_("Warning at")),
                     Integer(title=_("Critical at")),
                 ],
             )),
        ],
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="docker_node_containers",
        group=RulespecGroupCheckParametersApplications,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_docker_node_containers,
        title=lambda: _("Docker node container levels"),
    ))
Exemplo n.º 30
0
             LowerMemoryLevels(
                 _("Estimated RAM for new processes"), (20.0, 10.0), _("RAM"),
                 _("If the host has a kernel of version 3.14 or newer, the information MemAvailable is provided: "
                   "\"An estimate of how much memory is available for starting new "
                   "applications, without swapping. Calculated from MemFree, "
                   "SReclaimable, the size of the file LRU lists, and the low "
                   "watermarks in each zone. "
                   "The estimate takes into account that the system needs some "
                   "page cache to function well, and that not all reclaimable "
                   "slab will be reclaimable, due to items being in use. The "
                   "impact of those factors will vary from system to system.\" "
                   "(https://www.kernel.org/doc/Documentation/filesystems/proc.txt)"
                   ))),
            ("levels_vmalloc",
             LowerMemoryLevels(_("Largest Free VMalloc Chunk"))),
            ("levels_hardwarecorrupted",
             UpperMemoryLevels(_("Hardware Corrupted"), (1, 1), _("RAM"))),
        ], ),
        forth=transform_memory_levels,
    )


rulespec_registry.register(
    CheckParameterRulespecWithoutItem(
        check_group_name="memory_linux",
        group=RulespecGroupCheckParametersOperatingSystem,
        match_type="dict",
        parameter_valuespec=_parameter_valuespec_memory_linux,
        title=lambda: _("Memory and Swap usage on Linux"),
    ))