Collection of CheckMK checks (see https://checkmk.com/). All checks and plugins are provided as is. Absolutely no warranty. Send any comments to thl-cmk[at]outlook[dot]com

Skip to content
Snippets Groups Projects
Commit e1966db2 authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

Delete checkpoint_mho_ports.py

parent 2b61f6a0
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# License: GNU General Public License v2
#
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
# Date : 2021-12-02
#
from cmk.gui.i18n import _
from cmk.gui.valuespec import (
Dictionary,
TextAscii,
MonitoringState,
FixedValue,
TextUnicode,
)
from cmk.gui.plugins.wato import (
CheckParameterRulespecWithItem,
rulespec_registry,
RulespecGroupCheckParametersNetworking,
RulespecGroupCheckParametersDiscovery,
HostRulespec,
)
def _parameter_valuespec_checkpoint_mho_ports():
return Dictionary(
elements=[
('state_admin_down',
MonitoringState(
title=_('State if port is Admin down'),
help=_('Monitoring state if port is Admin down'),
default_value=1,
)),
('state_link_down',
MonitoringState(
title=_('State if port Link state is down'),
help=_('Monitoring state if port link state is down'),
default_value=2,
)),
('state_speed_changed',
MonitoringState(
title=_('State if port speed has changed'),
help=_('Monitoring state if port speed has changed from discovery'),
default_value=1,
)),
('discovery_speed', TextUnicode()), # added by plugin discovery function
],
hidden_keys=['discovery_speed']
)
rulespec_registry.register(
CheckParameterRulespecWithItem(
check_group_name='checkpoint_mho_ports',
group=RulespecGroupCheckParametersNetworking,
match_type='dict',
parameter_valuespec=_parameter_valuespec_checkpoint_mho_ports,
title=lambda: _('Check Point MHO port'),
item_spec=lambda: TextAscii(title=_('Port index'), ),
))
def _valuespec_discovery_checkpoint_mho_ports():
return Dictionary(
title=_('Check Point MHO ports'),
elements=[
('add_admin_down',
FixedValue(
False,
title=_('Do not add Admin down ports'),
totext=_('If enabled the plugin will not add ports in Admin down state'),
)),
('add_link_down',
FixedValue(
False,
title=_('Do not add Link down ports'),
totext=_('If enabled the plugin will not add ports in Link down state'),
)),
],
)
rulespec_registry.register(
HostRulespec(
group=RulespecGroupCheckParametersDiscovery,
match_type='dict',
name='discovery_checkpoint_mho_ports',
valuespec=_valuespec_discovery_checkpoint_mho_ports,
))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment