diff --git a/checkpoint_log_server.mkp b/checkpoint_log_server.mkp index e4184d6975194ffcc35e10f3565ea35e39611ae1..126699a5e6c73459a33ebd136b273a74b2f7b317 100644 Binary files a/checkpoint_log_server.mkp and b/checkpoint_log_server.mkp differ diff --git a/checks/checkpoint_fw_ls b/checks/checkpoint_fw_ls index 4f7c0a3bfec515080ee487dfb066709e13c9e904..154b62b4058a244922aff11ade2cff287121b0d3 100644 --- a/checks/checkpoint_fw_ls +++ b/checks/checkpoint_fw_ls @@ -6,12 +6,12 @@ # Author: thl-cmk[at]outlook[dot]com # URL : https://thl-cmk.hopto.org # -# # 19.07.2016 : monitor Check Point FW Log server status # 24.07.2016 : changed for check state # 05.01.2018 : fix inventory function # 08.03.2018 : changed snmp scan function and inventory function # 15.03.2018 : code cleanup +# 08.06.2020 : changed snmp-scan function # # sample snmpwalk # @@ -165,8 +165,9 @@ check_info['checkpoint_fw_ls'] = { 'group' : 'cp_fw_ls', 'has_perfdata' : True, 'snmp_scan_function': lambda oid: (oid('.1.3.6.1.2.1.1.2.0').startswith('.1.3.6.1.4.1.2620.1.6.123.1') or - oid('.1.3.6.1.2.1.1.2.0') in ['.1.3.6.1.4.1.8072.3.2.10',]) # Virtual System (Linux) - and oid('.1.3.6.1.4.1.2620.1.1.30.1.0'), # todo: mib variable missing + oid('.1.3.6.1.2.1.1.2.0').startswith('.1.3.6.1.4.1.8072.3.2.10')) and + oid('.1.3.6.1.4.1.2620.1.6.1.0', '').lower().startswith('svn foundation'), + 'snmp_info' : [ ('.1.3.6.1.4.1.2620.1.1.30', [ # CHECKPOINT-MIB:fwLSConn '1', # fwLSConnOverall diff --git a/checks/checkpoint_fwm_ls b/checks/checkpoint_fwm_ls index 450334872953bac490e5e5ee9f0cc039b7a2869c..83e158d52651aad6fed25eca80f7e8ce70d20b7a 100644 --- a/checks/checkpoint_fwm_ls +++ b/checks/checkpoint_fwm_ls @@ -6,13 +6,13 @@ # Author: thl-cmk[at]outlook[dot]com # URL : https://thl-cmk.hopto.org # -# # 29.07.2016 : monitor Check Point FWM log server status # 08.05.2018 : changed snmp scan and inventory function # 16.03.2018 : added R80.10 MIBs # 30.05.2018 : removed empty OIDs CHECKPOINT-MIB::lsConnectedClientsEntry, # CHECKPOINT-MIB::lsConnectedGatewaysEntry # CHECKPOINT-MIB::lsLoggingInfo +# 08.06.2020 : changed snmp-scan function # # @@ -132,6 +132,12 @@ # .1.3.6.1.4.1.2620.1.11.102.0 = STRING: "Problem" # .1.3.6.1.4.1.2620.1.11.103.0 = STRING: "Log Server is not running" # +# sample info +# [[[u'Check Point Log Server', u'6', u'0', u'4663', u'1', u'0', u'OK', u'OK']], []] +# +# no logserver active +# [[], []] +# factory_settings['checkpoint_fwm_ls_defaults'] = { 'ignore_status_on_r80_10': False, @@ -139,7 +145,11 @@ factory_settings['checkpoint_fwm_ls_defaults'] = { def inventory_checkpoint_fwm_ls(info): - return [(None, None)] + try: + if info[0][0][0] == 'Check Point Log Server': + return [(None, None)] + except IndexError: + pass def check_checkpoint_fwm_ls(item, params, info): @@ -184,8 +194,9 @@ check_info['checkpoint_fwm_ls'] = { 'service_description' : 'FWM Log Server', 'group' : 'checkpoint_fwm_ls', 'has_perfdata' : True, - 'snmp_scan_function' : lambda oid: oid('.1.3.6.1.2.1.1.2.0').startswith('.1.3.6.1.4.1.2620.1.6.123.1') - and oid('.1.3.6.1.4.1.2620.1.11.1.0') == 'Check Point Log Server', + 'snmp_scan_function': lambda oid: (oid('.1.3.6.1.2.1.1.2.0').startswith('.1.3.6.1.4.1.2620.1.6.123.1') or + oid('.1.3.6.1.2.1.1.2.0').startswith('.1.3.6.1.4.1.8072.3.2.10')) and + oid('.1.3.6.1.4.1.2620.1.6.1.0', '').lower().startswith('svn foundation'), 'snmp_info' : [('.1.3.6.1.4.1.2620.1.11', [ # CHECKPOINT-MIB::ls '1', # lsProdName '2', # lsVerMajor diff --git a/packages/checkpoint_log_server b/packages/checkpoint_log_server index 9a2f8612447249a1132e4218285945372f997707..3019e8da9eb589aeb186b0a91bc6742bcd6b629d 100644 --- a/packages/checkpoint_log_server +++ b/packages/checkpoint_log_server @@ -8,6 +8,6 @@ 'name': 'checkpoint_log_server', 'num_files': 6, 'title': u'Check Point Log service status', - 'version': '20180731.v0.1.2c', + 'version': '20200608.v0.1.2d', 'version.min_required': '1.2.8b8', 'version.packaged': '1.4.0p38'} \ 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 c06f5a17534809e111d581b0216759802a1b1ca1..a53ef727856d340a11f21e50131a6ce4c9a2d2c7 100644 --- a/web/plugins/metrics/checkpoint_fw_log.py +++ b/web/plugins/metrics/checkpoint_fw_log.py @@ -1,25 +1,27 @@ #!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # -# Check Point Logserver metrics plugins -# checkpoint_fw_ls / checkpoint_fwm_ls - +# License: GNU General Public License v2 # -# Author: Th.L. +# Author: thl-cmk[at]outlook[dot]com +# URL : https://thl-cmk.hopto.org # Date : 2018-03-17 # +# Check Point Logserver metrics plugins +# checkpoint_fw_ls / checkpoint_fwm_ls +# -##################################################################################################################### +############################################################################## # # define units for perfdata # -##################################################################################################################### +############################################################################## -##################################################################################################################### +############################################################################## # # define metrics for perfdata # -##################################################################################################################### +############################################################################## metric_info['checkpoint_fw_ls_localloggingwriterate'] = { 'title': _('Local Logging Writing Rate'), @@ -37,7 +39,6 @@ metric_info['checkpoint_fw_ls_lsconnsendrate'] = { 'color': '31/a', } - metric_info['checkpoint_fwm_ls_totalreadlogs'] = { 'title': _('Total read logs'), 'unit': '1/s', @@ -81,11 +82,11 @@ metric_info['checkpoint_fwm_ls_readlogsratepeak'] = { 'color': '22/a', } -###################################################################################################################### +############################################################################## # # map perfdata to metric # -###################################################################################################################### +############################################################################## check_metrics['check_mk-checkpoint_fw_ls'] = { @@ -105,12 +106,11 @@ check_metrics['check_mk-checkpoint_fwm_ls'] = { } - -###################################################################################################################### +############################################################################## # # how to graph perdata # -###################################################################################################################### +############################################################################## graph_info.append({ 'title': _('Check Point Firewall Logserver: over all'), @@ -151,11 +151,11 @@ graph_info.append({ ], }) -###################################################################################################################### +############################################################################## # # define perf-o-meter # -###################################################################################################################### +############################################################################## perfometer_info.append(('stacked', [ { @@ -170,4 +170,4 @@ perfometer_info.append(('stacked', [ 'half_value': 1000.0, 'exponent': 2, }, -])) +])) \ No newline at end of file diff --git a/web/plugins/wato/checkpoint_fwm_ls.py b/web/plugins/wato/checkpoint_fwm_ls.py index 3137724db877c9f3dd5350f0ab9a27ba3947292d..2eed3c7a14589bb48da7af83debb20e21e4f5ec5 100644 --- a/web/plugins/wato/checkpoint_fwm_ls.py +++ b/web/plugins/wato/checkpoint_fwm_ls.py @@ -13,13 +13,13 @@ register_check_parameters( Dictionary( elements=[ ('ignore_status_on_r80_10', - FixedValue( - True, - help=_('Ignore status and alive on Check Point R80.10'), - title=_('Ignore status and alive on Check Point R80.10'), - )), + FixedValue( + True, + help=_('Ignore status and alive on Check Point R80.10'), + title=_('Ignore status and alive on Check Point R80.10'), + )), ], ), None, match_type='dict', -) \ No newline at end of file +)