diff --git a/checkpoint_securexl.mkp b/checkpoint_securexl.mkp index 5e354fd466179262b927ea49909fe66298ffb5cf..5df0c7d463d535e45a23a4b48349cfad085b6623 100644 Binary files a/checkpoint_securexl.mkp and b/checkpoint_securexl.mkp differ diff --git a/checks/checkpoint_securexl b/checks/checkpoint_securexl index b597603f9ab0b4e834d6a4a6dfe1ab231cb8fb3e..6a87022989e368202a769e9310695d50537d19ec 100644 --- a/checks/checkpoint_securexl +++ b/checks/checkpoint_securexl @@ -1,12 +1,16 @@ #!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # -# Monitor status of Check Point SecureXL +# 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-14 # - +# Monitor status of Check Point SecureXL +# +# 2020-06-08: changed snmp-scan function +# renamed from checkpoint_securexl_status to checkpoint_securexl # # snmpwalk sample # @@ -33,16 +37,14 @@ def inventory_checkpoint_securexl(info): return [(None, None)] -def check_checkpoint_securexl(item, params, info): - state = 3 - infotext = 'Item not found' - longoutput = '' - perfdata = [] - - now_time = time.time() +def check_checkpoint_securexl(_no_item, _no_params, info): fwSXLStatus, fwSXLConnsExisting, fwSXLConnsAdded, fwSXLConnsDeleted = info[0] if int(fwSXLStatus) == 1: + longoutput = '' + + now_time = time.time() + fwSXLConnsExisting = int(fwSXLConnsExisting) fwSXLConnsAdded = get_rate('checkpoint_securexl.%s.%s' % ('fwSXLConnsAdded', item), now_time, int(fwSXLConnsAdded), onwrap=SKIP) fwSXLConnsDeleted = get_rate('checkpoint_securexl.%s.%s' % ('fwSXLConnsDeleted', item), now_time, int(fwSXLConnsDeleted), onwrap=SKIP) @@ -55,10 +57,10 @@ def check_checkpoint_securexl(item, params, info): ('connections_deleted', fwSXLConnsDeleted), ] - return 0, infotext + longoutput, perfdata + yield 0, infotext + longoutput, perfdata else: - return 1, 'SXL not enabled' + yield 1, 'SXL not enabled' check_info['checkpoint_securexl'] = { @@ -66,22 +68,15 @@ check_info['checkpoint_securexl'] = { 'inventory_function' : inventory_checkpoint_securexl, 'service_description' : 'SecureXL', 'has_perfdata' : True, - #'snmp_scan_function': lambda oid: oid('.1.3.6.1.2.1.1.2.0') in ['.1.3.6.1.4.1.2620.1.6.123.1.67', # ClusterXL Gateway - # '.1.3.6.1.4.1.2620.1.6.123.1.65', # Appliance - # '.1.3.6.1.4.1.2620.1.6.123.1.64', # VSX Gateway - # '.1.3.6.1.4.1.2620.1.6.123.1.62', # Gateway - # '.1.3.6.1.4.1.2620.1.6.123.1.49', # R77.30 Gateway - # '.1.3.6.1.4.1.2620.1.6.123.1.48', # Mgmt - # '.1.3.6.1.4.1.8072.3.2.10'] # Virtual System (Linux), - '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.36.1.1.0'), # CHECKPOINT-MIB::fwSXLStatus 'group' : 'checkpoint_securexl', 'default_levels_variable': 'checkpoint_securexl_defaults', + '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.36.1', [ '1', # fwSXLStatus '2', # fwSXLConnsExisting '3', # fwSXLConnsAdded '4', # fwSXLConnsDeleted ]), -} +} \ No newline at end of file diff --git a/packages/checkpoint_securexl b/packages/checkpoint_securexl index 01c2ed7a67dc5ea23bdd6495d4b888fb741a00fc..7741455ca2f6034117bcdb26f3a6cc91c66f5b4d 100644 --- a/packages/checkpoint_securexl +++ b/packages/checkpoint_securexl @@ -5,7 +5,7 @@ 'web': ['plugins/metrics/checkpoint_securexl.py']}, 'name': 'checkpoint_securexl', 'num_files': 2, - 'title': u'Check Point SecureXL', - 'version': '20180731.v.0.0.1', + 'title': u'Check Point SecureXL status', + 'version': '20200608.v.0.0.2', 'version.min_required': '1.2.8b8', - 'version.packaged': '1.6.0p8'} \ No newline at end of file + 'version.packaged': '1.4.0p38'} \ No newline at end of file diff --git a/web/plugins/metrics/checkpoint_securexl.py b/web/plugins/metrics/checkpoint_securexl.py index fa238e9188576b8618f3745391094ca69e52b60b..1a501e066432819f271d1c36763701d26e686a60 100644 --- a/web/plugins/metrics/checkpoint_securexl.py +++ b/web/plugins/metrics/checkpoint_securexl.py @@ -1,16 +1,19 @@ #!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # -# Check Point SecureXL staus metrics plugin -# checkpoint_securexl +# 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-14 # +# Check Point SecureXL staus metrics plugin +# checkpoint_securexl +# metric_info['checkpoint_securexl_connections_active'] = { 'title': _('Connections active'), 'unit': 'count', - 'color': '26/a', + 'color': '11/a', } metric_info['checkpoint_securexl_connections_added'] = { 'title': _('Connections added'), @@ -33,6 +36,7 @@ graph_info.append({ 'title': _('Check Point SecureXL Connections active'), 'metrics': [ ('checkpoint_securexl_connections_active', 'area'), + ], })