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

Delete checkpoint_eva_cu_status

parent e9db8480
No related branches found
No related tags found
No related merge requests found
#!/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 : 2016-07-29
#
# monitor Check Point Eventia analyzer
#
# 2018-03-12: code cleanup
# 2020-06-07: split checkpoint_eva in to checkpoint_eva_status and checkpoint_eva_cu_status
# code cleanup
# 2020-06-08: changed snmp-scanfunction
#
# 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').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.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
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