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

update project

parent 157b085f
No related branches found
No related tags found
No related merge requests found
No preview for this file type
#!/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
# License: GNU General Public License v2
#
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
#
# 31.07.2016 : monitor Check Point management server
# 08.03.2017 : changed snmp scan and inventory function
# 15.03.2018 : code cleanup
# 08.07.2020 : changed snm-scan function
#
# sample snmpwalk (client table missing)
#
......@@ -28,6 +33,9 @@
# u'MgmtHAJournals is too long.', u'0', u'License violation detected: ', u'0', u'OK', u'OK']],
# []]
#
# no MGMT Server
# [[], []]
#
factory_settings['checkpoint_mgmt_defaults'] = {
......@@ -35,20 +43,20 @@ factory_settings['checkpoint_mgmt_defaults'] = {
def inventory_checkpoint_mgmt(info):
return [(None, None)]
try:
if info[0][0][0] == 'Check Point Security Management Server':
return [(None, None)]
except IndexError:
pass
def check_checkpoint_mgmt(item, params, info):
infotext = 'item not found'
def check_checkpoint_mgmt(_no_item, _no_params, info):
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)
......@@ -66,7 +74,7 @@ def check_checkpoint_mgmt(item, params, info):
if int(statcode) != 0:
yield 2, 'Staus : %s, %s' % (statshortdescr, statlongdescr)
yield state, infotext+ longoutput
yield 0, infotext + longoutput
check_info['checkpoint_mgmt'] = {
......@@ -74,9 +82,10 @@ check_info['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',
'group': 'checkpoint_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
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.7', [ # CCHECKPOINT-MIB::mngmt
'1', # mgProdName
......@@ -100,4 +109,4 @@ check_info['checkpoint_mgmt'] = {
'5', # mgApplicationType
]),
],
}
}
\ No newline at end of file
......@@ -5,6 +5,6 @@
'name': 'checkpoint_mgmt',
'num_files': 1,
'title': u'monitor Check Point management server',
'version': '20180731.v0.1a',
'version': '20200608.v0.1b',
'version.min_required': '1.2.8b8',
'version.packaged': '1.4.0p35'}
\ No newline at end of file
'version.packaged': '1.4.0p38'}
\ 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