Collection of CheckMK checks (see https://checkmk.com/). All checks and plugins are provided as is. Absolutely no warranty. Send any comments to thl-cmk[at]outlook[dot]com

Skip to content
Snippets Groups Projects
Commit eeeb2d85 authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

cleanup

parents
No related branches found
No related tags found
No related merge requests found
# SecureXL status
Monitors status of Check Point SecureXL
Check Info:
* *service*: this check will create one service per Check Point gateway
* *state*: **warning** if fwSXLStatus is not '1' (SXL enabled)
* *wato*: none
* *perfdata*:
* connections active (count)
* connections_added (/s)
* connections_deleted (/s)
Sample output
![sample output](/doc/sample.png?raw=true "sample [SHORT TITLE]")
File added
#!/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]
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
]),
}
doc/sample.png

28.2 KiB

{'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',
'num_files': 2,
'title': u'Check Point SecureXL status',
'version': '20180731.v.0.0.1',
'version.min_required': '1.2.8b8',
'version.packaged': '1.4.0p35'}
\ No newline at end of file
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment