diff --git a/agent_based/checkpoint_vsx_system.py b/agent_based/checkpoint_vsx_system.py index 0d08c1d26221c99e15094c8be3796d58afbae4b6..9c7114fb669e80b97d72c54603053ee6b1188a87 100644 --- a/agent_based/checkpoint_vsx_system.py +++ b/agent_based/checkpoint_vsx_system.py @@ -21,6 +21,7 @@ # 2021-09-24: changed graph definition for connections graph to make it scale with # the active connections (suggested by raulcurro[at]gmail[dot]com) # moved Main IP to details, if it is not an IPv4 address +# 2022-10-23: fixed warning on upgrade "non-empty params vanished" for policyname and ha_state # # snmpwalk sample # @@ -315,6 +316,10 @@ register.check_plugin( 'state_policy_not_installed': 2, 'state_policy_changed': 1, 'state_ha_changed': 1, + # 'levels_upper_absolute': (None, None), + # 'levels_lower_absolute': (None, None), + # 'policyname': '', + # 'ha_state': None, }, check_ruleset_name='checkpoint_vsx_system', ) diff --git a/checkpoint_vsx_system.mkp b/checkpoint_vsx_system.mkp index bdb754d4223d9a3b5a9dbb7cfa18e87cf802ffe2..41534e39afa41e49aea1c418684444d5a7cdd067 100644 Binary files a/checkpoint_vsx_system.mkp and b/checkpoint_vsx_system.mkp differ diff --git a/packages/checkpoint_vsx_system b/packages/checkpoint_vsx_system index e3a3b19c1bb681d4d2aa1b671813c855a98eb69d..917e539eb4d5b8ca6e366a0fc6139962ad46bd1d 100644 --- a/packages/checkpoint_vsx_system +++ b/packages/checkpoint_vsx_system @@ -2,20 +2,23 @@ 'description': 'Monitor status of virtual systems in Check Point vsx/vsls ' 'cluster.\n' '\n' - ' - creates one check for every virtual system. \n' + ' - creates one check for each virtual system. \n' ' - check goes critical if virtual system status is not ' "'Active' or 'Standby'\n" - ' - longoutput gives details for each virtual system.\n' + ' - long output gives details for each virtual system.\n' ' - monitors VSX virtual system counters ' - '(connections/packets/bytes/logs).\n', - 'download_url': 'https://thl-cmk.hopto.org', + '(connections/packets/bytes/logs).\n' + ' - supersedes checkpoint_vsx, checkpoint_vsx_connections, ' + 'checkpoint_vsx_traffic, checkpoint_vsx_packets and ' + 'checkpoint_vsx_status\n', + 'download_url': 'https://thl-cmk.hopto.org/gitlab/checkmk/check-point/gateway/checkpoint_vsx_system', 'files': {'agent_based': ['checkpoint_vsx_system.py'], 'web': ['plugins/metrics/checkpoint_vsx_system.py', 'plugins/wato/checkpoint_vsx_system.py']}, 'name': 'checkpoint_vsx_system', 'num_files': 3, 'title': 'Check Point VSX system status and counter', - 'version': '20210924.v.0.3b', + 'version': '20221023.v.0.3c', 'version.min_required': '2.0.0', 'version.packaged': '2021.09.20', 'version.usable_until': None} \ No newline at end of file diff --git a/web/plugins/wato/checkpoint_vsx_system.py b/web/plugins/wato/checkpoint_vsx_system.py index f78676df148e8b028d5b798999f6eb0377758e58..75ee109634c924243fdbfe93e5280f4e59785943 100644 --- a/web/plugins/wato/checkpoint_vsx_system.py +++ b/web/plugins/wato/checkpoint_vsx_system.py @@ -15,6 +15,7 @@ from cmk.gui.valuespec import ( Integer, MonitoringState, ListChoice, + TextUnicode, ) from cmk.gui.plugins.wato import ( @@ -28,57 +29,62 @@ from cmk.gui.plugins.wato import ( 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, - )), - ], - ) + 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(