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 bf35e692 authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

Delete checkpoint_vsx_system.py

parent 4f07c056
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-09-07
#
from cmk.gui.i18n import _
from cmk.gui.valuespec import (
Dictionary,
TextAscii,
Tuple,
Integer,
MonitoringState,
ListChoice,
TextUnicode,
)
from cmk.gui.plugins.wato import (
CheckParameterRulespecWithItem,
rulespec_registry,
RulespecGroupCheckParametersNetworking,
RulespecGroupCheckParametersDiscovery,
HostRulespec,
)
def _parameter_valuespec_checkpoint_vsx_system():
return Dictionary(
elements=[
('levels_upper_absolute',
Tuple(
title=_('Maximum number of firewall connections'),
help=_('This rule sets upper limits to the current number of connections through '
'a Checkpoint firewall.'),
elements=[
Integer(title=_('Warning at'), minvalue=0, unit=_('connections')),
Integer(title=_('Critical at'), minvalue=0, unit=_('connections')),
])),
('levels_lower_absolute',
Tuple(
title=_('Minimum number of firewall connections'),
help=_('This rule sets lower limits to the current number of connections through '
'a Checkpoint firewall.'),
elements=[
Integer(title=_('Warning blow'), minvalue=0, unit=_('connections')),
Integer(title=_('Critical below'), minvalue=0, unit=_('connections')),
])),
('state_sic_not_established',
MonitoringState(
title=_('State if SIC is not established'),
help=_('Monitoring state if SIC is not established'),
default_value=2,
)),
('state_ha_not_act_stb',
MonitoringState(
title=_('State if H/A state not active/standby'),
help=_('Monitoring state if H/A state not active or standby'),
default_value=2,
)),
('state_policy_not_installed',
MonitoringState(
title=_('State if no policy is installed'),
help=_('Monitoring state if no policy is installed'),
default_value=2,
)),
('state_policy_changed',
MonitoringState(
title=_('State on policy name change'),
help=_('Monitoring status on policy name change'),
default_value=1,
)),
('state_ha_changed',
MonitoringState(
title=_('State on H/A state change'),
help=_('Monitoring status on H/A state change'),
default_value=1,
)),
('policyname', # added by plugin discovery function
TextUnicode()),
('ha_state', # added by plugin discovery function
TextUnicode()),
],
hidden_keys=['policyname', 'ha_state'],
)
rulespec_registry.register(
CheckParameterRulespecWithItem(
check_group_name='checkpoint_vsx_system',
group=RulespecGroupCheckParametersNetworking,
match_type='dict',
parameter_valuespec=_parameter_valuespec_checkpoint_vsx_system,
title=lambda: _('Check Point VSX system'),
item_spec=lambda: TextAscii(title=_('VSX System name'), ),
))
def _valuespec_discovery_checkpoint_vsx_system():
_vs_types = [
('virtual system', 'Virtual System'),
('vsx gateway', 'VSX Gateway'),
('virtual switch', 'Virtual Switch'),
('virtual router', 'Virtual Router'),
]
return Dictionary(
title=_('Check Point VSX system'),
elements=[
('vs_type',
ListChoice(
title=_('VS types to discover'),
help=_('Virtual system types to discover. Note: if you select "VSX Gateway", '
'this will also discover ClusterXL systems.'),
choices=_vs_types,
default_value=[
'virtual system',
],
)),
],
)
rulespec_registry.register(
HostRulespec(
group=RulespecGroupCheckParametersDiscovery,
match_type='dict',
name='discovery_checkpoint_vsx_system',
valuespec=_valuespec_discovery_checkpoint_vsx_system,
))
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