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

update project

parent 49adc3c3
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 -*-
#
# 30.07.2016 : Th.L. : monitor Check Point Eventia analyzer correlation unit
# 04.08.2016 : Th.L. : changed invetory from index to ip address (index was changing ??)
# 05.01.2018 : Th.L. : fixed inventory function
# 12.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
#
# sample info
#
# 30.07.2016 : monitor Check Point Eventia analyzer correlation unit
# 04.08.2016 : changed invetory from index to ip address (index was changing ??)
# 05.01.2018 : fixed inventory function
# 12.03.2018 : code cleanup
# 07.06.2020 : added parse function
# code cleanup
#
# sample info
# [[u'1', u'192.167.10.10', u'1469790660', u'898864', u'189144']]
#
factory_settings['checkpoint_eva_cu_defaults'] = {
}
def inventory_checkpoint_eva_cu(info):
# add one check per correlation unit
def parse_checkpoint_eva_cu(info):
parsed = {}
for cu in info:
cuindex, cuip, culastrcvdtime, cunumeventsrcvd, cuconnectionduration = cu
yield cuip, {}
if len(cu) == 5:
cuindex, cuip, culastrcvdtime, cunumeventsrcvd, cuconnectionduration = cu
cuconnectionduration = int(cuconnectionduration)
since = time.strftime('%Y-%m-%d %H:%M', time.localtime(time.time() - cuconnectionduration))
last = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(int(culastrcvdtime)))
def check_checkpoint_eva_cu(item, params, info):
# last = time.strftime('%c', time.localtime(int(culastrcvdtime)))
# since = time.strftime('%c', time.localtime(time.time() - cuconnectionduration))
infotext = 'Correlation unit not found'
longoutput = ''
perfdata = []
state = 3
now_time = time.time()
now_time = time.time()
cunumeventsrcvd = get_rate('checkpoint_eva_cu_cunumeventsrcvd.%s' % cuip, now_time, int(cunumeventsrcvd), onwrap=SKIP)
for cu in info:
cuindex, cuip, culastrcvdtime, cunumeventsrcvd, cuconnectionduration = cu
if cuip == item:
cuconnectionduration = int(cuconnectionduration)
parsed.update({cuip: {
'cunumeventsrcvd': cunumeventsrcvd,
'cuconnectionduration':cuconnectionduration,
'last': last,
'since': since,
}
})
seconds = cuconnectionduration % 60
rem = cuconnectionduration / 60
minutes = rem % 60
hours = (rem % 1440) / 60
days = rem / 1440
return parsed
since = time.strftime('%Y-%m-%d %H:%M', time.localtime(time.time() - cuconnectionduration))
last = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(int(culastrcvdtime)))
def inventory_checkpoint_eva_cu(parsed):
for cu in parsed.keys():
yield cu, None
# since = time.strftime('%c', time.localtime(time.time() - cuconnectionduration))
# last = time.strftime('%c', time.localtime(int(culastrcvdtime)))
cunumeventsrcvd = get_rate('checkpoint_eva.%s.%s' % ('cunumeventsrcvd', item), now_time, int(cunumeventsrcvd), onwrap=SKIP)
def check_checkpoint_eva_cu(item, _no_params, parsed):
if parsed.get(item):
cu = parsed[item]
cunumeventsrcvd = cu['cunumeventsrcvd']
cuconnectionduration = cu['cuconnectionduration']
last = cu['last']
since = cu['since']
infotext = ''
infotext += 'Up since %s (%dd %02d:%02d:%02d), ' % (since, days, hours, minutes, seconds)
infotext += 'Last event at: %s, ' % last
infotext += 'Events: %s/s' % cunumeventsrcvd
seconds = cuconnectionduration % 60
rem = cuconnectionduration / 60
minutes = rem % 60
hours = (rem % 1440) / 60
days = rem / 1440
state = 0
perfdata = [('events', cunumeventsrcvd),
('uptime', cuconnectionduration),
]
infotext = ''
infotext += 'Up since %s (%dd %02d:%02d:%02d), ' % (since, days, hours, minutes, seconds)
infotext += 'Last event at: %s, ' % last
infotext += 'Events: %s/s' % cunumeventsrcvd
return state, infotext + longoutput, perfdata
perfdata = [('events', cunumeventsrcvd),
('uptime', cuconnectionduration),
]
return 0, infotext, perfdata
check_info['checkpoint_eva_cu'] = {
'parse_function' : parse_checkpoint_eva_cu,
'check_function' : check_checkpoint_eva_cu,
'inventory_function' : inventory_checkpoint_eva_cu,
'default_levels_variable': 'checkpoint_eva_cu_defaults',
'service_description' : 'Correlation unit %s',
'group' : 'checkpoint_eva_cu',
'has_perfdata' : True,
'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.25.1.9.1.1.1.0'),
'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.48'),
'snmp_info' : ('.1.3.6.1.4.1.2620.1.25.1.9.1', [ # CHECKPOINT-MIB::cpsemdCorrelationUnitEntry
'1', # cpsemdCorrelationUnitIndex
'2', # cpsemdCorrelationUnitIP
......@@ -81,5 +91,4 @@ check_info['checkpoint_eva_cu'] = {
'4', # cpsemdCorrelationUnitNumEventsRcvd
'5', # cpsemdConnectionDuration
]),
}
}
\ No newline at end of file
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
#
# License: GNU General Public License v2
#
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
#
#
# 29.07.2016 : monitor Check Point Eventia analyzer
# 12.03.2018 : code cleanup
# 07.06.2020 : split checkpoint_eva in to checkpoint_eva_status and checkpoint_eva_cu_status
# code cleanup
#
# sample info SamrtEvent activated
# [[u'1', u'1', u'34221335', u'0', u'0', u'', u'']]
#
# SmartEvent running not local
# [[u'1', u'2', u'0', u'0', u'0', u'Not connected to SEM', u'Event distributor is not connected.']]
#
# sample info SmartEvent not activated
# [[u'0', u'0', u'0', u'0', u'2', u'CPSEAD not running', u'CPSEAD not running - process appears to be down']]
#
def inventory_checkpoint_eva_cu_status(info):
# check for correlation unit
if len(info[0]) == 7:
if info[0] != [u'0', u'0', u'0', u'0', u'2', u'CPSEAD not running', u'CPSEAD not running - process appears to be down']:
if info[0] != [u'1', u'2', u'0', u'0', u'0', u'Not connected to SEM', u'Event distributor is not connected.']:
yield None, None
def check_checkpoint_eva_cu_status(_no_item, _no_params, info):
now_time = time.time()
procalive, connectedtosem, numprocessedlogs, nofreediskspace, statcode, statshortdescr, statlongdescr = info[0]
numprocessedlogs_sec = get_rate('checkpoint_eva_cu_status_numprocessedlogs', now_time, int(numprocessedlogs), onwrap=SKIP)
infotext = '# of processed logs: %s, %0.2f/s' % (numprocessedlogs, numprocessedlogs_sec)
perfdata = [('numprocessedlogs_sec', numprocessedlogs_sec)]
if len(statlongdescr) != 0:
infotext += ', status long: %s' % statlongdescr
if int(nofreediskspace) != 0:
yield 2, 'No free disk space'
if int(procalive) != 1:
yield 2, 'Process not alive'
if int(connectedtosem) != 1:
yield 2, 'Correlation unit not connected to server'
if int(statcode) != 0:
yield 2, statshortdescr
yield 0, infotext, perfdata
check_info['checkpoint_eva_cu_status'] = {
'check_function' : check_checkpoint_eva_cu_status,
'inventory_function' : inventory_checkpoint_eva_cu_status,
'service_description' : 'Correlation unit status',
'group' : 'checkpoint_eva_cu_status',
'has_perfdata' : True,
'snmp_scan_function' : lambda oid: oid('.1.3.6.1.2.1.1.2.0') == '.1.3.6.1.4.1.2620.1.6.123.1.48', # Management (SC, Log, Event,...)
'snmp_info' : ('.1.3.6.1.4.1.2620.1.25.2', [ # CHECKPOINT-MIB::cpsead
'1', # cpseadProcAlive
'2', # cpseadConnectedToSem
'3', # cpseadNumProcessedLogs
'5', # cpseadNoFreeDiskSpace
'101', # cpseadStatCode
'102', # cpseadStatShortDescr
'103', # cpseadStatLongDescr
]),
}
\ No newline at end of file
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
#
# 30.07.2016 : Th.L. : monitor Check Point Eventia analyzer database
# 03.08.2016 : Th.L. : added warn/crit in percent/GB for free disk space and free db space
# : added max levels for perfdata
# : changed perfdata from bytes to MB
# : added pnp-template
# License: GNU General Public License v2
#
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
#
# 30.07.2016 : monitor Check Point Eventia analyzer database
# 03.08.2016 : added warn/crit in percent/GB for free disk space and free db space
# added max levels for perfdata
# changed perfdata from bytes to MB
# added pnp-template --> moved to metrics
#
factory_settings['checkpoint_eva_db_defaults'] = {
......@@ -19,12 +23,8 @@ def inventory_checkpoint_eva_db(info):
return [(None, None)]
def check_checkpoint_eva_db(item, params, info):
infotext = 'item not found'
longoutput = ''
perfdata = []
state = 3
def check_checkpoint_eva_db(_no_item, params, info):
currentdbsize, dbcapacity, numevents, dbdiskspace, dbisfull, cpsemd_unknown_11 = info[0]
currentdbsize = int(currentdbsize)
......@@ -37,13 +37,6 @@ def check_checkpoint_eva_db(item, params, info):
if dbcapacity == 0: # missing data in verion R80.10
dbcapacity = dbdiskspace + currentdbsize
# longoutput += '\ncurrentdbsize %s (%sGB)' % (currentdbsize, currentdbsize/ 1024 / 1024 / 1024)
# longoutput += '\ndbcapacity %s (%sGB)' % (dbcapacity, dbcapacity / 1024 / 1024 / 1024)
# longoutput += '\ndbdiskspace %s (%sGB)' % (dbdiskspace, dbdiskspace/ 1024 / 1024 / 1024)
# longoutput += '\ncpsemd_unknown_11 %s (%sGB) (Disk space?)' % (cpsemd_unknown_11, cpsemd_unknown_11/ 1024 / 1024 / 1024)
# longoutput += '\nnumevents %s' % numevents
# longoutput += '\ndbisfull %s' % dbisfull
perfdata = [('db_disk_space', dbdiskspace),
('db_capacity', dbcapacity, None, None, 0, dbdiskspace),
('db_size', currentdbsize, None, None, 0, dbcapacity),
......@@ -52,17 +45,16 @@ def check_checkpoint_eva_db(item, params, info):
]
# convert to GB
currentdbsize = currentdbsize / 1024 / 1024 / 1024
dbcapacity = dbcapacity / 1024 / 1024 / 1024
dbdiskspace = dbdiskspace / 1024 / 1024 / 1024
cpsemd_unknown_11 = cpsemd_unknown_11 / 1024 / 1024 /1024
currentdbsize = currentdbsize >> 10 >> 10 >> 10
dbcapacity = dbcapacity >> 10 >> 10 >> 10
dbdiskspace = dbdiskspace >> 10 >> 10 >> 10
cpsemd_unknown_11 = cpsemd_unknown_11 >> 10 >> 10 >> 10
infotext = 'Current DB size: %d GB, ' % currentdbsize
infotext += 'DB capacity: %d GB, ' % dbcapacity
infotext += 'DB disk space: %d GB, ' % dbdiskspace
infotext += 'Disk size: %d GB, ' % cpsemd_unknown_11
infotext += 'Events in DB: %d' % numevents
state = 0
warndbcapacity, critdbcapacity = params.get('warncritdbdiskspace')
......@@ -74,7 +66,7 @@ def check_checkpoint_eva_db(item, params, info):
if dbisfull != 0:
yield 2, 'DB is full'
yield state, infotext + longoutput, perfdata
yield 0, infotext, perfdata
check_info['checkpoint_eva_db'] = {
......@@ -84,8 +76,7 @@ check_info['checkpoint_eva_db'] = {
'service_description' : 'Eventia DB',
'group' : 'checkpoint_eva_db',
'has_perfdata' : True,
'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.25.1.1.0'), # CHECKPOINT-MIB::cpsemdProcAlive
'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.48'),
'snmp_info' : ('.1.3.6.1.4.1.2620.1.25.1', [ # CHECKPOINT-MIB::cpsemd
'5', # cpsemdCurrentDBSize
'6', # cpsemdDBCapacity
......
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
#
# 30.07.2016 : Th.L. : monitor Check Point Eventia Analyzer job status
# 12.03.2018 : Th.L. : code cleanup
factory_settings['checkpoint_eva_jobs_defaults'] = {
}
def inventory_checkpoint_eva_jobs(info):
# check per job
for job_entry in info:
yield job_entry[0], None
def check_checkpoint_eva_jobs(item, params, info):
infotext = 'item not found'
longoutput = ''
perfdata = []
state = 3
now_time = time.time()
# License: GNU General Public License v2
#
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
#
# 30.07.2016 : monitor Check Point Eventia Analyzer job status
# 12.03.2018 : code cleanup
# 07.06.2020 : code cleanup
# added parse function
#
# sample info
# [
# [u'1', u'{42DC9EE4-1529-4cb4-B4D9-E850AA328EDA}', u'All online jobs', u'running', u'1', u'217.119.213.21', u'Log', u'1', u'3680009', u'fw.log', u'7569586', u'eJobRunningAllOK', u'All OK.'],
# [u'2', u'{42DC9EE4-1529-4cb4-B4D9-E850AA328EDA}', u'All online jobs', u'running', u'1', u'217.119.213.21', u'Log', u'1', u'30289702', u'fw.log', u'7020406', u'eJobRunningAllOK', u'All OK.'],
# [u'3', u'{42DC9EE4-1529-4cb4-B4D9-E850AA328EDA}', u'All online jobs', u'running', u'1', u'217.119.213.20', u'Log', u'1', u'3526', u'fw.log', u'4294967295', u'eJobRunningAllOK', u'All OK.'],
# [u'4', u'{42DC9EE4-1529-4cb4-B4D9-E850AA328EDA}', u'All online jobs', u'running', u'1', u'217.119.213.20', u'Log', u'1', u'247314', u'fw.log', u'49435', u'eJobRunningAllOK', u'All OK.'],
# [u'5', u'{42DC9EE4-1529-4cb4-B4D9-E850AA328EDA}', u'All online jobs', u'running', u'1', u'217.119.213.21', u'Audit', u'1', u'36', u'fw.adtlog', u'619', u'eJobRunningAllOK', u'All OK.'],
# [u'6', u'{42DC9EE4-1529-4cb4-B4D9-E850AA328EDA}', u'All online jobs', u'running', u'1', u'217.119.213.20', u'Audit', u'1', u'748', u'fw.adtlog', u'13769', u'eJobRunningAllOK', u'All OK.']
# ]
#
def parse_checkpoint_eva_jobs(info):
parsed = {}
for job_entry in info:
if job_entry[0] == item:
jobindex, jobid, jobname, jobstate, jobisonline, joblogserver, jobdatatype, connectedtologserver, \
numanalyzedlogs, filename, filecurrentposition, statedescriptioncode, statedescription = job_entry
if ',' in filename:
filename, recent_log_time = filename.split(',')
else:
recent_log_time = 'unknown'
numanalyzedlogs_per_second = get_rate('checkpoint_eva_jobs.%s.%s' % ('analyzed_logs', item), now_time, int(numanalyzedlogs), onwrap=SKIP)
infotext = ''
infotext += 'Server: %s, ' % joblogserver
infotext += 'Analyzed logs: %0.2f/s, ' % int(numanalyzedlogs_per_second)
infotext += 'Position in file: %s, ' % filecurrentposition
infotext += 'File: %s' % filename
longoutput += '\nJob id: %s' % jobid
longoutput += '\nJob name: %s' % jobname
longoutput += '\nJob state: %s' % jobstate
longoutput += '\nJob type: %s' % jobdatatype
longoutput += '\nJob file: %s' % filename
longoutput += '\n%s' % recent_log_time
longoutput += '\nState description code: %s' % statedescriptioncode
longoutput += '\nState description: %s' % statedescription
perfdata = [('position_in_file', filecurrentposition),
('analyzed_logs', int(numanalyzedlogs_per_second)),
]
state = 0
if int(jobisonline) != 1:
yield 2, 'State: %s' % jobstate
if int(connectedtologserver) != 1:
yield 2, 'Not connected to log server'
infotext += longoutput
yield state, infotext, perfdata
jobindex, jobid, jobname, jobstate, jobisonline, joblogserver, jobdatatype, connectedtologserver, \
numanalyzedlogs, filename, filecurrentposition, statedescriptioncode, statedescription = job_entry
now_time = time.time()
numanalyzedlogs_per_second = get_rate('checkpoint_eva_jobs_analyzed_logs.%s' % jobindex, now_time, int(numanalyzedlogs), onwrap=SKIP)
if ',' in filename:
filename, recent_log_time = filename.split(',')
else:
recent_log_time = 'unknown'
parsed.update({jobindex: {'jobid' : jobid,
'jobname': jobname,
'jobstate': jobstate,
'jobisonline': int(jobisonline),
'joblogserver': joblogserver,
'jobdatatype': jobdatatype,
'connectedtologserver': int(connectedtologserver),
'numanalyzedlogs_per_second': numanalyzedlogs_per_second,
'filename': filename,
'filecurrentposition': filecurrentposition,
'statedescriptioncode': statedescriptioncode,
'statedescription': statedescription,
'recent_log_time': recent_log_time,
}})
return parsed
def inventory_checkpoint_eva_jobs(parsed):
# check per job
for job_entry in parsed.keys():
yield job_entry, None
def check_checkpoint_eva_jobs(item, _no_params, parsed):
if parsed.get(item):
job_entry = parsed[item]
jobstate = job_entry['jobstate']
numanalyzedlogs_per_second = job_entry['numanalyzedlogs_per_second']
filename = job_entry['filename']
filecurrentposition = job_entry['filecurrentposition']
infotext = ''
infotext += 'Server: %s, ' % job_entry['joblogserver']
infotext += 'Analyzed logs: %0.2f/s, ' % numanalyzedlogs_per_second
infotext += 'Position in file: %s, ' % filecurrentposition
infotext += 'File: %s' % filename
longoutput = ''
longoutput += '\nJob id: %s' % job_entry['jobid']
longoutput += '\nJob name: %s' % job_entry['jobname']
longoutput += '\nJob state: %s' % jobstate
longoutput += '\nJob type: %s' % job_entry['jobdatatype']
longoutput += '\nJob file: %s' % filename
longoutput += '\nRecent log time: %s' % job_entry['recent_log_time']
longoutput += '\nState description code: %s' % job_entry['statedescriptioncode']
longoutput += '\nState description: %s' % job_entry['statedescription']
perfdata = [('position_in_file', filecurrentposition),
('analyzed_logs', numanalyzedlogs_per_second),
]
if job_entry['jobisonline'] != 1:
yield 2, 'State: %s' % jobstate
if job_entry['connectedtologserver'] != 1:
yield 2, 'Not connected to log server'
yield 0, infotext + longoutput, perfdata
check_info['checkpoint_eva_jobs'] = {
'parse_function' : parse_checkpoint_eva_jobs,
'check_function' : check_checkpoint_eva_jobs,
'inventory_function' : inventory_checkpoint_eva_jobs,
'default_levels_variable': 'checkpoint_eva_jobs_defaults',
'service_description' : 'Eventia job %s',
'group' : 'checkpoint_eva_jobs',
'has_perfdata' : True,
'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.25.2.4.1.1.1.0'),
'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.48'), # sysObjectID.0
'snmp_info' : ('.1.3.6.1.4.1.2620.1.25.2.4.1', [ # CHECKPOINT-MIB::cpseadJobsEntry
'1', # cpseadJobIndex
'2', # cpseadJobID
......@@ -92,5 +120,4 @@ check_info['checkpoint_eva_jobs'] = {
'12', # cpseadStateDescriptionCode
'13', # cpseadStateDescription
]),
}
}
\ No newline at end of file
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
#
# License: GNU General Public License v2
#
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
#
#
# 29.07.2016 : monitor Check Point Eventia analyzer
# 12.03.2018 : code cleanup
# 07.06.2020 : split checkpoint_eva in to checkpoint_eva_status and checkpoint_eva_cu_status
# code cleanup
#
# sample info SamrtEvent activated
# [[u'1', u'2305546', u'7606198', u'1469790658', u'0', u'', u'']]
#
# sample info SmartEvent not localy running
# [[u'1', u'0', u'0', u'', u'2', u'CPSEMD not running', u'CPSEMD not running - process appears to be down']]
#
# sample info SmartEvent not activated)
# [[u'0', u'0', u'0', u'', u'2', u'CPSEMD not running', u'CPSEMD not running - process appears to be down']]
#
def inventory_checkpoint_eva_status(info):
if len(info[0]) == 7:
if info[0] != [u'0', u'0', u'0', u'', u'2', u'CPSEMD not running', u'CPSEMD not running - process appears to be down']:
if info [0] != [u'1', u'0', u'0', u'', u'2', u'CPSEMD not running', u'CPSEMD not running - process appears to be down']:
yield None, None
def check_checkpoint_eva_status(_no_item, _no_params, info):
now_time = time.time()
procalive, neweventshandled, updateshandled, lasteventtime, statcode, statshortdescr, statlongdescr = info[0]
neweventshandled = get_rate('checkpoint_eva_status_neweventshandled', now_time, int(neweventshandled), onwrap=SKIP)
updateshandled = get_rate('checkpoint_eva_status_updateshandled', now_time, int(updateshandled), onwrap=SKIP)
infotext = 'new events: %0.2f/s, ' % neweventshandled
infotext += 'updates: %0.2f/s, ' % updateshandled
if len(lasteventtime) != 0:
lasteventtime = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(int(lasteventtime)))
infotext += 'last event at: %s' % lasteventtime
if len(statlongdescr) != 0:
infotext += 'status long: %s' % statlongdescr
if int(procalive) != 1:
yield 2, 'Process not alive'
if int(statcode) != 0:
yield 2, statshortdescr
perfdata = [
('newevents', int(neweventshandled)),
('updates', int(updateshandled)),
]
yield 0, infotext, perfdata
check_info['checkpoint_eva_status'] = {
'check_function' : check_checkpoint_eva_status,
'inventory_function' : inventory_checkpoint_eva_status,
'service_description' : 'Eventia analyzer status',
'group' : 'checkpoint_eva_status',
'has_perfdata' : True,
'snmp_scan_function' : lambda oid: oid('.1.3.6.1.2.1.1.2.0') == '.1.3.6.1.4.1.2620.1.6.123.1.48', # Management (SC, Log, Event,...)
'snmp_info' : ('.1.3.6.1.4.1.2620.1.25.1', [ # CHECKPOINT-MIB::cpsemd
'1', # cpsemdProcAlive
'2', # cpsemdNewEventsHandled
'3', # cpsemdUpdatesHandled
'4', # cpsemdLastEventTime
'101', # cpsemdStatCode
'102', # cpsemdStatShortDescr
'103', # cpsemdStatLongDescr
]),
}
\ No newline at end of file
{'author': u'Th.L. (thl-cmk[at]outlook[dot]com)',
'description': u'Monitor Check Point SmartEvent (Eventia Analyzer). Creates checks for the eventia database/correlation unit/analyzer jobs and status\n',
'download_url': 'https://thl-cmk.hopto.org',
'files': {'checks': ['checkpoint_eva',
'files': {'checks': ['checkpoint_eva_status',
'checkpoint_eva_cu',
'checkpoint_eva_cu_status',
'checkpoint_eva_db',
'checkpoint_eva_jobs'],
'web': ['plugins/metrics/checkpoint_eva.py',
'plugins/wato/checkpoint_eva_db.py']},
'name': 'checkpoint_smart_event',
'num_files': 6,
'num_files': 7,
'title': u'Check Point Smart Event',
'version': '20180731.v0.1.1c',
'version': '20200607.v0.2.0',
'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
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
#
# License: GNU General Public License v2
#
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
# Date : 2018-03-12
#
# Check Point Eventia metrics plugins
# checkpoint_eva
# checkpoint_eva_db
# checkpoint_eva_jobs
#
# Author: Th.L.
# Date : 2018-03-12
#
#####################################################################################################################
##############################################################################
#
# define units for perfdata
#
#####################################################################################################################
##############################################################################
#####################################################################################################################
##############################################################################
#
# define metrics for perfdata
#
#####################################################################################################################
##############################################################################
metric_info['checkpoint_eva_newevents'] = {
'title': _('New events'),
......@@ -35,7 +38,7 @@ metric_info['checkpoint_eva_updates'] = {
metric_info['checkpoint_eva_numprocessedlogs_sec'] = {
'title': _('Processed logs'),
'unit': '1/s',
'color': '31/a',
'color': '26/a',
}
metric_info['checkpoint_eva_cu_events'] = {
'title': _('Events'),
......@@ -83,15 +86,17 @@ metric_info['checkpoint_eva_jobs_position_in_file'] = {
'color': '21/a',
}
######################################################################################################################
##############################################################################
#
# map perfdata to metric
#
######################################################################################################################
##############################################################################
check_metrics['check_mk-checkpoint_eva'] = {
check_metrics['check_mk-checkpoint_eva_status'] = {
'newevents': {'name': 'checkpoint_eva_newevents', },
'updates': {'name': 'checkpoint_eva_updates', },
}
check_metrics['check_mk-checkpoint_eva_cu_status'] = {
'numprocessedlogs_sec': {'name': 'checkpoint_eva_numprocessedlogs_sec', },
}
check_metrics['check_mk-checkpoint_eva_cu'] = {
......@@ -110,11 +115,11 @@ check_metrics['check_mk-checkpoint_eva_jobs'] = {
'position_in_file': {'name': 'checkpoint_eva_jobs_position_in_file', },
}
######################################################################################################################
##############################################################################
#
# how to graph perdata
#
######################################################################################################################
##############################################################################
graph_info.append({
'title': _('Check Point Eventia Status: Events/Updates'),
......@@ -158,11 +163,11 @@ graph_info.append({
],
})
######################################################################################################################
##############################################################################
#
# define perf-o-meter
#
######################################################################################################################
##############################################################################
perfometer_info.append(('stacked', [
{
......
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
#
# License: GNU General Public License v2
#
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
#
register_check_parameters(
subgroup_applications,
'checkpoint_eva_db',
......@@ -18,4 +23,4 @@ register_check_parameters(
),
None,
match_type='dict',
)
)
\ 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