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 be7130ad authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

update project

parent 72ef8409
No related branches found
No related tags found
No related merge requests found
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.
File added
File deleted
#!/usr/bin/python #!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*- # -*- encoding: utf-8; py-indent-offset: 4 -*-
# #
# Monitor status of Check Point SecureXL # Monitor status of Check Point SecureXL
# #
# Author: Th.L. # Author: Th.L.
# Date : 2018-03-14 # Date : 2018-03-14
# #
# #
# snmpwalk sample # snmpwalk sample
# #
# CHECKPOINT-MIB::fwSXLStatus.0 = INTEGER: enabled(1) # CHECKPOINT-MIB::fwSXLStatus.0 = INTEGER: enabled(1)
# CHECKPOINT-MIB::fwSXLConnsExisting.0 = Wrong Type (should be INTEGER): Gauge32: 51 # CHECKPOINT-MIB::fwSXLConnsExisting.0 = Wrong Type (should be INTEGER): Gauge32: 51
# CHECKPOINT-MIB::fwSXLConnsAdded.0 = Wrong Type (should be INTEGER): Gauge32: 630 # CHECKPOINT-MIB::fwSXLConnsAdded.0 = Wrong Type (should be INTEGER): Gauge32: 630
# CHECKPOINT-MIB::fwSXLConnsDeleted.0 = Wrong Type (should be INTEGER): Gauge32: 578 # 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.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.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.3.0 = Gauge32: 645
# .1.3.6.1.4.1.2620.1.36.1.4.0 = Gauge32: 604 # .1.3.6.1.4.1.2620.1.36.1.4.0 = Gauge32: 604
# #
# sample info # sample info
# #
# [[u'1', u'48', u'7932', u'7986']] # [[u'1', u'48', u'7932', u'7986']]
# #
factory_settings['checkpoint_sxl_status_defaults'] = { factory_settings['checkpoint_securexl_defaults'] = {
} }
def inventory_checkpoint_sxl_status(info): def inventory_checkpoint_securexl(info):
return [(None, None)] return [(None, None)]
def check_checkpoint_sxl_status(item, params, info): def check_checkpoint_securexl(item, params, info):
state = 3 state = 3
infotext = 'Item not found' infotext = 'Item not found'
longoutput = '' longoutput = ''
perfdata = [] perfdata = []
now_time = time.time() now_time = time.time()
fwSXLStatus, fwSXLConnsExisting, fwSXLConnsAdded, fwSXLConnsDeleted = info[0] fwSXLStatus, fwSXLConnsExisting, fwSXLConnsAdded, fwSXLConnsDeleted = info[0]
if int(fwSXLStatus) == 1:
# ToDo: in R80.30 status is allways zero :-( fwSXLConnsExisting = int(fwSXLConnsExisting)
if int(fwSXLStatus) == 1: fwSXLConnsAdded = get_rate('checkpoint_securexl.%s.%s' % ('fwSXLConnsAdded', item), now_time, int(fwSXLConnsAdded), onwrap=SKIP)
fwSXLConnsExisting = int(fwSXLConnsExisting) fwSXLConnsDeleted = get_rate('checkpoint_securexl.%s.%s' % ('fwSXLConnsDeleted', item), now_time, int(fwSXLConnsDeleted), onwrap=SKIP)
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)
# Counters
infotext = 'Connections: Active %d, Added: %0.2f/s, Deleted: %0.2f/s' % (fwSXLConnsExisting, fwSXLConnsAdded, fwSXLConnsDeleted) perfdata = [('connections_active', fwSXLConnsExisting),
('connections_added', fwSXLConnsAdded),
perfdata = [('connections_active', fwSXLConnsExisting), ('connections_deleted', fwSXLConnsDeleted),
('connections_added', fwSXLConnsAdded), ]
('connections_deleted', fwSXLConnsDeleted),
] return 0, infotext + longoutput, perfdata
return 0, infotext + longoutput, perfdata else:
return 1, 'SXL not enabled'
else:
return 1, 'SXL not enabled'
check_info['checkpoint_securexl'] = {
'check_function' : check_checkpoint_securexl,
check_info['checkpoint_sxl_status'] = { 'inventory_function' : inventory_checkpoint_securexl,
'check_function' : check_checkpoint_sxl_status, 'service_description' : 'SecureXL',
'inventory_function' : inventory_checkpoint_sxl_status, 'has_perfdata' : True,
'service_description' : 'SecureXL', #'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
'has_perfdata' : True, # '.1.3.6.1.4.1.2620.1.6.123.1.65', # Appliance
#'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.64', # VSX 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.62', # Gateway
# '.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.49', # R77.30 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.48', # Mgmt
# '.1.3.6.1.4.1.2620.1.6.123.1.49', # R77.30 Gateway # '.1.3.6.1.4.1.8072.3.2.10'] # Virtual System (Linux),
# '.1.3.6.1.4.1.2620.1.6.123.1.48', # Mgmt '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
# '.1.3.6.1.4.1.8072.3.2.10'] # Virtual System (Linux), oid('.1.3.6.1.2.1.1.2.0') in ['.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 and oid('.1.3.6.1.4.1.2620.1.36.1.1.0'), # CHECKPOINT-MIB::fwSXLStatus
oid('.1.3.6.1.2.1.1.2.0') in ['.1.3.6.1.4.1.8072.3.2.10',]) # Virtual System (Linux) 'group' : 'checkpoint_securexl',
and oid('.1.3.6.1.4.1.2620.1.36.1.1.0'), # CHECKPOINT-MIB::fwSXLStatus 'default_levels_variable': 'checkpoint_securexl_defaults',
'group' : 'checkpoint_sxl_status', 'snmp_info' : ( '.1.3.6.1.4.1.2620.1.36.1', [
'default_levels_variable': 'checkpoint_sxl_status_defaults', '1', # fwSXLStatus
'snmp_info' : ( '.1.3.6.1.4.1.2620.1.36.1', [ '2', # fwSXLConnsExisting
'1', # fwSXLStatus '3', # fwSXLConnsAdded
'2', # fwSXLConnsExisting '4', # fwSXLConnsDeleted
'3', # fwSXLConnsAdded ]),
'4', # fwSXLConnsDeleted }
]),
}
{'author': u'Th.L. (thl-cmk[at]outlook[dot]com)', {'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', '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', 'download_url': 'https://thl-cmk.hopto.org',
'files': {'checks': ['checkpoint_sxl_status'], 'files': {'checks': ['checkpoint_securexl'],
'web': ['plugins/metrics/checkpoint_sxl_status.py']}, 'web': ['plugins/metrics/checkpoint_securexl.py']},
'name': 'checkpoint_sxl_status', 'name': 'checkpoint_securexl',
'num_files': 2, 'num_files': 2,
'title': u'Check Point SecureXL status', 'title': u'Check Point SecureXL',
'version': '20180731.v.0.0.1', 'version': '20180731.v.0.0.1',
'version.min_required': '1.2.8b8', 'version.min_required': '1.2.8b8',
'version.packaged': '1.4.0p35'} 'version.packaged': '1.6.0p8'}
\ No newline at end of file \ No newline at end of file
...@@ -2,37 +2,37 @@ ...@@ -2,37 +2,37 @@
# -*- encoding: utf-8; py-indent-offset: 4 -*- # -*- encoding: utf-8; py-indent-offset: 4 -*-
# #
# Check Point SecureXL staus metrics plugin # Check Point SecureXL staus metrics plugin
# checkpoint_sxl_status # checkpoint_securexl
# #
# Author: Th.L. # Author: Th.L.
# Date : 2018-03-14 # Date : 2018-03-14
# #
metric_info['checkpoint_sxl_status_connections_active'] = { metric_info['checkpoint_securexl_connections_active'] = {
'title': _('Connections active'), 'title': _('Connections active'),
'unit': 'count', 'unit': 'count',
'color': '11/a', 'color': '11/a',
} }
metric_info['checkpoint_sxl_status_connections_added'] = { metric_info['checkpoint_securexl_connections_added'] = {
'title': _('Connections added'), 'title': _('Connections added'),
'unit': '1/s', 'unit': '1/s',
'color': '21/a', 'color': '21/a',
} }
metric_info['checkpoint_sxl_status_connections_deleted'] = { metric_info['checkpoint_securexl_connections_deleted'] = {
'title': _('Connections deleted'), 'title': _('Connections deleted'),
'unit': '1/s', 'unit': '1/s',
'color': '31/a', 'color': '31/a',
} }
check_metrics['check_mk-checkpoint_sxl_status'] = { check_metrics['check_mk-checkpoint_securexl'] = {
'connections_active': {'name': 'checkpoint_sxl_status_connections_active', }, 'connections_active': {'name': 'checkpoint_securexl_connections_active', },
'connections_added': {'name': 'checkpoint_sxl_status_connections_added', }, 'connections_added': {'name': 'checkpoint_securexl_connections_added', },
'connections_deleted': {'name': 'checkpoint_sxl_status_connections_deleted', }, 'connections_deleted': {'name': 'checkpoint_securexl_connections_deleted', },
} }
graph_info.append({ graph_info.append({
'title': _('Check Point SecureXL Connections active'), 'title': _('Check Point SecureXL Connections active'),
'metrics': [ 'metrics': [
('checkpoint_sxl_status_connections_active', 'area'), ('checkpoint_securexl_connections_active', 'area'),
], ],
}) })
...@@ -40,15 +40,15 @@ graph_info.append({ ...@@ -40,15 +40,15 @@ graph_info.append({
graph_info.append({ graph_info.append({
'title': _('Check Point SecureXL Connections added/deleted'), 'title': _('Check Point SecureXL Connections added/deleted'),
'metrics': [ 'metrics': [
('checkpoint_sxl_status_connections_deleted', '-area'), ('checkpoint_securexl_connections_deleted', '-area'),
('checkpoint_sxl_status_connections_added', 'area'), ('checkpoint_securexl_connections_added', 'area'),
], ],
}) })
perfometer_info.append({ perfometer_info.append({
'type': 'logarithmic', 'type': 'logarithmic',
'metric': 'checkpoint_sxl_status_connections_active', 'metric': 'checkpoint_securexl_connections_active',
'half_value': 2000.0, 'half_value': 2000.0,
'exponent': 2, '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