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 8b8e6626 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
# Check Point Management server
Monitors status of Check Point Management server
Check Info:
* *service*: this check will create the service *Management server*
* *state*:
**critical**
* if *fwmisalive* is not *1*, service not alive
* if *statcode* is not *0*, error description from *statlongdescr*
**warning**
* if on license violation, error code from *licenseviolationmsg*
* *wato*: none
* *perfdata*: none
Sample output
![sample output](/doc/sample.png?raw=true "sample [SHORT TITLE]")
File added
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
#
# 31.07.2016 : Th.L. : monitor Check Point management server
# 08.03.2017 : Th.L. : changed snmp scan and inventory function
# 15.03.2018 : Th.L. : code cleanup
#
# sample snmpwalk (client table missing)
#
# .1.3.6.1.4.1.2620.1.7.1.0 = STRING: Check Point Security Management Server
# .1.3.6.1.4.1.2620.1.7.2.0 = INTEGER: 6
# .1.3.6.1.4.1.2620.1.7.3.0 = INTEGER: 0
# .1.3.6.1.4.1.2620.1.7.4.0 = Wrong Type (should be INTEGER): Gauge32: 991140003
# .1.3.6.1.4.1.2620.1.7.5.0 = STRING: active
# .1.3.6.1.4.1.2620.1.7.6.0 = INTEGER: 1
# .1.3.6.1.4.1.2620.1.7.9.0 = STRING: MgmtHAJournals is too long.
# .1.3.6.1.4.1.2620.1.7.10.0 = INTEGER: 0
# .1.3.6.1.4.1.2620.1.7.11.0 = STRING: License violation detected:
# .1.3.6.1.4.1.2620.1.7.101.0 = INTEGER: 0
# .1.3.6.1.4.1.2620.1.7.102.0 = STRING: OK
# .1.3.6.1.4.1.2620.1.7.103.0 = STRING: OK
#
#
# sample info
#
# [[[u'Check Point Security Management Server', u'6', u'0', u'991140003', u'active', u'1',
# u'MgmtHAJournals is too long.', u'0', u'License violation detected: ', u'0', u'OK', u'OK']],
# []]
#
factory_settings['checkpoint_mgmt_defaults'] = {
}
def inventory_checkpoint_mgmt(info):
return [(None, None)]
def check_checkpoint_mgmt(item, params, info):
infotext = 'item not found'
longoutput = ''
perfdata = None
state = 3
mngmt, mgConnectedClientsTable = info
prodname, vermajor, verminor, buildnumber, activestatus, fwmisalive, mgmthajournals, \
islicenseviolation, licenseviolationmsg, statcode, statshortdescr, statlongdescr = mngmt[0]
state = 0
infotext = '%s ' % prodname
infotext += 'version: %s.%s, build: %s' % (vermajor, verminor, buildnumber)
longoutput += '\nClient table: %s' % mgConnectedClientsTable
if int(islicenseviolation) != 0:
if len(licenseviolationmsg) != 0:
yield 1, licenseviolationmsg
else:
yield 1, 'license violation'
if int(fwmisalive) != 1:
yield 2, 'is not alive'
if int(statcode) != 0:
yield 2, 'Staus : %s, %s' % (statshortdescr, statlongdescr)
yield state, infotext+ longoutput
check_info['checkpoint_mgmt'] = {
'check_function': check_checkpoint_mgmt,
'inventory_function': inventory_checkpoint_mgmt,
'default_levels_variable': 'checkpoint_mgmt_defaults',
'service_description': 'Management server',
'group': 'cp_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')
and oid('.1.3.6.1.4.1.2620.1.7.1.0') == 'Check Point Security Management Server',
'snmp_info': [
('.1.3.6.1.4.1.2620.1.7', [ # CCHECKPOINT-MIB::mngmt
'1', # mgProdName
'2', # mgVerMajor
'3', # mgVerMinor
'4', # mgBuildNumber
'5', # mgActiveStatus
'6', # mgFwmIsAlive
'9', # mgMgmtHAJournals
'10', # mgIsLicenseViolation
'11', # mgLicenseViolationMsg
'101', # mgStatCode
'102', # mgStatShortDescr
'103', # mgStatLongDescr
]),
('.1.3.6.1.4.1.2620.1.7.7', [ # CHECKPOINT-MIB::mgConnectedClientsTable
'1', # mgClientName
'2', # mgClientName
'3', # mgClientHost
'4', # mgClientDbLock
'5', # mgApplicationType
]),
],
}
doc/sample.png

6.33 KiB

{'author': u'Th.L. (thl-cmk[at]outlook[dot]com)',
'description': u'monitor Check Point management server\n',
'download_url': 'https://thl-cmk.hopto.org',
'files': {'checks': ['checkpoint_mgmt']},
'name': 'checkpoint_mgmt',
'num_files': 1,
'title': u'monitor Check Point management server',
'version': '20180731.v0.1a',
'version.min_required': '1.2.8b8',
'version.packaged': '1.4.0p35'}
\ 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