diff --git a/agent_based/checkpoint_fw_connections.py b/agent_based/checkpoint_fw_connections.py index ff812b3f308141779c5ae2809a0b903abc4764d1..49622bd57eb13a3b5b7fcb82bf2e55ad85a78486 100644 --- a/agent_based/checkpoint_fw_connections.py +++ b/agent_based/checkpoint_fw_connections.py @@ -19,10 +19,10 @@ # 2020-06-08: changed snmp-scan function, code cleanup # 2021-08-24: rewritten for CMK 2.0, # added relative thresholds (idea and code based on cmk PR #312 by https://github.com/gradecke) -# added lower levels and admin_table_limit +# added lower levels and admin_table_limit, removed default values except for 'levels_upper_relative' # # -# sample info +# sample string_table # [[[u'559684419', u'203840211', u'51093794', u'786231', u'815404655', u'0']], [[u'11172', u'27598', u'0']]] # # no firewall @@ -209,7 +209,6 @@ register.check_plugin( check_function=check_checkpoint_fw_connections, check_ruleset_name='checkpoint_fw_connections', check_default_parameters={ - # 'levels_upper_absolute': (10000, 20000), - # 'levels_upper_relative': (75, 85) + 'levels_upper_relative': (80, 90), } ) diff --git a/checkpoint_fw_connections.mkp b/checkpoint_fw_connections.mkp index b8cceab3eb6d87c2dd5ff7cc4ad7244e68f4aa5b..191d07f6b3e7418642e38945bef0a91c3c399b0f 100644 Binary files a/checkpoint_fw_connections.mkp and b/checkpoint_fw_connections.mkp differ diff --git a/web/plugins/metrics/checkpoint_fw_connections.py b/web/plugins/metrics/checkpoint_fw_connections.py index 686768e2e4ce856e19907acbbfb5732f0068a4f6..d880025851e3f691ce371c111bae0b6c540b73e9 100644 --- a/web/plugins/metrics/checkpoint_fw_connections.py +++ b/web/plugins/metrics/checkpoint_fw_connections.py @@ -70,8 +70,8 @@ metric_info['checkpoint_fw_connections_relative'] = { graph_info['checkpoint_fw_connections_fwpeaknumconn'] = { 'title': _('Check Point Firewall Connections absolute'), 'metrics': [ - ('checkpoint_fw_connections_fwpeaknumconn', 'line'), ('checkpoint_fw_connections_fwcurrentnumconn', 'area'), + ('checkpoint_fw_connections_fwpeaknumconn', 'line'), ], 'scalars': [ ('checkpoint_fw_connections_fwcurrentnumconn:crit', _('crit')), @@ -94,10 +94,10 @@ graph_info['checkpoint_fw_connections_relative'] = { graph_info['checkpoint_fw_connections_fwconnectionstcp'] = { 'title': _('Check Point Firewall Connections per second'), 'metrics': [ - ('checkpoint_fw_connections_fwconnectionstcp', 'stack'), - ('checkpoint_fw_connections_fwconnectionsudp', 'stack'), - ('checkpoint_fw_connections_fwconnectionsicmp', 'stack'), ('checkpoint_fw_connections_fwconnectionsother', 'stack'), + ('checkpoint_fw_connections_fwconnectionsicmp', 'stack'), + ('checkpoint_fw_connections_fwconnectionsudp', 'stack'), + ('checkpoint_fw_connections_fwconnectionstcp', 'stack'), ('checkpoint_fw_connections_fwconnectionssum', 'line'), ('checkpoint_fw_connections_fwconnectionrate', 'line'), ], diff --git a/web/plugins/wato/checkpoint_fw_connections.py b/web/plugins/wato/checkpoint_fw_connections.py index 85dcb50c2d9f68186b7345695714bbdbd3da5184..9bf65e5cffa1687bc993e016a15db118afca2f08 100644 --- a/web/plugins/wato/checkpoint_fw_connections.py +++ b/web/plugins/wato/checkpoint_fw_connections.py @@ -31,8 +31,8 @@ def _parameter_valuespec_checkpoint_fw_connections(): help=_('This rule sets upper limits to the current number of connections through ' 'a Checkpoint firewall.'), elements=[ - Integer(title=_('Warning at'), default_value=1000, unit=_('connections')), - Integer(title=_('Critical at'), default_value=2000, unit=_('connections')), + Integer(title=_('Warning at'), minvalue=0, unit=_('connections')), + Integer(title=_('Critical at'), minvalue=0, unit=_('connections')), ])), ('levels_lower_absolute', Tuple( @@ -40,8 +40,8 @@ def _parameter_valuespec_checkpoint_fw_connections(): help=_('This rule sets lower limits to the current number of connections through ' 'a Checkpoint firewall.'), elements=[ - Integer(title=_('Warning blow'), default_value=100, unit=_('connections')), - Integer(title=_('Critical below'), default_value=50, unit=_('connections')), + Integer(title=_('Warning blow'), minvalue=0, unit=_('connections')), + Integer(title=_('Critical below'), minvalue=0, unit=_('connections')), ])), ('admin_table_limit', Integer( @@ -64,10 +64,9 @@ def _parameter_valuespec_checkpoint_fw_connections(): 'the absolute defaults or the ones defined above'), elements=[ Percentage( - title=_('Warning at'), unit='%', minvalue=0.0, default_value=80.0, - ), + title=_('Warning at'), unit='%', minvalue=0.0, maxvalue=100.0, default_value=80.0), Percentage( - title=_('Critical at'), unit='%', minvalue=0.0, default_value=90.0), + title=_('Critical at'), unit='%', minvalue=0.0, maxvalue=100.0, default_value=90.0), ])), ('levels_lower_relative', Tuple( @@ -79,10 +78,9 @@ def _parameter_valuespec_checkpoint_fw_connections(): 'the absolute defaults or the ones defined above'), elements=[ Percentage( - title=_('Warning below'), unit='%', minvalue=0.0, default_value=20.0, - ), + title=_('Warning below'), unit='%', minvalue=0.0, maxvalue=100.0), Percentage( - title=_('Critical below'), unit='%', minvalue=0.0, default_value=10.0), + title=_('Critical below'), unit='%', minvalue=0.0, maxvalue=100.0), ])), ], # optional_keys=['levels_upper_relative'],