diff --git a/web/plugins/wato/checkpoint_fw_connections.py b/web/plugins/wato/checkpoint_fw_connections.py deleted file mode 100644 index 9bf65e5cffa1687bc993e016a15db118afca2f08..0000000000000000000000000000000000000000 --- a/web/plugins/wato/checkpoint_fw_connections.py +++ /dev/null @@ -1,97 +0,0 @@ -#!/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 : 2020-06-07 -# - -from cmk.gui.i18n import _ -from cmk.gui.valuespec import ( - Dictionary, - Tuple, - Integer, - Percentage, -) -from cmk.gui.plugins.wato import ( - CheckParameterRulespecWithItem, - rulespec_registry, - RulespecGroupCheckParametersNetworking, -) - - -def _parameter_valuespec_checkpoint_fw_connections(): - 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')), - ])), - ('admin_table_limit', - Integer( - title=_('Admin connection table limit'), - help=_('This rule sets the maximum number of connections through the firewall. This is use full ' - 'if your firewall is set to automatic connection table limit and you still want ' - 'relative metrics. This setting takes precedence over the the fwConnTableLimit ' - 'configured on the firewall (only for monitoring purposes of curse). This value should match' - 'the real values of your firewall, if not you might get relative values above 100%.'), - minvalue=0, - unit=_('connections'), - )), - ('levels_upper_relative', - Tuple( - title=_('Percentage of maximum connections (only used if a limit is defined on ' - 'the Check Point device)'), - help=_('This relative threshold can only be used if a maximum number is defined on ' - 'the firewall side and then read from fwConnTableLimit. By default, this ' - 'limit is not set in Check Point devices and this check than falls back to ' - 'the absolute defaults or the ones defined above'), - elements=[ - Percentage( - title=_('Warning at'), unit='%', minvalue=0.0, maxvalue=100.0, default_value=80.0), - Percentage( - title=_('Critical at'), unit='%', minvalue=0.0, maxvalue=100.0, default_value=90.0), - ])), - ('levels_lower_relative', - Tuple( - title=_('Percentage of minimum connections (only used if a limit is defined on ' - 'the Check Point device)'), - help=_('This relative threshold can only be used if a maximum number is defined on ' - 'the firewall side and then read from fwConnTableLimit. By default, this ' - 'limit is not set in Check Point devices and this check than falls back to ' - 'the absolute defaults or the ones defined above'), - elements=[ - Percentage( - title=_('Warning below'), unit='%', minvalue=0.0, maxvalue=100.0), - Percentage( - title=_('Critical below'), unit='%', minvalue=0.0, maxvalue=100.0), - ])), - ], - # optional_keys=['levels_upper_relative'], - ) - - -rulespec_registry.register( - CheckParameterRulespecWithItem( - check_group_name='checkpoint_fw_connections', - group=RulespecGroupCheckParametersNetworking, - match_type='dict', - parameter_valuespec=_parameter_valuespec_checkpoint_fw_connections, - title=lambda: _('Check Point Firewall Connections'), - ))