diff --git a/agent_based/checkpoint_fw_ls.py b/agent_based/checkpoint_fw_ls.py index 4357428376b41862ff248984087317021495b150..6aeda580de8ec0afefb0271d0cdc9fd6e9b38cac 100644 --- a/agent_based/checkpoint_fw_ls.py +++ b/agent_based/checkpoint_fw_ls.py @@ -15,6 +15,7 @@ # 2020-06-08: changed snmp-scan function # 2021-06-14: rewrite for cmk 2.0, added wato # 2021-08-09: fixed empty string_table, fixed log server default state +# 2021-08-16: code cleanup # # sample snmpwalk # @@ -102,20 +103,34 @@ class CheckPointFwLs(NamedTuple): fwLSConnSendRate: Optional[int] +_fwLSConnState_des = { + 0: 'Ok', + 1: 'Error', + 2: 'Not Active', +} + +_fwLocalLoggingStat = { + 0: 'Logging to log servers', + 1: 'Logging local configured', + 2: 'Logging local due to connectivity', + 3: 'Logging local due to high rate', +} + + def parse_checkpoint_fw_ls(string_table: List[StringTable]) -> Dict: if string_table != [[], []]: over_all, log_servers = string_table - fwlsconnoverall, fwlsconnoveralldesc, fwlocalloggingdesc, fwlocalloggingstat, fwLocalLoggingWriteRate, fwLoggingHandlingRate = \ - over_all[0] + fwlsconnoverall, fwlsconnoveralldesc, fwlocalloggingdesc, fwlocalloggingstat, fwlocalloggingwriterate, \ + fwlogginghandlingrate = over_all[0] parsed = {} parsed.update({'over all': CheckPointFwLsOverAll( fwlsconnoverall=int(fwlsconnoverall), fwlsconnoveralldesc=fwlsconnoveralldesc, fwlocalloggingdesc=fwlocalloggingdesc, fwlocalloggingstat=int(fwlocalloggingstat), - fwLocalLoggingWriteRate=int(fwLocalLoggingWriteRate) if fwLocalLoggingWriteRate.isdigit() else None, - fwLoggingHandlingRate=int(fwLoggingHandlingRate) if fwLoggingHandlingRate.isdigit() else None, + fwLocalLoggingWriteRate=int(fwlocalloggingwriterate) if fwlocalloggingwriterate.isdigit() else None, + fwLoggingHandlingRate=int(fwlogginghandlingrate) if fwlogginghandlingrate.isdigit() else None, )}) for fwLSConnIndex, fwLSConnName, fwLSConnState, fwLSConnStateDesc, fwLSConnSendRate in log_servers: @@ -136,24 +151,12 @@ def discovery_checkpoint_fw_ls(section: Dict) -> DiscoveryResult: def check_checkpoint_fw_ls(item, params, section: Dict) -> CheckResult: - fwLSConnState_des = { - 0: 'Ok', - 1: 'Error', - 2: 'Not Active', - } - - fwLocalLoggingStat = { - 0: 'Logging to log servers', - 1: 'Logging local configured', - 2: 'Logging local due to connectivity', - 3: 'Logging local due to high rate', - } - - over_all = section['over all'] - if item == 'over all': - if over_all.fwLocalLoggingWriteRate is not None and over_all.fwLoggingHandlingRate is not None: # R80.10 and up + over_all = section['over all'] + + if over_all.fwLocalLoggingWriteRate is not None: # R80.10 and up yield Metric(name='checkpoint_fw_ls_localloggingwriterate', value=over_all.fwLocalLoggingWriteRate) + if over_all.fwLoggingHandlingRate is not None: yield Metric(name='checkpoint_fw_ls_logginghandlingrate', value=over_all.fwLoggingHandlingRate) yield Result(state=State(over_all.fwlsconnoverall), summary=over_all.fwlsconnoveralldesc) @@ -163,13 +166,14 @@ def check_checkpoint_fw_ls(item, params, section: Dict) -> CheckResult: elif over_all.fwlocalloggingstat == 2: yield Result(state=State.CRIT, summary=over_all.fwlocalloggingdesc) else: - yield Result(state=State.OK, summary=over_all.fwlocalloggingdesc) + yield Result(state=State.OK, notice=over_all.fwlocalloggingdesc) else: try: log_server = section[item] except IndexError: return + print(params) if log_server.fwLSConnSendRate is not None: # R80.10 and up yield Metric(name='checkpoint_fw_ls_lsconnsendrate', value=log_server.fwLSConnSendRate) @@ -178,11 +182,8 @@ def check_checkpoint_fw_ls(item, params, section: Dict) -> CheckResult: else: yield Result(state=State.OK, summary=f'State: {log_server.fwLSConnStateDesc}') - exp_connection_state = params.get('exp_connection_status', 'Log-Server Connected') - mon_connection_state = params.get('mon_connection_state', 1) - - print(type(log_server.fwLSConnStateDesc)) - print(exp_connection_state) + exp_connection_state = params['exp_connection_status'] + mon_connection_state = params['mon_connection_state'] if log_server.fwLSConnStateDesc.lower() != exp_connection_state.lower(): yield Result(state=State(mon_connection_state), @@ -230,6 +231,9 @@ register.check_plugin( service_name='FW Log server %s', discovery_function=discovery_checkpoint_fw_ls, check_function=check_checkpoint_fw_ls, - check_default_parameters={}, + check_default_parameters={ + 'exp_connection_status': 'Log-Server Connected', + 'mon_connection_state': 1, + }, check_ruleset_name='checkpoint_fw_ls', ) diff --git a/agent_based/checkpoint_fwm_ls.py b/agent_based/checkpoint_fwm_ls.py index ca0512545241af7b0f76d7e93a550aeef85df40b..52d12ee9c44a8cc7d6b905ecb4087243b078798d 100644 --- a/agent_based/checkpoint_fwm_ls.py +++ b/agent_based/checkpoint_fwm_ls.py @@ -16,6 +16,7 @@ # 2020-06-08: changed snmp-scan function # 2021-06-14: rewrite for cmk 2.0 # 2021-08-09: fixed empty string_table +# 2021-08-16: code cleanup # # @@ -165,7 +166,6 @@ from cmk.base.plugins.agent_based.agent_based_api.v1 import ( class CheckPointFwmR77(NamedTuple): - lsprodname: int lsvermajor: str lsverminor: str lsbuildnumber: int @@ -176,10 +176,6 @@ class CheckPointFwmR77(NamedTuple): class CheckPointFwmR80(NamedTuple): - TotalReadLogs: int - TotalUpdatesAndLogsIndexed: int - TotalReadLogsErrors: int - TotalUpdatesAndLogsIndexedErrors: int UpdatesAndLogsIndexedRate: int ReadLogsRate: int UpdatesAndLogsIndexedRatePeak: int @@ -188,80 +184,78 @@ class CheckPointFwmR80(NamedTuple): class CheckPointFwm(NamedTuple): R77: CheckPointFwmR77 - R80: Optional[CheckPointFwmR80] + R80: Optional[CheckPointFwmR80] = None -def parse_checkpoint_fwm_ls(string_table: List[StringTable]) -> CheckPointFwm: - if string_table != [[], []]: - r77, r80_indexer = string_table - lsprodname, lsvermajor, lsverminor, lsbuildnumber, lsfwmisalive, lsstatcode, lsstatshortdescr, lsstatlongdescr = \ - r77[0] +def parse_checkpoint_fwm_ls(string_table: List[StringTable]) -> Optional[CheckPointFwm]: + try: + lsvermajor, lsverminor, lsbuildnumber, lsfwmisalive, lsstatcode, lsstatshortdescr, \ + lsstatlongdescr = string_table[0][0] + except IndexError: + return + except ValueError: + return - checkpointfwmr77 = CheckPointFwmR77( - lsprodname=lsprodname, - lsvermajor=lsvermajor, - lsverminor=lsverminor, - lsbuildnumber=lsbuildnumber, - lsfwmisalive=int(lsfwmisalive), - lsstatcode=int(lsstatcode), - lsstatshortdescr=lsstatshortdescr, - lsstatlongdescr=lsstatlongdescr, - ) - - checkpointfwmr80 = None - - try: - r80_indexer = r80_indexer[0] - except IndexError: - return CheckPointFwm( - R77=checkpointfwmr77, - R80=checkpointfwmr80, - ) - - if len(r80_indexer) == 8: - TotalReadLogs, TotalUpdatesAndLogsIndexed, TotalReadLogsErrors, TotalUpdatesAndLogsIndexedErrors, \ - UpdatesAndLogsIndexedRate, ReadLogsRate, UpdatesAndLogsIndexedRatePeak, ReadLogsRatePeak = r80_indexer - - checkpointfwmr80 = CheckPointFwmR80( - TotalReadLogs=int(TotalReadLogs), - TotalUpdatesAndLogsIndexed=int(TotalUpdatesAndLogsIndexed), - TotalReadLogsErrors=int(TotalReadLogsErrors), - TotalUpdatesAndLogsIndexedErrors=int(TotalUpdatesAndLogsIndexedErrors), - UpdatesAndLogsIndexedRate=int(UpdatesAndLogsIndexedRate), - ReadLogsRate=int(ReadLogsRate), - UpdatesAndLogsIndexedRatePeak=int(UpdatesAndLogsIndexedRatePeak), - ReadLogsRatePeak=int(ReadLogsRatePeak), - ) + checkpointfwmr77 = CheckPointFwmR77( + lsvermajor=lsvermajor, + lsverminor=lsverminor, + lsbuildnumber=lsbuildnumber, + lsfwmisalive=int(lsfwmisalive), + lsstatcode=int(lsstatcode), + lsstatshortdescr=lsstatshortdescr, + lsstatlongdescr=lsstatlongdescr, + ) + try: + UpdatesAndLogsIndexedRate, ReadLogsRate, UpdatesAndLogsIndexedRatePeak, ReadLogsRatePeak = string_table[1][0] + except IndexError: return CheckPointFwm( R77=checkpointfwmr77, - R80=checkpointfwmr80, + R80=None, + ) + except ValueError: + return CheckPointFwm( + R77=checkpointfwmr77, + R80=None, ) + checkpointfwmr80 = CheckPointFwmR80( + UpdatesAndLogsIndexedRate=int(UpdatesAndLogsIndexedRate), + ReadLogsRate=int(ReadLogsRate), + UpdatesAndLogsIndexedRatePeak=int(UpdatesAndLogsIndexedRatePeak), + ReadLogsRatePeak=int(ReadLogsRatePeak), + ) + + return CheckPointFwm( + R77=checkpointfwmr77, + R80=checkpointfwmr80, + ) + def discovery_checkpoint_fwm_ls(section: CheckPointFwm) -> DiscoveryResult: yield Service() def check_checkpoint_fwm_ls(params, section: CheckPointFwm) -> CheckResult: - yield Result(state=State.OK, - summary=f'{section.R77.lsprodname}, version: {section.R77.lsvermajor}.{section.R77.lsverminor}, Build: {section.R77.lsbuildnumber}') + yield Result(state=State.OK, summary=f'Version: {section.R77.lsvermajor}.{section.R77.lsverminor}') + yield Result(state=State.OK, summary=f'Build: {section.R77.lsbuildnumber}') - if not params.get('ignore_status_on_r80_10'): + if not params['ignore_status_on_r80_10']: if section.R77.lsfwmisalive != 1: yield Result(state=State.CRIT, summary='Is not alive') if section.R77.lsstatcode != 0: yield Result(state=State.CRIT, - summary=f'Status: {section.R77.lsstatshortdescr}, {section.R77.lsstatlongdescr}') + summary=f'Status: {section.R77.lsstatshortdescr}', + details=f'Status: {section.R77.lsstatlongdescr}') if section.R80 is not None: - yield Metric(name='checkpoint_fwm_ls_totalreadlogs', value=section.R80.TotalReadLogs) - yield Metric(name='checkpoint_fwm_ls_totalupdatesandlogsindexed', value=section.R80.TotalUpdatesAndLogsIndexed) - yield Metric(name='checkpoint_fwm_ls_totalreadlogserrors', value=section.R80.TotalReadLogsErrors) - yield Metric(name='checkpoint_fwm_ls_totalupdatesandlogsindexederrors', value=section.R80.TotalUpdatesAndLogsIndexedErrors) - yield Metric(name='checkpoint_fwm_ls_updatesandlogsindexedrate', value=section.R80.UpdatesAndLogsIndexedRate) - yield Metric(name='checkpoint_fwm_ls_updatesandlogsindexedratepeak', value=section.R80.UpdatesAndLogsIndexedRatePeak) - yield Metric(name='checkpoint_fwm_ls_readlogsrate', value=section.R80.ReadLogsRate) - yield Metric(name='checkpoint_fwm_ls_readlogsratepeak', value=section.R80.ReadLogsRatePeak) + for key, value in [ + ('checkpoint_fwm_ls_updatesandlogsindexedrate', section.R80.UpdatesAndLogsIndexedRate), + ('checkpoint_fwm_ls_updatesandlogsindexedratepeak', section.R80.UpdatesAndLogsIndexedRatePeak), + ('checkpoint_fwm_ls_readlogsrate', section.R80.ReadLogsRate), + ('checkpoint_fwm_ls_readlogsratepeak', section.R80.ReadLogsRatePeak), + ]: + if value is not None: + yield Metric(name=key, value=value) register.snmp_section( @@ -271,7 +265,6 @@ register.snmp_section( SNMPTree( base='.1.3.6.1.4.1.2620.1.11', # CHECKPOINT-MIB::ls oids=[ - '1', # lsProdName '2', # lsVerMajor '3', # lsVerMinor '4', # lsBuildNumber @@ -284,19 +277,10 @@ register.snmp_section( SNMPTree( base='.1.3.6.1.4.1.2620.1.11.14.5', # CHECKPOINT-MIB::lsIndexerInfo oids=[ - '1', # lsIndexerInfoTotalReadLogs - '2', # lsIndexerInfoTotalUpdatesAndLogsIndexed - '3', # lsIndexerInfoTotalReadLogsErrors - '4', # lsIndexerInfoTotalUpdatesAndLogsIndexedErrors '5', # lsIndexerInfoUpdatesAndLogsIndexedRate '6', # lsIndexerInfoReadLogsRate '7', # lsIndexerInfoUpdatesAndLogsIndexedRatePeak '8', # lsIndexerInfoReadLogsRatePeak - # '9', # lsIndexerInfo_9 - # '10', # lsIndexerInfo_10 - # '11', # lsIndexerInfo_11 - # '12', # lsIndexerInfo_12 - # '13', # lsIndexerInfo_13 ] ) @@ -318,62 +302,3 @@ register.check_plugin( check_default_parameters={'ignore_status_on_r80_10': False, }, check_ruleset_name='checkpoint_fwm_ls', ) - -# ('.1.3.6.1.4.1.2620.1.11.14', [ # CHECKPOINT-MIB::lsLoggingInfo -# '1', # lsLogReceiveRate -# '2', # lsLogReceiveRatePeak -# '3', # lsLogReceiveRate10Min -# '6', # lsLogReceiveRate1Hour -# ]), - -# OMD[build]:~$ snmpwalk -v2c -c komsa/alf-r81 -ObentU simulant .1.3.6.1.4.1.2620.1.11.14.4.1 -# .1.3.6.1.4.1.2620.1.11.14.4.1.1.1.0 = Gauge32: 1 -# .1.3.6.1.4.1.2620.1.11.14.4.1.1.2.0 = Gauge32: 2 -# .1.3.6.1.4.1.2620.1.11.14.4.1.1.3.0 = Gauge32: 3 -# .1.3.6.1.4.1.2620.1.11.14.4.1.1.4.0 = Gauge32: 4 -# .1.3.6.1.4.1.2620.1.11.14.4.1.1.5.0 = Gauge32: 5 -# .1.3.6.1.4.1.2620.1.11.14.4.1.1.6.0 = Gauge32: 6 -# .1.3.6.1.4.1.2620.1.11.14.4.1.1.7.0 = Gauge32: 7 -# .1.3.6.1.4.1.2620.1.11.14.4.1.2.1.0 = STRING: "Local Clients" -# .1.3.6.1.4.1.2620.1.11.14.4.1.2.2.0 = STRING: "bill01" -# .1.3.6.1.4.1.2620.1.11.14.4.1.2.3.0 = STRING: "bill02" -# .1.3.6.1.4.1.2620.1.11.14.4.1.2.4.0 = STRING: "donald01" -# .1.3.6.1.4.1.2620.1.11.14.4.1.2.5.0 = STRING: "donald02" -# .1.3.6.1.4.1.2620.1.11.14.4.1.2.6.0 = STRING: "charlie02" -# .1.3.6.1.4.1.2620.1.11.14.4.1.2.7.0 = STRING: "charlie01" -# .1.3.6.1.4.1.2620.1.11.14.4.1.3.1.0 = STRING: "Connected" -# .1.3.6.1.4.1.2620.1.11.14.4.1.3.2.0 = STRING: "Connected" -# .1.3.6.1.4.1.2620.1.11.14.4.1.3.3.0 = STRING: "Connected" -# .1.3.6.1.4.1.2620.1.11.14.4.1.3.4.0 = STRING: "Connected" -# .1.3.6.1.4.1.2620.1.11.14.4.1.3.5.0 = STRING: "Connected" -# .1.3.6.1.4.1.2620.1.11.14.4.1.3.6.0 = STRING: "Connected" -# .1.3.6.1.4.1.2620.1.11.14.4.1.3.7.0 = STRING: "Connected" -# .1.3.6.1.4.1.2620.1.11.14.4.1.4.1.0 = STRING: "N/A" -# .1.3.6.1.4.1.2620.1.11.14.4.1.4.2.0 = STRING: "Tue Feb 9 13:51:34 2021" -# .1.3.6.1.4.1.2620.1.11.14.4.1.4.3.0 = STRING: "Tue Feb 9 13:51:34 2021" -# .1.3.6.1.4.1.2620.1.11.14.4.1.4.4.0 = STRING: "Tue Feb 9 13:51:34 2021" -# .1.3.6.1.4.1.2620.1.11.14.4.1.4.5.0 = STRING: "Tue Feb 9 13:51:34 2021" -# .1.3.6.1.4.1.2620.1.11.14.4.1.4.6.0 = STRING: "Tue Feb 9 13:51:34 2021" -# .1.3.6.1.4.1.2620.1.11.14.4.1.4.7.0 = STRING: "Tue Feb 9 13:51:34 2021" -# .1.3.6.1.4.1.2620.1.11.14.4.1.5.1.0 = Gauge32: 0 -# .1.3.6.1.4.1.2620.1.11.14.4.1.5.2.0 = Gauge32: 0 -# .1.3.6.1.4.1.2620.1.11.14.4.1.5.3.0 = Gauge32: 837 -# .1.3.6.1.4.1.2620.1.11.14.4.1.5.4.0 = Gauge32: 0 -# .1.3.6.1.4.1.2620.1.11.14.4.1.5.5.0 = Gauge32: 1 -# .1.3.6.1.4.1.2620.1.11.14.4.1.5.6.0 = Gauge32: 0 -# .1.3.6.1.4.1.2620.1.11.14.4.1.5.7.0 = Gauge32: 5 - -# ('.1.3.6.1.4.1.2620.1.11.14.4.1', [ # CHECKPOINT-MIB::lsConnectedGatewaysEntry -# '1', # lsGWIndex -# '2', # lsGWIP -# '3', # lsGWState -# '4', # lsGWLastLoginTime -# '5', # lsGWLogReceiveRate -# ]), -# ('.1.3.6.1.4.1.2620.1.11.14.7.1', [ # CHECKPOINT-MIB::lsConnectedClientsEntry -# '1', # lsIndex -# '2', # lsClientName -# '3', # lsClientHost -# '4', # lsClientDbLock -# '5', # lsClientDbLock -# ]), diff --git a/checkpoint_log_server.mkp b/checkpoint_log_server.mkp index d496444e1c3cb55966faa2f2542dafe047bf0c61..b9dd3bfa9e7b0b1413991f8bf8299a7df5334faa 100644 Binary files a/checkpoint_log_server.mkp and b/checkpoint_log_server.mkp differ diff --git a/packages/checkpoint_log_server b/packages/checkpoint_log_server index 9d3446e0559e52f35e9fbdac64e345553126660c..423b8342426557ea1f32dad0bfaa2fc96eb9f0d0 100644 --- a/packages/checkpoint_log_server +++ b/packages/checkpoint_log_server @@ -11,7 +11,7 @@ 'name': 'checkpoint_log_server', 'num_files': 7, 'title': 'Check Point Log service status', - 'version': '20210809.v0.2a', + 'version': '20210816.v0.2b', 'version.min_required': '2.0.0', 'version.packaged': '2021.07.14', 'version.usable_until': None} \ No newline at end of file diff --git a/web/plugins/metrics/checkpoint_fw_log.py b/web/plugins/metrics/checkpoint_fw_log.py index 90bf34c596f3cfe4b7222d7ccd79c9764353dc01..9a3fc21b3714cea70074c0cf87d726b4a2bdec90 100644 --- a/web/plugins/metrics/checkpoint_fw_log.py +++ b/web/plugins/metrics/checkpoint_fw_log.py @@ -40,27 +40,6 @@ metric_info['checkpoint_fw_ls_lsconnsendrate'] = { 'color': '31/a', } -metric_info['checkpoint_fwm_ls_totalreadlogs'] = { - 'title': _('Total read logs'), - 'unit': '1/s', - 'color': '11/a', -} -metric_info['checkpoint_fwm_ls_totalupdatesandlogsindexed'] = { - 'title': _('Total updates and logs indexed'), - 'unit': 'count', - 'color': '21/a', -} -metric_info['checkpoint_fwm_ls_totalreadlogserrors'] = { - 'title': _('Total read log errors'), - 'unit': '1/s', - 'color': '31/a', -} -metric_info['checkpoint_fwm_ls_totalupdatesandlogsindexederrors'] = { - 'title': _('Total updates and logs indexed errors'), - 'unit': 'count', - 'color': '41/a', -} - metric_info['checkpoint_fwm_ls_updatesandlogsindexedrate'] = { 'title': _('Updates and logs index rate'), 'unit': '1/s', @@ -75,7 +54,7 @@ metric_info['checkpoint_fwm_ls_updatesandlogsindexedratepeak'] = { metric_info['checkpoint_fwm_ls_readlogsrate'] = { 'title': _('Logs read rate'), 'unit': '1/s', - 'color': '12/a', + 'color': '26/a', } metric_info['checkpoint_fwm_ls_readlogsratepeak'] = { 'title': _('Logs read peak rate'), @@ -95,6 +74,11 @@ graph_info['checkpoint_fw_ls_over_all'] = { ('checkpoint_fw_ls_localloggingwriterate', 'line'), ('checkpoint_fw_ls_logginghandlingrate', 'line'), ], + 'optional_metrics': [ + 'checkpoint_fw_ls_localloggingwriterate', + 'checkpoint_fw_ls_logginghandlingrate' + ], + 'range': (0, 'checkpoint_fw_ls_logginghandlingrate:max'), } graph_info['checkpoint_fw_ls_gateway'] = { @@ -102,30 +86,33 @@ graph_info['checkpoint_fw_ls_gateway'] = { 'metrics': [ ('checkpoint_fw_ls_lsconnsendrate', 'line'), ], + 'range': (0, 'checkpoint_fw_ls_lsconnsendrate:max'), } -graph_info['checkpoint_fwm_ls_management'] = { - 'title': _('Check Point Management Firewall Log server'), +graph_info['checkpoint_fwm_ls_management_read'] = { + 'title': _('Check Point Management Firewall Log server read rate'), 'metrics': [ - ('checkpoint_fwm_ls_updatesandlogsindexedratepeak', 'line'), - ('checkpoint_fwm_ls_updatesandlogsindexedrate', 'line'), + ('checkpoint_fwm_ls_readlogsratepeak', 'line'), + ('checkpoint_fwm_ls_readlogsrate', 'line'), ], -} - -graph_info['checkpoint_fwm_ls_read_logs'] = { - 'title': _('Check Point Management Firewall Log server read logs'), - 'metrics': [ - ('checkpoint_fwm_ls_totalreadlogserrors', 'line'), - ('checkpoint_fwm_ls_totalreadlogs', 'line'), + 'optional_metrics': [ + 'checkpoint_fwm_ls_readlogsratepeak', + 'checkpoint_fwm_ls_readlogsrate', ], + 'range': (0, 'checkpoint_fwm_ls_readlogsrate:max'), } -graph_info['checkpoint_fwm_ls_updates'] = { - 'title': _('Check Point Management Firewall Log server updates and logs indexed'), +graph_info['checkpoint_fwm_ls_management_indexed'] = { + 'title': _('Check Point Management Firewall Log server index rate'), 'metrics': [ - ('checkpoint_fwm_ls_totalupdatesandlogsindexederrors', 'line'), - ('checkpoint_fwm_ls_totalupdatesandlogsindexed', 'line'), + ('checkpoint_fwm_ls_updatesandlogsindexedratepeak', 'line'), + ('checkpoint_fwm_ls_updatesandlogsindexedrate', 'line'), ], + 'optional_metrics': [ + 'checkpoint_fwm_ls_updatesandlogsindexedratepeak', + 'checkpoint_fwm_ls_updatesandlogsindexedrate', + ], + 'range': (0, 'checkpoint_fwm_ls_updatesandlogsindexedrate:max'), } ############################################################################## @@ -154,4 +141,19 @@ perfometer_info.append({ 'metric': 'checkpoint_fw_ls_lsconnsendrate', 'half_value': 500.0, 'exponent': 2, -}) \ No newline at end of file +}) + +perfometer_info.append(('stacked', [ + { + 'type': 'logarithmic', + 'metric': 'checkpoint_fwm_ls_readlogsrate', + 'half_value': 1000.0, + 'exponent': 2, + }, + { + 'type': 'logarithmic', + 'metric': 'checkpoint_fwm_ls_updatesandlogsindexedrate', + 'half_value': 1000.0, + 'exponent': 2, + }, +])) diff --git a/web/plugins/wato/checkpoint_fw_ls.py b/web/plugins/wato/checkpoint_fw_ls.py index 8880d5ec3225d6f535043374d978332c1e20f89b..765f189c90000da54a94819437d4320a6e6ff756 100644 --- a/web/plugins/wato/checkpoint_fw_ls.py +++ b/web/plugins/wato/checkpoint_fw_ls.py @@ -46,7 +46,7 @@ rulespec_registry.register( CheckParameterRulespecWithItem( check_group_name='checkpoint_fw_ls', group=RulespecGroupCheckParametersNetworking, - item_spec=lambda: TextAscii(title=_('Check Point Firewall gateway log server'), ), + item_spec=lambda: TextAscii(title=_('Log server IP'), ), match_type='dict', parameter_valuespec=_parameter_valuespec_checkpoint_fw_ls, title=lambda: _('Check Point Firewall gateway log server'),