diff --git a/checkman/checkpoint_sxl_status b/checkman/checkpoint_sxl_status deleted file mode 100644 index 08ef898bcf6eb7a7979de60090d54f9719bbbc5b..0000000000000000000000000000000000000000 --- a/checkman/checkpoint_sxl_status +++ /dev/null @@ -1,45 +0,0 @@ -title: Dummy check man page - used as template for new check manuals -agents: linux, windows, aix, solaris, hpux, vms, freebsd, snmp -catalog: see modules/catalog.py for possible values -license: GPL -distribution: check_mk -description: - Describe here: (1) what the check actually does, (2) under which - circumstances it goes warning/critical, (3) which devices are supported - by the check, (4) if the check requires a separated plugin or - tool or separate configuration on the target host. - -item: - Describe the syntax and meaning of the check's item here. Provide all - information one needs if coding a manual check with {checks +=} in {main.mk}. - Give an example. If the check uses {None} as sole item, - then leave out this section. - -examples: - # Give examples for configuration in {main.mk} here. If the check has - # configuration variable, then give example for them here. - - # set default levels to 40 and 60 percent: - foo_default_values = (40, 60) - - # another configuration variable here: - inventory_foo_filter = [ "superfoo", "superfoo2" ] - -perfdata: - Describe precisely the number and meaning of performance variables - the check sends. If it outputs no performance data, then leave out this - section. - -inventory: - Describe how the inventory for the check works. Which items - will it find? Describe the influence of check specific - configuration parameters to the inventory. - -[parameters] -foofirst(int): describe the first parameter here (if parameters are grouped - as tuple) -fooother(string): describe another parameter here. - -[configuration] -foo_default_levels(int, int): Describe global configuration variable of - foo here. Important: also tell the user how they are preset. diff --git a/checkpoint_securexl.mkp b/checkpoint_securexl.mkp new file mode 100644 index 0000000000000000000000000000000000000000..a42cccbcc5c030695af2b6958ce87dfe9b745d7e Binary files /dev/null and b/checkpoint_securexl.mkp differ diff --git a/checkpoint_sxl_status.mkp b/checkpoint_sxl_status.mkp deleted file mode 100644 index 1fbcd584d7fa47b50c5069455a6d5b39f0bb1936..0000000000000000000000000000000000000000 Binary files a/checkpoint_sxl_status.mkp and /dev/null differ diff --git a/checks/checkpoint_sxl_status b/checks/checkpoint_securexl similarity index 79% rename from checks/checkpoint_sxl_status rename to checks/checkpoint_securexl index 7c404adba44b6dd42b2456a9af9b7edc74528152..b597603f9ab0b4e834d6a4a6dfe1ab231cb8fb3e 100644 --- a/checks/checkpoint_sxl_status +++ b/checks/checkpoint_securexl @@ -1,89 +1,87 @@ -#!/usr/bin/python -# -*- encoding: utf-8; py-indent-offset: 4 -*- -# -# Monitor status of Check Point SecureXL -# -# Author: Th.L. -# Date : 2018-03-14 -# - -# -# snmpwalk sample -# -# CHECKPOINT-MIB::fwSXLStatus.0 = INTEGER: enabled(1) -# CHECKPOINT-MIB::fwSXLConnsExisting.0 = Wrong Type (should be INTEGER): Gauge32: 51 -# CHECKPOINT-MIB::fwSXLConnsAdded.0 = Wrong Type (should be INTEGER): Gauge32: 630 -# CHECKPOINT-MIB::fwSXLConnsDeleted.0 = Wrong Type (should be INTEGER): Gauge32: 578 -# -# .1.3.6.1.4.1.2620.1.36.1.1.0 = INTEGER: 1 -# .1.3.6.1.4.1.2620.1.36.1.2.0 = Gauge32: 40 -# .1.3.6.1.4.1.2620.1.36.1.3.0 = Gauge32: 645 -# .1.3.6.1.4.1.2620.1.36.1.4.0 = Gauge32: 604 -# -# sample info -# -# [[u'1', u'48', u'7932', u'7986']] -# - -factory_settings['checkpoint_sxl_status_defaults'] = { -} - - -def inventory_checkpoint_sxl_status(info): - return [(None, None)] - - -def check_checkpoint_sxl_status(item, params, info): - state = 3 - infotext = 'Item not found' - longoutput = '' - perfdata = [] - - now_time = time.time() - fwSXLStatus, fwSXLConnsExisting, fwSXLConnsAdded, fwSXLConnsDeleted = info[0] - - - # ToDo: in R80.30 status is allways zero :-( - if int(fwSXLStatus) == 1: - fwSXLConnsExisting = int(fwSXLConnsExisting) - fwSXLConnsAdded = get_rate('checkpoint_sxl_status.%s.%s' % ('fwSXLConnsAdded', item), now_time, int(fwSXLConnsAdded), onwrap=SKIP) - fwSXLConnsDeleted = get_rate('checkpoint_sxl_status.%s.%s' % ('fwSXLConnsDeleted', item), now_time, int(fwSXLConnsDeleted), onwrap=SKIP) - - # Counters - infotext = 'Connections: Active %d, Added: %0.2f/s, Deleted: %0.2f/s' % (fwSXLConnsExisting, fwSXLConnsAdded, fwSXLConnsDeleted) - - perfdata = [('connections_active', fwSXLConnsExisting), - ('connections_added', fwSXLConnsAdded), - ('connections_deleted', fwSXLConnsDeleted), - ] - - return 0, infotext + longoutput, perfdata - - else: - return 1, 'SXL not enabled' - - -check_info['checkpoint_sxl_status'] = { - 'check_function' : check_checkpoint_sxl_status, - 'inventory_function' : inventory_checkpoint_sxl_status, - '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_sxl_status', - 'default_levels_variable': 'checkpoint_sxl_status_defaults', - 'snmp_info' : ( '.1.3.6.1.4.1.2620.1.36.1', [ - '1', # fwSXLStatus - '2', # fwSXLConnsExisting - '3', # fwSXLConnsAdded - '4', # fwSXLConnsDeleted - ]), -} +#!/usr/bin/python +# -*- encoding: utf-8; py-indent-offset: 4 -*- +# +# Monitor status of Check Point SecureXL +# +# Author: Th.L. +# Date : 2018-03-14 +# + +# +# snmpwalk sample +# +# CHECKPOINT-MIB::fwSXLStatus.0 = INTEGER: enabled(1) +# CHECKPOINT-MIB::fwSXLConnsExisting.0 = Wrong Type (should be INTEGER): Gauge32: 51 +# CHECKPOINT-MIB::fwSXLConnsAdded.0 = Wrong Type (should be INTEGER): Gauge32: 630 +# CHECKPOINT-MIB::fwSXLConnsDeleted.0 = Wrong Type (should be INTEGER): Gauge32: 578 +# +# .1.3.6.1.4.1.2620.1.36.1.1.0 = INTEGER: 1 +# .1.3.6.1.4.1.2620.1.36.1.2.0 = Gauge32: 40 +# .1.3.6.1.4.1.2620.1.36.1.3.0 = Gauge32: 645 +# .1.3.6.1.4.1.2620.1.36.1.4.0 = Gauge32: 604 +# +# sample info +# +# [[u'1', u'48', u'7932', u'7986']] +# + +factory_settings['checkpoint_securexl_defaults'] = { +} + + +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() + fwSXLStatus, fwSXLConnsExisting, fwSXLConnsAdded, fwSXLConnsDeleted = info[0] + + if int(fwSXLStatus) == 1: + 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) + + # Counters + infotext = 'Connections: Active %d, Added: %0.2f/s, Deleted: %0.2f/s' % (fwSXLConnsExisting, fwSXLConnsAdded, fwSXLConnsDeleted) + + perfdata = [('connections_active', fwSXLConnsExisting), + ('connections_added', fwSXLConnsAdded), + ('connections_deleted', fwSXLConnsDeleted), + ] + + return 0, infotext + longoutput, perfdata + + else: + return 1, 'SXL not enabled' + + +check_info['checkpoint_securexl'] = { + 'check_function' : check_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_info' : ( '.1.3.6.1.4.1.2620.1.36.1', [ + '1', # fwSXLStatus + '2', # fwSXLConnsExisting + '3', # fwSXLConnsAdded + '4', # fwSXLConnsDeleted + ]), +} diff --git a/packages/checkpoint_sxl_status b/packages/checkpoint_securexl similarity index 59% rename from packages/checkpoint_sxl_status rename to packages/checkpoint_securexl index 1b3e80fd4e0fe87c3b13882e772718f3d437b066..01c2ed7a67dc5ea23bdd6495d4b888fb741a00fc 100644 --- a/packages/checkpoint_sxl_status +++ b/packages/checkpoint_securexl @@ -1,11 +1,11 @@ {'author': u'Th.L. (thl-cmk[at]outlook[dot]com)', 'description': u'Monitors Check Point SecureXL status\nhas Perfdata for: active, added and deleted connections\nWarning if status not enabled\n', 'download_url': 'https://thl-cmk.hopto.org', - 'files': {'checks': ['checkpoint_sxl_status'], - 'web': ['plugins/metrics/checkpoint_sxl_status.py']}, - 'name': 'checkpoint_sxl_status', + 'files': {'checks': ['checkpoint_securexl'], + 'web': ['plugins/metrics/checkpoint_securexl.py']}, + 'name': 'checkpoint_securexl', 'num_files': 2, - 'title': u'Check Point SecureXL status', + 'title': u'Check Point SecureXL', 'version': '20180731.v.0.0.1', 'version.min_required': '1.2.8b8', - 'version.packaged': '1.4.0p35'} \ No newline at end of file + 'version.packaged': '1.6.0p8'} \ No newline at end of file diff --git a/web/plugins/metrics/checkpoint_securexl.py b/web/plugins/metrics/checkpoint_securexl.py new file mode 100644 index 0000000000000000000000000000000000000000..c9bf78a6f368343aa87a3890fde3262ce16ee80a --- /dev/null +++ b/web/plugins/metrics/checkpoint_securexl.py @@ -0,0 +1,54 @@ +#!/usr/bin/python +# -*- encoding: utf-8; py-indent-offset: 4 -*- +# +# Check Point SecureXL staus metrics plugin +# checkpoint_securexl +# +# Author: Th.L. +# Date : 2018-03-14 +# +metric_info['checkpoint_securexl_connections_active'] = { + 'title': _('Connections active'), + 'unit': 'count', + 'color': '11/a', +} +metric_info['checkpoint_securexl_connections_added'] = { + 'title': _('Connections added'), + 'unit': '1/s', + 'color': '21/a', +} +metric_info['checkpoint_securexl_connections_deleted'] = { + 'title': _('Connections deleted'), + 'unit': '1/s', + 'color': '31/a', +} + +check_metrics['check_mk-checkpoint_securexl'] = { + 'connections_active': {'name': 'checkpoint_securexl_connections_active', }, + 'connections_added': {'name': 'checkpoint_securexl_connections_added', }, + 'connections_deleted': {'name': 'checkpoint_securexl_connections_deleted', }, +} + +graph_info.append({ + 'title': _('Check Point SecureXL Connections active'), + 'metrics': [ + ('checkpoint_securexl_connections_active', 'area'), + + ], +}) + +graph_info.append({ + 'title': _('Check Point SecureXL Connections added/deleted'), + 'metrics': [ + ('checkpoint_securexl_connections_deleted', '-area'), + ('checkpoint_securexl_connections_added', 'area'), + ], +}) + + +perfometer_info.append({ + 'type': 'logarithmic', + 'metric': 'checkpoint_securexl_connections_active', + 'half_value': 2000.0, + 'exponent': 2, + },) \ No newline at end of file diff --git a/web/plugins/metrics/checkpoint_sxl_status.py b/web/plugins/metrics/checkpoint_sxl_status.py deleted file mode 100644 index 15d3d97bce09a5744dfda94987db44e7d67f0d16..0000000000000000000000000000000000000000 --- a/web/plugins/metrics/checkpoint_sxl_status.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/python -# -*- encoding: utf-8; py-indent-offset: 4 -*- -# -# Check Point SecureXL staus metrics plugin -# checkpoint_sxl_status -# -# Author: Th.L. -# Date : 2018-03-14 -# -metric_info['checkpoint_sxl_status_connections_active'] = { - 'title': _('Connections active'), - 'unit': 'count', - 'color': '11/a', -} -metric_info['checkpoint_sxl_status_connections_added'] = { - 'title': _('Connections added'), - 'unit': '1/s', - 'color': '21/a', -} -metric_info['checkpoint_sxl_status_connections_deleted'] = { - 'title': _('Connections deleted'), - 'unit': '1/s', - 'color': '31/a', -} - -check_metrics['check_mk-checkpoint_sxl_status'] = { - 'connections_active': {'name': 'checkpoint_sxl_status_connections_active', }, - 'connections_added': {'name': 'checkpoint_sxl_status_connections_added', }, - 'connections_deleted': {'name': 'checkpoint_sxl_status_connections_deleted', }, -} - -graph_info.append({ - 'title': _('Check Point SecureXL Connections active'), - 'metrics': [ - ('checkpoint_sxl_status_connections_active', 'area'), - - ], -}) - -graph_info.append({ - 'title': _('Check Point SecureXL Connections added/deleted'), - 'metrics': [ - ('checkpoint_sxl_status_connections_deleted', '-area'), - ('checkpoint_sxl_status_connections_added', 'area'), - ], -}) - - -perfometer_info.append({ - 'type': 'logarithmic', - 'metric': 'checkpoint_sxl_status_connections_active', - 'half_value': 2000.0, - 'exponent': 2, - },) \ No newline at end of file